Package org.apache.pluto.om.portlet

Examples of org.apache.pluto.om.portlet.PortletDefinition


     * while more PAs for each portletDef
     * list:entityMan:getPortletEntity(pd)
     */
    PortletDefinitionList portletList = pa.getPortletDefinitionList(); // .get(JetspeedObjectID.createFromString(TEST_PORTLET));
    Iterator pi = portletList.iterator();
    PortletDefinition pd = null;

    JSPortlets portlets = new JSPortlets();
    while (pi.hasNext())
    {
      try
View Full Code Here


    while (pi.hasNext())
    {
      JSPortlet portlet = (JSPortlet)pi.next();
      if (pa != null)
      {
          PortletDefinition pd  = pa.getPortletDefinitionByName(portlet.getName());
          if (pd != null)
          {
              importPD(portlet,pd);
          }
      }
View Full Code Here

                .getSecurityRoles();
        Collection portlets = app.getPortletDefinitions();
        Iterator portletIterator = portlets.iterator();
        while (portletIterator.hasNext())
        {
            PortletDefinition portlet = (PortletDefinition) portletIterator
                    .next();
            SecurityRoleRefSet securityRoleRefs = portlet
                    .getInitSecurityRoleRefSet();
            Iterator roleRefsIterator = securityRoleRefs.iterator();
            while (roleRefsIterator.hasNext())
            {
                SecurityRoleRef roleRef = (SecurityRoleRef) roleRefsIterator
                        .next();
                String roleName = roleRef.getRoleLink();
                if (roleName == null || roleName.length() == 0)
                {
                    roleName = roleRef.getRoleName();
                }
                if (roles.get(roleName) == null)
                {
                    String errorMsg = "Undefined security role " + roleName
                            + " referenced from portlet " + portlet.getName();
                    log.error(errorMsg);
                    throw new PortletApplicationException(errorMsg);
                }
            }
        }
View Full Code Here

        SecurityRoleSet roles = webApp.getSecurityRoles();
        Collection portlets = portletApp.getPortletDefinitions();
        Iterator portletIterator = portlets.iterator();
        while (portletIterator.hasNext())
        {
            PortletDefinition portlet = (PortletDefinition) portletIterator.next();
            SecurityRoleRefSet securityRoleRefs = portlet.getInitSecurityRoleRefSet();
            Iterator roleRefsIterator = securityRoleRefs.iterator();
            while (roleRefsIterator.hasNext())
            {
                SecurityRoleRef roleRef = (SecurityRoleRef) roleRefsIterator.next();
                String roleName = roleRef.getRoleLink();
                if (roleName == null || roleName.length() == 0)
                {
                    roleName = roleRef.getRoleName();
                }
                if (roles.get(roleName) == null)
                {
                    String errorMsg = "Undefined security role " + roleName + " referenced from portlet "
                            + portlet.getName();
                    throw new PortletApplicationException(errorMsg);
                }
            }
        }
    }
View Full Code Here

      {   // get layout fragment sizes
        String sizesVal = layoutFragment.getProperty( "sizes" );
        String layoutName = layoutFragment.getName();
        layoutName = ( (layoutName != null && layoutName.length() > 0) ? layoutName : (String)null );
        ParameterSet paramSet = null;
        PortletDefinition portletDef = null;
        if ( sizesVal == null || sizesVal.length() == 0 )
        {
          if ( layoutName != null )
          {
            // logic below is copied from org.apache.jetspeed.portlets.MultiColumnPortlet
            portletDef = registry.getPortletDefinitionByUniqueName( layoutName );
                    if ( portletDef != null )
                    {
                      paramSet = portletDef.getInitParameterSet();
                      if ( paramSet != null )
                      {
                        Parameter sizesParam = paramSet.get( "sizes" );
                        sizesVal = ( sizesParam == null ) ? null : sizesParam.getValue();
                      }
View Full Code Here

        portletRegistry.registerPortletApplication(app);
 
        // store.invalidateAll();

  
        PortletDefinition pd = portletRegistry.getPortletDefinitionByUniqueName("HW_App::PreferencePortlet");

        assertNotNull(pd);

        assertNotNull(pd.getPreferenceSet());

        Preference pref1 = pd.getPreferenceSet().get("pref1");

        assertNotNull(pref1);

        Iterator itr = pref1.getValues();
        int count = 0;
View Full Code Here

        MutableWebApplication webApp = paWar.createWebApp();
        assertNotNull("WebApp is null", webApp);

        app.setWebApplicationDefinition(webApp);

        PortletDefinition portlet = app.getPortletDefinitionByName("TestPortlet");
        assertNotNull("TestPortlet is null", portlet);
        checkWebSecurityRoles(webApp);
        checkPortletSecurityRoleRefs(portlet);
        boolean validateFailed = false;
        try
View Full Code Here

            if(portletDefs != null && portletDefs.size() > 0)
            {
                Iterator pdItr = portletDefs.iterator();
                while(pdItr.hasNext())
                {
                    PortletDefinition pd = (PortletDefinition) pdItr.next();
                    Collection portletEntites = entityAccess.getPortletEntities(pd);
                    if(portletEntites != null && portletEntites.size() > 0)
                    {
                        Iterator peItr = portletEntites.iterator();
                        while(peItr.hasNext())
View Full Code Here

    Iterator portlets = pa.getPortletDefinitions().iterator();

    while (portlets.hasNext())
    {
      PortletDefinition portletDefinition = (PortletDefinition) portlets.next();
      Iterator      entities = entityAccess.getPortletEntities(portletDefinition)
                           .iterator();

      while (entities.hasNext())
      {
View Full Code Here

                    ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader();

                    Iterator portletDefinitions = pa.getPortletDefinitions().iterator();
                    while (portletDefinitions.hasNext())
                    {
                        PortletDefinition pd = (PortletDefinition) portletDefinitions.next();
                        String pdId = pd.getId().toString();
                        Portlet portlet = (Portlet) portletCache.remove(pdId);
                        if (portlet != null)
                        {
                            try
                            {
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.portlet.PortletDefinition

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.