Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.V1RegistrationContext


   public static V1PortletDescriptionResponse toV1PortletDescriptionResponse(PortletDescriptionResponse portletDescriptionResponse)
   {
      if (portletDescriptionResponse != null)
      {
         V1PortletDescriptionResponse result = WSRP1TypeFactory.createPortletDescriptionResponse(toV1PortletDescription(portletDescriptionResponse.getPortletDescription()));
         result.setResourceList(toV1ResourceList(portletDescriptionResponse.getResourceList()));

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

         return result;
      }
      else
View Full Code Here


   public static V1PortletPropertyDescriptionResponse toV1PortletPropertyDescriptionResponse(PortletPropertyDescriptionResponse portletPropertyDescriptionResponse)
   {
      if (portletPropertyDescriptionResponse != null)
      {
         //todo use WSRP1TypeFactory instead
         V1PortletPropertyDescriptionResponse result = new V1PortletPropertyDescriptionResponse();
         result.setModelDescription(toV1ModelDescription(portletPropertyDescriptionResponse.getModelDescription()));
         result.setResourceList(toV1ResourceList(portletPropertyDescriptionResponse.getResourceList()));

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

         return result;
      }
      else
View Full Code Here

   public static V1Postal toV1Postal(Postal postal)
   {
      if (postal != null)
      {
         V1Postal v1Postal = new V1Postal();
         v1Postal.setCity(postal.getCity());
         v1Postal.setCountry(postal.getCountry());
         v1Postal.setName(postal.getName());
         v1Postal.setOrganization(postal.getOrganization());
         v1Postal.setPostalcode(postal.getPostalcode());
         v1Postal.setStateprov(postal.getStateprov());
         v1Postal.setStreet(postal.getStreet());

         List<Extension> extensions = postal.getExtensions();
         if (extensions != null)
         {
            v1Postal.getExtensions().addAll(WSRPUtils.transform(extensions, EXTENSION));
         }

         return v1Postal;
      }
      else
View Full Code Here

   {
      public V1Property apply(Property from)
      {
         if (from != null)
         {
            V1Property result = WSRP1TypeFactory.createProperty(from.getName().toString(), from.getLang(), from.getStringValue());
            List<Object> any = from.getAny();
            if (ParameterValidation.existsAndIsNotEmpty(any))
            {
               result.getAny().addAll(any);
            }

            return result;
         }
         else
View Full Code Here

   public static V1PropertyDescription toV1PropertyDescription(PropertyDescription propertyDescription)
   {
      if (propertyDescription != null)
      {
         V1PropertyDescription result = WSRP1TypeFactory.createPropertyDescription(propertyDescription.getName().toString(), propertyDescription.getType());
         result.setHint(toV1LocalizedString(propertyDescription.getHint()));
         result.setLabel(toV1LocalizedString(propertyDescription.getLabel()));
         List<V1Extension> extensions = WSRPUtils.transform(propertyDescription.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }

         return result;
      }
      else
View Full Code Here

   public static V1PropertyList toV1PropertyList(PropertyList propertyList)
   {
      if (propertyList != null)
      {
         V1PropertyList result = new V1PropertyList();

         List<V1Property> properties = WSRPUtils.transform(propertyList.getProperties(), PROPERTY);
         if (properties != null)
         {
            result.getProperties().addAll(properties);
         }

         List<V1ResetProperty> resetProperties = WSRPUtils.transform(propertyList.getResetProperties(), RESETPROPERTY);
         if (resetProperties != null)
         {
            result.getResetProperties().addAll(resetProperties);
         }

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

         return result;
      }
      else
View Full Code Here

   public static V1RegistrationContext toV1RegistrationContext(RegistrationContext registrationContext)
   {
      if (registrationContext != null)
      {
         V1RegistrationContext result = WSRP1TypeFactory.createRegistrationContext(registrationContext.getRegistrationHandle());
         result.setRegistrationState(registrationContext.getRegistrationState());
         List<V1Extension> extensions = WSRPUtils.transform(registrationContext.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }
         return result;
      }
      else
      {
View Full Code Here

    * @since 2.4.1
    */
   public static V1RegistrationContext createRegistrationContext(String registrationHandle)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(registrationHandle, "Registration handle");
      V1RegistrationContext registrationContext = new V1RegistrationContext();
      registrationContext.setRegistrationHandle(registrationHandle);
      return registrationContext;
   }
View Full Code Here

      Holder<Boolean> mayReturnRegistrationState, Holder<List<Extension>> extensions)
      throws InvalidRegistration, ModifyRegistrationRequired, OperationFailed, ResourceSuspended
   {
      try
      {
         V1RegistrationContext v1RegistrationContext = V2ToV1Converter.toV1RegistrationContext(registrationContext);
         Holder<List<V1PortletDescription>> v1OfferedPortlets = new Holder<List<V1PortletDescription>>();
         Holder<List<V1ItemDescription>> v1UserCategories = new Holder<List<V1ItemDescription>>();
         Holder<List<V1ItemDescription>> v1ProfileITems = new Holder<List<V1ItemDescription>>();
         Holder<List<V1ItemDescription>> v1WindowStates = new Holder<List<V1ItemDescription>>();
         Holder<List<V1ItemDescription>> v1Modes = new Holder<List<V1ItemDescription>>();
View Full Code Here

    * @since 2.4.1
    */
   public static V1RegistrationContext createRegistrationContext(String registrationHandle)
   {
      ParameterValidation.throwIllegalArgExceptionIfNull(registrationHandle, "Registration handle");
      V1RegistrationContext registrationContext = new V1RegistrationContext();
      registrationContext.setRegistrationHandle(registrationHandle);
      return registrationContext;
   }
View Full Code Here

TOP

Related Classes of org.oasis.wsrp.v1.V1RegistrationContext

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.