Package org.oasis.wsrp.v2

Examples of org.oasis.wsrp.v2.Online


   public static Online toV2Online(V1Online v1Online)
   {
      if (v1Online != null)
      {
         Online online = WSRPTypeFactory.createOnline(v1Online.getEmail(), v1Online.getUri());

         List<V1Extension> extensions = v1Online.getExtensions();
         if (extensions != null)
         {
            online.getExtensions().addAll(WSRPUtils.transform(extensions, EXTENSION));
         }

         return online;
      }
      else
View Full Code Here


      return telephoneNum;
   }

   public static Online createOnline(String email, String uri)
   {
      Online online = new Online();
      online.setEmail(email);
      online.setUri(uri);
      return online;
   }
View Full Code Here

      return telephoneNum;
   }

   public static Online createOnline(String email, String uri)
   {
      Online online = new Online();
      online.setEmail(email);
      online.setUri(uri);
      return online;
   }
View Full Code Here

   private static Contact createContactFrom(Map<String, String> infos, boolean isBusiness)
   {
      String email = infos.get(getOnlineUserInfoKey(OnlineInfo.EMAIL, isBusiness));
      String uri = infos.get(getOnlineUserInfoKey(OnlineInfo.URI, isBusiness));
      Online online = WSRPTypeFactory.createOnline(email, uri);

      String name = infos.get(getPostalUserInfoKey(PostalInfo.NAME, isBusiness));
      String street = infos.get(getPostalUserInfoKey(PostalInfo.STREET, isBusiness));
      String city = infos.get(getPostalUserInfoKey(PostalInfo.CITY, isBusiness));
      String stateprov = infos.get(getPostalUserInfoKey(PostalInfo.STATEPROV, isBusiness));
View Full Code Here

      private void populateContactInfo(Contact contact, boolean isBusiness)
      {
         if (contact != null)
         {
            Online online = contact.getOnline();
            if (online != null)
            {
               infos.put(getOnlineUserInfoKey(OnlineInfo.EMAIL, isBusiness), online.getEmail());
               infos.put(getOnlineUserInfoKey(OnlineInfo.URI, isBusiness), online.getUri());
            }

            Postal postal = contact.getPostal();
            if (postal != null)
            {
View Full Code Here

      return telephoneNum;
   }

   public static Online createOnline(String email, String uri)
   {
      Online online = new Online();
      online.setEmail(email);
      online.setUri(uri);
      return online;
   }
View Full Code Here

               {
                  List<ParameterDescription> publicValueDescriptions = desc.getNavigationalPublicValueDescriptions();
                  for (ParameterInfo parameterInfo : parameterInfos)
                  {
                     String id = parameterInfo.getId();
                     ParameterDescription paramDesc = WSRPTypeFactory.createParameterDescription(id);
                     paramDesc.setDescription(Utils.convertToWSRPLocalizedString(parameterInfo.getDescription(), localeMatch));
                     paramDesc.setLabel(WSRPTypeFactory.createLocalizedString(id));
                     List<QName> names = paramDesc.getNames();
                     names.add(parameterInfo.getName());
                     Collection<QName> aliases = parameterInfo.getAliases();
                     if (ParameterValidation.existsAndIsNotEmpty(aliases))
                     {
                        names.addAll(aliases);
View Full Code Here

      // get parameters
      final MimeRequest params = getParams();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(params, "MarkupParams", contextName);

      // get portlet handle
      PortletContext wsrpPC = getPortletContext();
      WSRP2ExceptionFactory.throwMissingParametersIfValueIsMissing(wsrpPC, "PortletContext", contextName);
      org.gatein.pc.api.PortletContext portletContext = WSRPUtils.convertToPortalPortletContext(wsrpPC);

      // check locales
      final List<String> desiredLocales = params.getLocales();
View Full Code Here

      }

      // deal with implicit cloning and state modification
      if (instanceContext.wasModified())
      {
         PortletContext updatedPortletContext = WSRPUtils.convertToWSRPPortletContext(instanceContext.getPortletContext());
         updateResponse.setPortletContext(updatedPortletContext);
      }
      return updateResponse;
   }
View Full Code Here

      throws AccessDenied, InconsistentParameters, InvalidHandle, InvalidRegistration, InvalidUserCategory,
      MissingParameters, ModifyRegistrationRequired, OperationFailed, OperationNotSupported, ResourceSuspended
   {
      WSRP2ExceptionFactory.throwOperationFailedIfValueIsMissing(clonePortlet, "ClonePortlet");

      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
      {
         RegistrationLocal.setRegistration(registration);
         org.gatein.pc.api.PortletContext response = producer.getPortletInvoker().createClone(PortletStateType.OPAQUE, portalPC);
         return WSRPUtils.convertToWSRPPortletContext(response);
      }
      catch (NoSuchPortletException e)
      {
         throw WSRP2ExceptionFactory.throwWSException(InvalidHandle.class, "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
      }
      catch (InvalidPortletIdException e)
      {
         throw WSRP2ExceptionFactory.throwWSException(InconsistentParameters.class, "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
      }
      catch (PortletInvokerException e)
      {
         throw WSRP2ExceptionFactory.throwWSException(OperationFailed.class, "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
      }
      finally
      {
         RegistrationLocal.setRegistration(null);
      }
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v2.Online

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.