Package no.kommune.bergen.svarut.v1

Examples of no.kommune.bergen.svarut.v1.UserContext


   {
      if (getPortletPropertyDescription != null)
      {
         RegistrationContext registrationContext = toV2RegistrationContext(getPortletPropertyDescription.getRegistrationContext());
         PortletContext portletContext = toV2PortletContext(getPortletPropertyDescription.getPortletContext());
         UserContext userContext = toV2UserContext(getPortletPropertyDescription.getUserContext());
         GetPortletPropertyDescription result = WSRPTypeFactory.createGetPortletPropertyDescription(registrationContext, portletContext, userContext, getPortletPropertyDescription.getDesiredLocales());

         return result;
      }
      else
View Full Code Here


   {
      if (getPortletDescription != null)
      {
         RegistrationContext registrationContext = toV2RegistrationContext(getPortletDescription.getRegistrationContext());
         PortletContext portletContext = toV2PortletContext(getPortletDescription.getPortletContext());
         UserContext userContext = toV2UserContext(getPortletDescription.getUserContext());
         GetPortletDescription result = WSRPTypeFactory.createGetPortletDescription(registrationContext, portletContext, userContext);

         result.getDesiredLocales().addAll(getPortletDescription.getDesiredLocales());

         return result;
View Full Code Here

   /** For UserProfile and related classes, everything is optional so no need to have factory methods. */
   public static UserContext createUserContext(String userContextKey)
   {
      ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(userContextKey, "user context key", "UserContext");
      UserContext userContext = new UserContext();
      userContext.setUserContextKey(userContextKey);
      return userContext;
   }
View Full Code Here

      Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletDescription.getRegistrationContext());

      PortletContext portletContext = getPortletDescription.getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletContext, PORTLET_CONTEXT, GET_PORTLET_DESCRIPTION);

      UserContext userContext = getPortletDescription.getUserContext();
      checkUserAuthorization(userContext);

      // RegistrationLocal.setRegistration is called further down the invocation in ServiceDescriptionHandler.getPortletDescription
      final List<String> desiredLocales = WSRPUtils.replaceByEmptyListIfNeeded(getPortletDescription.getDesiredLocales());
      PortletDescription description = producer.getPortletDescription(portletContext, desiredLocales, registration);
View Full Code Here

      try
      {
         Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletPropertyDescription.getRegistrationContext());
         RegistrationLocal.setRegistration(registration);

         UserContext userContext = getPortletPropertyDescription.getUserContext();
         checkUserAuthorization(userContext);

         Portlet portlet = getPortletFrom(portletContext, registration);
         PortletInfo info = portlet.getInfo();
         PreferencesInfo prefsInfo = info.getPreferences();
View Full Code Here

      PortletContext portletContext = clonePortlet.getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletContext, "PortletContext", "ClonePortlet");

      Registration registration = producer.getRegistrationOrFailIfInvalid(clonePortlet.getRegistrationContext());

      UserContext userContext = clonePortlet.getUserContext();
      checkUserAuthorization(userContext);

      org.gatein.pc.api.PortletContext portalPC = WSRPUtils.convertToPortalPortletContext(portletContext);
      try
      {
View Full Code Here

         toRegistationContext = copyPortlets.getFromRegistrationContext();
      }

      Registration toRegistration = producer.getRegistrationOrFailIfInvalid(toRegistationContext);

      UserContext fromUserContext = copyPortlets.getFromUserContext();
      checkUserAuthorization(fromUserContext);
      UserContext toUserContext = copyPortlets.getToUserContext();
      checkUserAuthorization(toUserContext);

      try
      {
         RegistrationLocal.setRegistration(fromRegistration);
View Full Code Here

      PortletContext portletContext = getPortletProperties.getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(portletContext, PORTLET_CONTEXT, GET_PORTLET_PROPERTIES);

      Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletProperties.getRegistrationContext());

      UserContext userContext = getPortletProperties.getUserContext();
      checkUserAuthorization(userContext);

      List<String> names = getPortletProperties.getNames();
      names = WSRPUtils.replaceByEmptyListIfNeeded(names);
View Full Code Here

         throw WSRP2ExceptionFactory.createWSException(MissingParameters.class, "Missing required list of portlets to export in ExportPortlets.", null);
      }

      Registration registration = producer.getRegistrationOrFailIfInvalid(exportPortlets.getRegistrationContext());

      UserContext userContext = exportPortlets.getUserContext();
      checkUserAuthorization(userContext);

      boolean exportByValueRequired;
      if (exportPortlets.isExportByValueRequired() != null)
      {
View Full Code Here

      }

      Registration registration = producer.getRegistrationOrFailIfInvalid(importPortlets.getRegistrationContext());

      // check if we have a valid userContext or not
      UserContext userContext = importPortlets.getUserContext();
      checkUserAuthorization(userContext);

      try
      {
         RegistrationLocal.setRegistration(registration);
View Full Code Here

TOP

Related Classes of no.kommune.bergen.svarut.v1.UserContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.