Package org.apache.pluto.container.driver

Examples of org.apache.pluto.container.driver.PortletRegistryService


     * @return
     * @throws JahiaException
     */
    public List<EntryPointDefinition> getAppEntryPointDefinitions(ApplicationBean appBean) throws JahiaException {
        // get the portlet registry
        PortletRegistryService portletRegistryService = PlutoServices.getServices().getPortletRegistryService();
        List<EntryPointDefinition> result = new ArrayList<EntryPointDefinition>();

        // get all portlet of the application bean
        try {
            List<? extends PortletDefinition> portletList = portletRegistryService.getPortletApplication(appBean.getContext()).getPortlets();
            for (PortletDefinition portlet : portletList) {
                PortletEntryPointDefinition portletEntryPointDefinition = new PortletEntryPointDefinition(appBean.getID(), appBean.getContext(), portlet);
                result.add(portletEntryPointDefinition);
            }
        } catch (PortletContainerException e) {
View Full Code Here


     *
     * @throws JahiaException
     */
    private void syncPlutoWithDB() throws JahiaException {
        // here we will compare Pluto's memory state with the state of the database, and add any missing application.
        PortletRegistryService portletRegistryService = plutoServices.getPortletRegistryService();
        Iterator<String> portletApplicationNames = portletRegistryService.getRegisteredPortletApplicationNames();
        while (portletApplicationNames.hasNext()) {
            String currentPortletApplicationName = portletApplicationNames.next();
            String currentContext = !currentPortletApplicationName.startsWith("/") ? "/" + currentPortletApplicationName : currentPortletApplicationName;
            ApplicationBean app = applicationCache.get(APPLICATION_DEFINITION_CONTEXT + currentContext);

View Full Code Here

          return false;
      }
      final String portletAppId = portletDescriptorKeys.first;
      final String portletName = portletDescriptorKeys.second;
     
        final PortletRegistryService portletRegistryService = this.portalDriverContainerServices.getPortletRegistryService();
        final PortletDefinition portletDescriptor;
        try {
            portletDescriptor = portletRegistryService.getPortlet(portletAppId, portletName);
        }
        catch (PortletContainerException e) {
            this.logger.warn("Failed to load portlet descriptor for appId='" + portletAppId + "', portletName='" + portletName + "'", e);
            return false;
        }
View Full Code Here

   * this portlet container.
   *
   * @return list of portlet context
   */
  public List<PortletApplicationDefinition> getPortletApplications() {
    final PortletRegistryService portletRegistryService = portalDriverContainerServices.getPortletRegistryService();
    final List<PortletApplicationDefinition> contexts = new ArrayList<PortletApplicationDefinition>();

    for (final Iterator<String> iter = portletRegistryService.getRegisteredPortletApplicationNames(); iter.hasNext();) {
      final String applicationName = iter.next();
      final PortletApplicationDefinition applicationDefninition;
            try {
                applicationDefninition = portletRegistryService.getPortletApplication(applicationName);
            }
            catch (PortletContainerException e) {
                throw new RuntimeException("Failed to load PortletApplicationDefinition for '" + applicationName + "'");
            }
     
View Full Code Here

    }
        final String portletAppId = portletDescriptorKeys.first;
        final String portletName = portletDescriptorKeys.second;

   
    final PortletRegistryService portletRegistryService = portalDriverContainerServices.getPortletRegistryService();
    try {
      PortletDefinition portletDD = portletRegistryService.getPortlet(portletAppId, portletName);
      return portletDD;
    } catch (PortletContainerException e) {
      e.printStackTrace();
      return null;
    }
View Full Code Here

        // appName/portletName must be set at this point
        Validate.notBlank(form.getApplicationId(), "ApplicationId not set");
        Validate.notBlank(form.getPortletName(), "PortletName not set");

        final PortletRegistryService portletRegistryService = portalDriverContainerServices.getPortletRegistryService();
        final PortletDefinition portletDef;
        try {
            portletDef = portletRegistryService.getPortlet(form.getApplicationId(), form.getPortletName());
        }
        catch (PortletContainerException e) {
            this.logger.warn("Failed to load portlet descriptor for appId='" + form.getApplicationId() + "', portletName='" + form.getPortletName() + "'", e);
            return;
        }
View Full Code Here

            return null;
        }
       
        final Tuple<String, String> portletDescriptorKeys = this.getPortletDescriptorKeys(portletDefinition);
       
        final PortletRegistryService portletRegistryService = this.portalDriverContainerServices.getPortletRegistryService();
        try {
            return portletRegistryService.getPortletApplication(portletDescriptorKeys.first);
        }
        catch (PortletContainerException e) {
            this.logger.warn("No portlet application descriptor could be found likely not deplotyed. For portlet definition: " + portletDefinition, e);
            return null;
        }
View Full Code Here

            return null;
        }
       
        final Tuple<String, String> portletDescriptorKeys = this.getPortletDescriptorKeys(portletDefinition);
       
        final PortletRegistryService portletRegistryService = this.portalDriverContainerServices.getPortletRegistryService();
        try {
            return portletRegistryService.getPortlet(portletDescriptorKeys.first, portletDescriptorKeys.second);
        }
        catch (PortletContainerException e) {
            if (this.logger.isDebugEnabled()) {
                this.logger.warn("No portlet descriptor could be found for the portlet definition, null will be returned: " + portletDefinition, e);
            }
View Full Code Here

TOP

Related Classes of org.apache.pluto.container.driver.PortletRegistryService

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.