Package org.gatein.pc.portlet.impl.metadata.security

Examples of org.gatein.pc.portlet.impl.metadata.security.UserDataConstraintMetaData


         {
            return new PortletCollectionMetaData();
         }
         else if ("user-data-constraint".equals(localName))
         {
            return new UserDataConstraintMetaData(id);
         }
         else if ("display-name".equals(localName))
         {
            String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
            LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
View Full Code Here


      }

      // user-data-constraint
      if (object instanceof UserDataConstraintMetaData)
      {
         UserDataConstraintMetaData md = (UserDataConstraintMetaData)object;
         if ("transport-guarantee".equals(localName))
         {
            md.setTransportGuarantee(TransportGuarantee.valueOf(value));
         }
      }

      // portlet-collection in security-constraint
      if (object instanceof PortletCollectionMetaData)
      {
         PortletCollectionMetaData md = (PortletCollectionMetaData)object;
         if ("portlet-name".equals(localName))
         {
            md.addPortletname(value);
         }
      }

      // filter
      if (object instanceof FilterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         FilterMetaData md = (FilterMetaData)object;
         if ("filter-class".equals(localName))
         {
            md.setFilterClass(value);
         }
         else if ("filter-name".equals(localName))
         {
            md.setFilterName(value);
         }
         else if ("lifecycle".equals(localName))
         {
            int end = value.length() - "_PHASE".length();
            String lifeCycle = value.substring(0, end > 0 ? end : 0);
            try
            {
               md.addLifecycle(LifeCyclePhase.valueOf(lifeCycle));
            }
            catch (IllegalArgumentException e)
            {
               throw new IllegalArgumentException("Invalid value for lifecycle. Valid values are [RENDER_PHASE, RESOURCE_PHASE, ACTION_PHASE, EVENT_PHASE]");
            }
         }
      }

      // filter-mapping
      if (object instanceof FilterMappingMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         FilterMappingMetaData md = (FilterMappingMetaData)object;
         if ("filter-name".equals(localName))
         {
            md.setName(value);
         }
         if ("portlet-name".equals(localName))
         {
            md.addPortletName(value);
         }
      }

      // event-defintion
      if (object instanceof EventDefinitionMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         EventDefinitionMetaData md = (EventDefinitionMetaData)object;
         if ("name".equals(localName))
         {
            md.setName(value);
         }
         else if ("qname".equals(localName))
         {
            md.setQname(nav.resolveQName(value));
         }
         else if ("value-type".equals(localName))
         {
            md.setValueType(value);
         }
         else if ("alias".equals(localName))
         {
            md.addAlias(nav.resolveQName(value));
         }
      }

      // public-render-parameter
      if (object instanceof PublicRenderParameterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         PublicRenderParameterMetaData md = (PublicRenderParameterMetaData)object;
         if ("identifier".equals(localName))
         {
            md.setIdentifier(value);
         }
         else if ("name".equals(localName))
         {
            md.setName(value);
         }
         else if ("qname".equals(localName))
         {
            md.setQname(nav.resolveQName(value));
         }
         else if ("alias".equals(localName))
         {
            md.addAlias(nav.resolveQName(value));
         }
      }

      // container-runtime-option
      if (object instanceof ContainerRuntimeMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         ContainerRuntimeMetaData md = (ContainerRuntimeMetaData)object;
         if ("name".equals(localName))
         {
            md.setName(value);
         }
         else if ("value".equals(localName))
         {
            md.addValue(value);
         }
      }

      // listener
      if (object instanceof ListenerMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         ListenerMetaData md = (ListenerMetaData)object;
         if ("listener-class".equals(localName))
         {
            md.setListenerClass(value);
         }
      }
   }
View Full Code Here

         securityConstraintMD.setPortletList(portletCollectionMD);
         if (securityConstraintNav.next() != Element.user_data_constraint)
         {
            throw new StaxNavException(nav.getLocation(), "Was expecting a security-constraint element instead of " + securityConstraintNav.getName());
         }
         UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
         userDataConstraintMD.setDescription(readLocalizedString(securityConstraintNav, Element.description));
         if (securityConstraintNav.next() != Element.transport_guarantee)
         {
            throw new StaxNavException(nav.getLocation(), "Was expecting a transport-guarantee element instead of " + securityConstraintNav.getName());
         }
         userDataConstraintMD.setTransportGuarantee(securityConstraintNav.parseContent(TRANSPORT_GUARANTEE));
         securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
         md.addSecurityConstraint(securityConstraintMD);
      }

      //
View Full Code Here

         {
            return new PortletCollectionMetaData();
         }
         else if ("user-data-constraint".equals(localName))
         {
            return new UserDataConstraintMetaData(id);
         }
         else if ("display-name".equals(localName))
         {
            String locale = attrs.getValue("xml:lang") != null ? attrs.getValue("xml:lang") : DEFAULT_LOCALE;
            LocalizedDescriptionMetaData localized = new LocalizedDescriptionMetaData(locale);
View Full Code Here

      }

      // user-data-constraint
      if (object instanceof UserDataConstraintMetaData)
      {
         UserDataConstraintMetaData md = (UserDataConstraintMetaData)object;
         if ("transport-guarantee".equals(localName))
         {
            md.setTransportGuarantee(TransportGuarantee.valueOf(value));
         }
      }

      // portlet-collection in security-constraint
      if (object instanceof PortletCollectionMetaData)
      {
         PortletCollectionMetaData md = (PortletCollectionMetaData)object;
         if ("portlet-name".equals(localName))
         {
            md.addPortletname(value);
         }
      }

      // filter
      if (object instanceof FilterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         FilterMetaData md = (FilterMetaData)object;
         if ("filter-class".equals(localName))
         {
            md.setFilterClass(value);
         }
         else if ("filter-name".equals(localName))
         {
            md.setFilterName(value);
         }
         else if ("lifecycle".equals(localName))
         {
            int end = value.length() - "_PHASE".length();
            String lifeCycle = value.substring(0, end > 0 ? end : 0);
            try
            {
               md.addLifecycle(LifeCyclePhase.valueOf(lifeCycle));
            }
            catch (IllegalArgumentException e)
            {
               throw new IllegalArgumentException("Invalid value for lifecycle. Valid values are [RENDER_PHASE, RESOURCE_PHASE, ACTION_PHASE, EVENT_PHASE]");
            }
         }
      }

      // filter-mapping
      if (object instanceof FilterMappingMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         FilterMappingMetaData md = (FilterMappingMetaData)object;
         if ("filter-name".equals(localName))
         {
            md.setName(value);
         }
         if ("portlet-name".equals(localName))
         {
            md.addPortletName(value);
         }
      }

      // event-defintion
      if (object instanceof EventDefinitionMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         EventDefinitionMetaData md = (EventDefinitionMetaData)object;
         if ("name".equals(localName))
         {
            md.setName(value);
         }
         else if ("qname".equals(localName))
         {
            md.setQname(nav.resolveQName(value));
         }
         else if ("value-type".equals(localName))
         {
            md.setValueType(value);
         }
         else if ("alias".equals(localName))
         {
            md.addAlias(nav.resolveQName(value));
         }
      }

      // public-render-parameter
      if (object instanceof PublicRenderParameterMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         PublicRenderParameterMetaData md = (PublicRenderParameterMetaData)object;
         if ("identifier".equals(localName))
         {
            md.setIdentifier(value);
         }
         else if ("name".equals(localName))
         {
            md.setName(value);
         }
         else if ("qname".equals(localName))
         {
            md.setQname(nav.resolveQName(value));
         }
         else if ("alias".equals(localName))
         {
            md.addAlias(nav.resolveQName(value));
         }
      }

      // container-runtime-option
      if (object instanceof ContainerRuntimeMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         ContainerRuntimeMetaData md = (ContainerRuntimeMetaData)object;
         if ("name".equals(localName))
         {
            md.setName(value);
         }
         else if ("value".equals(localName))
         {
            md.addValue(value);
         }
      }

      // listener
      if (object instanceof ListenerMetaData && PORTLET_JSR_286_NS.equals(nsURI))
      {
         ListenerMetaData md = (ListenerMetaData)object;
         if ("listener-class".equals(localName))
         {
            md.setListenerClass(value);
         }
      }
   }
View Full Code Here

         securityConstraintMD.setPortletList(portletCollectionMD);
         if (securityConstraintNav.next() != Element.user_data_constraint)
         {
            throw new StaxNavException(nav.getLocation(), "Was expecting a security-constraint element instead of " + securityConstraintNav.getName());
         }
         UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
         userDataConstraintMD.setDescription(readLocalizedString(securityConstraintNav, Element.description));
         if (securityConstraintNav.next() != Element.transport_guarantee)
         {
            throw new StaxNavException(nav.getLocation(), "Was expecting a transport-guarantee element instead of " + securityConstraintNav.getName());
         }
         userDataConstraintMD.setTransportGuarantee(securityConstraintNav.parseContent(TRANSPORT_GUARANTEE));
         securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
         md.addSecurityConstraint(securityConstraintMD);
      }

      //
View Full Code Here

         securityConstraintMD.setPortletList(portletCollectionMD);
         if (securityConstraintNav.next() != Element.user_data_constraint)
         {
            throw new StaxNavException(nav.getLocation(), "Was expecting a security-constraint element instead of " + securityConstraintNav.getName());
         }
         UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
         userDataConstraintMD.setDescription(readLocalizedString(securityConstraintNav, Element.description));
         if (securityConstraintNav.next() != Element.transport_guarantee)
         {
            throw new StaxNavException(nav.getLocation(), "Was expecting a transport-guarantee element instead of " + securityConstraintNav.getName());
         }
         userDataConstraintMD.setTransportGuarantee(securityConstraintNav.parseContent(TRANSPORT_GUARANTEE));
         securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
         md.addSecurityConstraint(securityConstraintMD);
      }

      //
View Full Code Here

TOP

Related Classes of org.gatein.pc.portlet.impl.metadata.security.UserDataConstraintMetaData

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.