Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.RegistrationData


      public V1MarkupType apply(MarkupType from)
      {
         if (from != null)
         {
            V1MarkupType result = WSRP1TypeFactory.createMarkupType(from.getMimeType(), from.getModes(), from.getWindowStates(), from.getLocales());
            List<V1Extension> extensions = WSRPUtils.transform(from.getExtensions(), EXTENSION);
            if (extensions != null)
            {
               result.getExtensions().addAll(extensions);
            }

            return result;
         }
         else
View Full Code Here


   public static void throwMissingParametersIfValueIsMissing(Object valueToCheck, String valueName, String context) throws V1MissingParameters
   {
      if (valueToCheck == null)
      {
         throw new V1MissingParameters("Missing required " + valueName + (context != null ? " in " + context : ""), new V1MissingParametersFault());
      }
   }
View Full Code Here

   public static void throwMissingParametersIfValueIsMissing(Object valueToCheck, String valueName, String context) throws V1MissingParameters
   {
      if (valueToCheck == null)
      {
         throw new V1MissingParameters("Missing required " + valueName + (context != null ? " in " + context : ""), new V1MissingParametersFault());
      }
   }
View Full Code Here

   public static V1ModelDescription toV1ModelDescription(ModelDescription modelDescription)
   {
      if (modelDescription != null)
      {
         V1ModelDescription result = WSRP1TypeFactory.createModelDescription(WSRPUtils.transform(modelDescription.getPropertyDescriptions(), PROPERTYDESCRIPTION));
         List<V1Extension> extensions = WSRPUtils.transform(modelDescription.getExtensions(), EXTENSION);
         if (extensions != null)
         {
            result.getExtensions().addAll(extensions);
         }
         result.setModelTypes(toV1ModelTypes(modelDescription.getModelTypes()));

         return result;
      }
      else
      {
View Full Code Here

   public static V1ModelTypes toV1ModelTypes(ModelTypes modelTypes)
   {
      if (modelTypes != null)
      {
         V1ModelTypes result = new V1ModelTypes();
         result.setAny(modelTypes.getAny());
         return result;
      }
      else
      {
         return null;
View Full Code Here

   {
      public V1NamedString apply(NamedString namedString)
      {
         if (namedString != null)
         {
            V1NamedString result = new V1NamedString();
            result.setName(namedString.getName());
            //GetValue is required for V1, but optional for V2. If we receive a null
            //value from V2, then just set the value to be equal to the name.
            if (namedString.getValue() == null)
            {
               result.setValue(namedString.getName());
            }
            else
            {
               result.setValue(namedString.getValue());
            }
            return result;
         }
         else
         {
View Full Code Here

   public static V1Online toV1Online(Online online)
   {
      if (online != null)
      {
         V1Online v1Online = new V1Online();
         v1Online.setEmail(online.getEmail());
         v1Online.setUri(online.getUri());

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

         return v1Online;
      }
      else
View Full Code Here

   public static V1PersonName toV1PersonName(PersonName personName)
   {
      if (personName != null)
      {
         V1PersonName v1PersonName = new V1PersonName();
         v1PersonName.setFamily(personName.getFamily());
         v1PersonName.setGiven(personName.getGiven());
         v1PersonName.setMiddle(personName.getMiddle());
         v1PersonName.setNickname(personName.getNickname());
         v1PersonName.setPrefix(personName.getPrefix());
         v1PersonName.setSuffix(personName.getSuffix());

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

         return v1PersonName;
      }
      else
View Full Code Here

      public V1PortletDescription apply(PortletDescription from)
      {
         if (from != null)
         {
            V1PortletDescription result = WSRP1TypeFactory.createPortletDescription(from.getPortletHandle(),
               WSRPUtils.transform(from.getMarkupTypes(), MARKUPTYPE));
            result.setDescription(LOCALIZEDSTRING.apply(from.getDescription()));
            result.setDisplayName(LOCALIZEDSTRING.apply(from.getDisplayName()));
            List<V1Extension> extensions = WSRPUtils.transform(from.getExtensions(), EXTENSION);
            if (extensions != null)
            {
               result.getExtensions().addAll(extensions);
            }
            List<V1LocalizedString> keywords = WSRPUtils.transform(from.getKeywords(), LOCALIZEDSTRING);
            if (keywords != null)
            {
               result.getKeywords().addAll(keywords);
            }
            List<String> userCategories = from.getUserCategories();
            if (userCategories != null)
            {
               result.getUserCategories().addAll(userCategories);
            }
            List<String> userProfileItems = from.getUserProfileItems();
            if (userProfileItems != null)
            {
               result.getUserProfileItems().addAll(userProfileItems);
            }
            result.setDefaultMarkupSecure(from.isDefaultMarkupSecure());
            result.setDoesUrlTemplateProcessing(from.isDoesUrlTemplateProcessing());
            result.setTemplatesStoredInSession(from.isTemplatesStoredInSession());
            result.setHasUserSpecificState(from.isHasUserSpecificState());
            result.setOnlySecure(from.isOnlySecure());
            result.setUserContextStoredInSession(from.isUserContextStoredInSession());
            result.setUsesMethodGet(from.isUsesMethodGet());
            result.setShortTitle(LOCALIZEDSTRING.apply(from.getShortTitle()));
            result.setTitle(LOCALIZEDSTRING.apply(from.getTitle()));

            result.setGroupID(from.getGroupID());
            return result;
         }
         else
         {
            return null;
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

TOP

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

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.