Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.ServiceDescription


   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 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 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

   {
      public V1Resource apply(Resource from)
      {
         if (from != null)
         {
            V1Resource result = new V1Resource();
            result.setResourceName(from.getResourceName());
            List<V1ResourceValue> values = WSRPUtils.transform(from.getValues(), RESOURCEVALUE);
            if (values != null)
            {
               result.getValues().addAll(values);
            }

            return result;
         }
         else
View Full Code Here

   {
      public V1ResourceValue apply(ResourceValue from)
      {
         if (from != null)
         {
            V1ResourceValue result = new V1ResourceValue();
            result.setLang(from.getLang());
            result.setValue(from.getValue());
            List<V1Extension> extensions = WSRPUtils.transform(from.getExtensions(), EXTENSION);
            if (extensions != null)
            {
               result.getExtensions().addAll(extensions);
            }

            return result;
         }
         else
View Full Code Here

   public static V1BlockingInteractionResponse toV1BlockingInteractionResponse(BlockingInteractionResponse blockingInteractionResponse)
   {
      if (blockingInteractionResponse != null)
      {
         V1BlockingInteractionResponse result;
         V1UpdateResponse updateResponse = toV1UpdateResponse(blockingInteractionResponse.getUpdateResponse());
         String redirectURL = blockingInteractionResponse.getRedirectURL();
         if (redirectURL != null)
         {
            result = WSRP1TypeFactory.createBlockingInteractionResponse(redirectURL);
         }
View Full Code Here

      public V1UploadContext apply(UploadContext uploadContext)
      {
         if (uploadContext != null)
         {
            V1UploadContext result = WSRP1TypeFactory.createUploadContext(uploadContext.getMimeType(), uploadContext.getUploadData());

            List<Extension> extensions = uploadContext.getExtensions();
            if (extensions != null)
            {
               result.getExtensions().addAll(Lists.transform(extensions, EXTENSION));
            }

            List<NamedString> mimeAttributes = uploadContext.getMimeAttributes();
            if (mimeAttributes != null)
            {
               result.getMimeAttributes().addAll(Lists.transform(mimeAttributes, NAMEDSTRING));
            }

            return result;
         }
         else
View Full Code Here

   public static V1UserContext toV1UserContext(UserContext userContext)
   {
      if (userContext != null)
      {
         V1UserContext v1UserContext = WSRP1TypeFactory.createUserContext(userContext.getUserContextKey());

         v1UserContext.setProfile(toV1UserProfile(userContext.getProfile()));

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

         if (userContext.getUserCategories() != null)
         {
            v1UserContext.getUserCategories().addAll(userContext.getUserCategories());
         }

         return v1UserContext;
      }
      else
View Full Code Here

TOP

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

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.