Package org.oasis.wsrp.v1

Examples of org.oasis.wsrp.v1.V1PortletStateChangeRequired


   public static V1MarkupContext toV1MarkupContext(MarkupContext markupContext)
   {
      if (markupContext != null)
      {        
         V1MarkupContext v1MarkupContext = WSRP1TypeFactory.createMarkupContext(markupContext.getMimeType(), markupContext.getItemString(), markupContext.getItemBinary(), markupContext.isUseCachedItem());
         v1MarkupContext.setCacheControl(toV1CacheControl(markupContext.getCacheControl()));
         v1MarkupContext.setLocale(markupContext.getLocale());
         v1MarkupContext.setPreferredTitle(markupContext.getPreferredTitle());
         v1MarkupContext.setRequiresUrlRewriting(markupContext.isRequiresRewriting());

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

         return v1MarkupContext;
      }
      else
View Full Code Here


   public static V1MarkupParams toV1MarkupParams(MarkupParams markupParams)
   {
      if (markupParams != null)
      {
         V1MarkupParams v1MarkupParams = WSRP1TypeFactory.createMarkupParams(markupParams.isSecureClientCommunication(), markupParams.getLocales(),
            markupParams.getMimeTypes(), markupParams.getMode(), markupParams.getWindowState());

         v1MarkupParams.setClientData(toV1ClientData(markupParams.getClientData()));
         NavigationalContext navigationalContext = markupParams.getNavigationalContext();
         if (navigationalContext != null)
         {
            v1MarkupParams.setNavigationalState(navigationalContext.getOpaqueValue());
         }
         v1MarkupParams.setValidateTag(markupParams.getValidateTag());

         List<String> charSets = markupParams.getMarkupCharacterSets();
         if (charSets != null)
         {
            v1MarkupParams.getMarkupCharacterSets().addAll(charSets);
         }

         List<String> validNewModes = markupParams.getValidNewModes();
         if (validNewModes != null)
         {
            v1MarkupParams.getValidNewModes().addAll(validNewModes);
         }

         List<String> validNewWindowStates = markupParams.getValidNewWindowStates();
         if (validNewWindowStates != null)
         {
            v1MarkupParams.getValidNewWindowStates().addAll(validNewWindowStates);
         }

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

         return v1MarkupParams;
      }
      else
View Full Code Here

   public static V1MarkupResponse toV1MarkupResponse(MarkupResponse markupResponse)
   {
      if (markupResponse != null)
      {
         V1MarkupResponse result = WSRP1TypeFactory.createMarkupResponse(toV1MarkupContext(markupResponse.getMarkupContext()));
         result.setSessionContext(toV1SessionContext(markupResponse.getSessionContext()));

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

         return result;
      }
      else
View Full Code Here

      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

TOP

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

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.