Package org.apache.pluto.om.entity

Examples of org.apache.pluto.om.entity.PortletEntity


    }

    private boolean isValidContentType(String type)
    {
        type = stripCharacterEncoding(type);
        PortletEntity entity = portletWindow.getPortletEntity();
        PortletDefinition def = entity.getPortletDefinition();
        ContentTypeSet contentTypes = def.getContentTypeSet();
        Iterator it = contentTypes.iterator();
        while(it.hasNext()) {
            ContentType ct = (ContentType)it.next();
            String supportedType = ct.getContentType();
View Full Code Here


   *            the name of the role
   * @return true if it is determined the user has the given role.
   * 
   */
  public boolean isUserInRole(String roleName) {
    PortletEntity entity = portletWindow.getPortletEntity();
    PortletDefinition def = entity.getPortletDefinition();
    SecurityRoleRefSet set = def.getInitSecurityRoleRefSet();
    SecurityRoleRef ref = set.get(roleName);

    String link = null;
    if (ref != null && ref.getRoleLink() != null) {
View Full Code Here

          PortletApplicationEntity pae = (PortletApplicationEntity) it.next();
          String app = pae.getId().toString();
         
          Vector list = new Vector();
          for(Iterator it2 = pae.getPortletEntityList().iterator(); it2.hasNext();) {
            PortletEntity pe = (PortletEntity) it2.next();
            list.add(pe.getId().toString());
          }
          portlets.put(app, list);
      }
     
      return "success";
View Full Code Here

        {
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute(RequestContext.REQUEST_PORTALENV);
            if (null != context)
            {
                String entityID = "--NULL--";
                PortletEntity entity = portletWindow.getPortletEntity();
                if (entity != null)
                {
                    entityID = entity.getId().toString();
                }
                PortletApplicationEntity portletAppEntity = portletWindow.getPortletEntity()
                        .getPortletApplicationEntity();
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

                if (null != portletAppDef)
                {
                    value = context.getUserInfoMap(portletAppDef.getId());
View Full Code Here

     * @return The PortletEntity represented by the current fragment.
     * @throws Exception
     */
    public PortletEntity getPortletEntity(Fragment f) throws Exception
    {
        PortletEntity portletEntity = entityAccess.getPortletEntityForFragment(f);
        if(portletEntity == null)
        {
            try
            {
                portletEntity = entityAccess.generateEntityFromFragment(f);
View Full Code Here

        }
        DecoratorAction action =  new DecoratorAction(actionName,
                                                      actionName,
                                    "content/images/" +  actionName + ".gif"); // TODO: HARD-CODED .gif
       
        PortletEntity entity = getCurrentPortletEntity();
       
        PortletURLProviderImpl url =
            new PortletURLProviderImpl(Jetspeed.getCurrentRequestContext(),
                                       windowAccess.getPortletWindow(getCurrentFragment()));
        switch (actionId)
View Full Code Here

            {
                PortletDefinition portletDefinition = (PortletDefinition) portlets.next();
                Iterator entities = entityAccess.getPortletEntities(portletDefinition).iterator();
                while (entities.hasNext())
                {
                    PortletEntity entity = (PortletEntity) entities.next();
                    if(purgeEntityInfo)
                    {                     
                      entityAccess.removePortletEntity(entity);                    
                    }
                    entityAccess.removeFromCache(entity);                   
View Full Code Here

    {

        Iterator entities = entityAccess.getPortletEntities(portletDefinition).iterator();
        while (entities.hasNext())
        {
            PortletEntity entity = (PortletEntity) entities.next();
            try
            {
                windowAccess.removeWindows(entity);
                entityAccess.removePortletEntity(entity);
                String entityNodePath = MutablePortletEntity.PORTLET_ENTITY_ROOT + "/" + entity.getId();
                if (Preferences.userRoot().nodeExists(entityNodePath))
                {
                    Preferences.userRoot().node(entityNodePath).removeNode();
                }
            }
            catch (Exception e)
            {
                log.warn("Failed to delete preference node for PortletEntity: " + entity.getId());
            }

        }
    }
View Full Code Here

        PortletWindow portletWindow = windowAccessor.getPortletWindow(fragment);
        if (portletWindow == null)
        {
            throw new FailedToRetrievePortletWindow("Portlet Window creation failed for fragment: " + fragment.getId() + ", " + fragment.getName());
        }
        PortletEntity portletEntity = portletWindow.getPortletEntity();

        return portletWindow;
    }
View Full Code Here

        {
            JetspeedRequestContext context = (JetspeedRequestContext) getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
            if (null != context)
            {
                String entityID = "--NULL--";
                PortletEntity entity = portletWindow.getPortletEntity();
                if (entity != null)
                {
                    entityID = entity.getId().toString();
                }
                PortletApplicationEntity portletAppEntity = portletWindow.getPortletEntity()
                        .getPortletApplicationEntity();
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

                if (null != portletAppDef)
                {
                    value = context.getUserInfoMap(portletAppDef.getId());
View Full Code Here

TOP

Related Classes of org.apache.pluto.om.entity.PortletEntity

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.