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

Examples of org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData


    /** . */
    private static final PortletApplicationMetaDataBuilder builder = new PortletApplicationMetaDataBuilder();

    public static GlobalPortletMetaData unmarshalling(InputStream in) throws Exception {
        PortletApplication10MetaData application10MetaData = builder.build(in);
        return new GlobalPortletMetaData(application10MetaData);
    }
View Full Code Here


        }
    }

    @Override
    protected PortletApplication10MetaData buildPortletApplicationMetaData(ServletContext webApp) throws DeploymentException {
        PortletApplication10MetaData md = super.buildPortletApplicationMetaData(webApp);
        if (md != null) {
            md.setResourceBundleFactoryName(ExoResourceBundleFactory.class.getName());

            String globalPortletLocation = PropertyManager.getProperty("gatein.portlet.config");
            if (globalPortletLocation != null) {
                try {
                    GlobalPortletMetaData globalPortletMetaData = loadGlobalMetadata(globalPortletLocation);
View Full Code Here

   }

   protected void add(WebApp webApp)
   {
      //
      PortletApplication10MetaData metaData = buildPortletApplicationMetaData(webApp);
      if (metaData != null)
      {
         ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
         try
         {
View Full Code Here

               //
               PortletApplicationModelFactory factory = new PortletApplicationModelFactory();

               // Unmarshal
               PortletApplication10MetaData portletApplicationMD = (PortletApplication10MetaData)unmarshaller.unmarshal(in, new ValueTrimmingFilter(factory), null);

               //
               return portletApplicationMD;
            }
            finally
View Full Code Here

      String version = attrs.getValue("version");
      String id = attrs.getValue("id");

      // portlet-app 2.0 or 1.0
      PortletApplication10MetaData md = PORTLET_JSR_286_NS.equals(nsURI)
         ? new AnnotationPortletApplication20MetaData()
         : new AnnotationPortletApplication10MetaData();

      // Set portlet-app id
      md.setId(id);
      // Set portlet-app version
      md.setVersion(version);
      // return
      return md;
   }
View Full Code Here

      }

      // portlet app
      if (parent instanceof PortletApplication10MetaData)
      {
         PortletApplication10MetaData md = (PortletApplication10MetaData)parent;
         // add portlet
         if (child instanceof PortletMetaData)
         {
            PortletMetaData portlet = (PortletMetaData)child;
            portlet.setDisplayName(this.displayNames.getLocalizedString(portlet));
            md.addPortlet(portlet);
         }
         // add custom-portlet-mode
         else if (child instanceof CustomPortletModeMetaData)
         {
            md.addCustomPortletMode((CustomPortletModeMetaData)child);
         }
         // add custom window state
         else if (child instanceof CustomWindowStateMetaData)
         {
            md.addCustomWindowState((CustomWindowStateMetaData)child);
         }
         // add user-attribute
         else if (child instanceof UserAttributeMetaData)
         {
            md.addUserAttribute((UserAttributeMetaData)child);
         }
         // add security-constraint
         else if (child instanceof SecurityConstraintMetaData)
         {
            SecurityConstraintMetaData security = (SecurityConstraintMetaData)child;
            // display-name
            security.setDisplayName(this.displayNames.getLocalizedString(security));
            md.addSecurityConstraint(security);
         }
      }

      // portlet-app 2.0
      if (parent instanceof PortletApplication20MetaData)
      {
         PortletApplication20MetaData md = (PortletApplication20MetaData)parent;
         // add public-render-parameter
         if (child instanceof PublicRenderParameterMetaData)
         {
            md.addPublicRenderParameter((PublicRenderParameterMetaData)child);
         }
         // add event-defintion
         else if (child instanceof EventDefinitionMetaData)
         {
            md.addEventDefinition((EventDefinitionMetaData)child);
         }
         // add filter
         else if (child instanceof FilterMetaData)
         {
            FilterMetaData filter = (FilterMetaData)child;
            filter.setDisplayName(this.displayNames.getLocalizedString(filter));
            md.addFilter(filter);
         }
         // add filter-mapping
         else if (child instanceof FilterMappingMetaData)
         {
            md.addFilterMapping((FilterMappingMetaData)child);
         }
         // add container-runtime-option
         else if (child instanceof ContainerRuntimeMetaData)
         {
            md.addContainerRuntime((ContainerRuntimeMetaData)child);
         }
         // add listener
         else if (child instanceof ListenerMetaData)
         {
            ListenerMetaData listener = (ListenerMetaData)child;
            listener.setDisplayName(this.displayNames.getLocalizedString(listener));
            md.addListener(listener);
         }
      }

      // portlet
      if (parent instanceof PortletMetaData)
      {
         PortletMetaData md = (PortletMetaData)parent;
         // init-param
         if (child instanceof InitParamMetaData)
         {
            md.addInitParam((InitParamMetaData)child);
         }
         // supports
         else if (child instanceof SupportsMetaData)
         {
            md.addSupport((SupportsMetaData)child);
         }
         // supported-locale
         else if (child instanceof SupportedLocaleMetaData)
         {
            md.addSupportedLocale((SupportedLocaleMetaData)child);
         }
         // portlet-info
         else if (child instanceof PortletInfoMetaData)
         {
            md.setPortletInfo((PortletInfoMetaData)child);
         }
         // portlet-preferences
         else if (child instanceof PortletPreferencesMetaData)
         {
            md.setPortletPreferences((PortletPreferencesMetaData)child);
         }
         // security-role-ref
         else if (child instanceof SecurityRoleRefMetaData)
         {
            md.addSecurityRoleRef((SecurityRoleRefMetaData)child);
         }
         // supported-events
         else if (child instanceof EventDefinitionReferenceMetaData)
         {
            if ("supported-processing-event".equals(localName))
            {
               md.addSupportedProcessingEvent((EventDefinitionReferenceMetaData)child);
            }
            else if ("supported-publishing-event".equals(localName))
            {
               md.addSupportedPublishingEvent((EventDefinitionReferenceMetaData)child);
            }
         }
         // container-runtime-option
         else if (child instanceof ContainerRuntimeMetaData)
         {
            md.addContainerRuntime((ContainerRuntimeMetaData)child);
         }
      }

      // adding user-data-constraint and portlet-name(s) to security-constraint
      if (parent instanceof SecurityConstraintMetaData)
      {
         SecurityConstraintMetaData md = (SecurityConstraintMetaData)parent;
         // add user-data-constraint
         if (child instanceof UserDataConstraintMetaData)
         {
            md.setUserDataConstraint((UserDataConstraintMetaData)child);
         }
         // add portlet-collection
         else if (child instanceof PortletCollectionMetaData)
         {
            md.setPortletList((PortletCollectionMetaData)child);
         }
      }

      // filter
      if (parent instanceof FilterMetaData)
      {
         FilterMetaData md = (FilterMetaData)parent;
         // add init-param
         if (child instanceof InitParamMetaData)
         {
            md.addInitParam((InitParamMetaData)child);
         }
      }

      // add portlet-mode and window-state
      if (parent instanceof SupportsMetaData)
      {
         SupportsMetaData md = (SupportsMetaData)parent;
         if (child instanceof PortletModeMetaData)
         {
            md.addPortletMode((PortletModeMetaData)child);
         }
         else if (child instanceof WindowStateMetaData)
         {
            md.addWindowState((WindowStateMetaData)child);
         }
      }

      // add preference
      if (parent instanceof PortletPreferencesMetaData)
      {
         PortletPreferencesMetaData md = (PortletPreferencesMetaData)parent;
         if (child instanceof PortletPreferenceMetaData)
         {
            md.addPortletPreference((PortletPreferenceMetaData)child);
         }
      }
   }
View Full Code Here

*/

   public final PortletApplicationDeployment add(ServletContext webApp) throws DeploymentException
   {
      //
      PortletApplication10MetaData metaData = buildPortletApplicationMetaData(webApp);
      if (metaData != null)
      {
         PortletApplicationDeployment deployment = new PortletApplicationDeployment(broadcaster, webApp, metaData);
         deploymentMap.put(webApp.getContextPath(), deployment);
         deployment.install();
View Full Code Here

{

   @Override
   protected PortletApplication10MetaData buildPortletApplicationMetaData(WebApp webApp)
   {
      PortletApplication10MetaData md = super.buildPortletApplicationMetaData(webApp);
      if (md != null)
      {
         md.setResourceBundleFactoryName(ExoResourceBundleFactory.class.getName());
      }
      return md;
   }
View Full Code Here

   }

   protected void add(WebApp webApp)
   {
      //
      PortletApplication10MetaData metaData = buildPortletApplicationMetaData(webApp);
      if (metaData != null)
      {
         ClassLoader oldCL = Thread.currentThread().getContextClassLoader();
         try
         {
View Full Code Here

    /** . */
    private final Logger log = LoggerFactory.getLogger(ExoPortletApplicationDeployer.class);

    @Override
    protected PortletApplication10MetaData buildPortletApplicationMetaData(ServletContext webApp) throws DeploymentException {
        PortletApplication10MetaData md = super.buildPortletApplicationMetaData(webApp);
        if (md != null) {
            md.setResourceBundleFactoryName(ExoResourceBundleFactory.class.getName());

            String globalPortletLocation = PropertyManager.getProperty("gatein.portlet.config");
            if (globalPortletLocation != null) {
                try {
                    GlobalPortletMetaData globalPortletMetaData = loadGlobalMetadata(globalPortletLocation);
View Full Code Here

TOP

Related Classes of org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData

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.