Package org.apache.pluto.om.entity

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


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


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

    }
View Full Code Here

    {
        String title = null;
        RequestContext requestContext = (RequestContext) request
                .getAttribute(PortalReservedParameters.REQUEST_CONTEXT_ATTRIBUTE);
       
        PortletEntity entity = window.getPortletEntity();
        if (entity != null && entity.getPortletDefinition() != null)
        {
            title = requestContext.getPreferedLanguage(
                    entity.getPortletDefinition()).getTitle();
        }

        if (title == null && entity.getPortletDefinition() != null)
        {
            title = entity.getPortletDefinition().getName();
        }
        else if (title == null)
        {
            title = "Invalid portlet entity " + entity.getId();
        }
       
        return title;
    }
View Full Code Here

      Iterator      entities = entityAccess.getPortletEntities(portletDefinition)
                           .iterator();

      while (entities.hasNext())
      {
        PortletEntity entity = (PortletEntity) entities.next();

        if (purgeEntityInfo)
        {
          try
          {
            entityAccess.removePortletEntity(entity);
          }
          catch (PortletEntityNotDeletedException e)
          {
            String msg = "Failed to delete Portlet Entity " + entity.getId();
            log.error(msg, e);
            throw new RegistryException(msg, e);
          }
        }
View Full Code Here

            // fill portletEntitiesKeyObjectID
            Iterator portlets = appInst.getPortletEntityList().iterator();
            while (portlets.hasNext())
            {
                PortletEntity portletInst = (PortletEntity)portlets.next();                               
                portletEntitiesKeyObjectID.put(portletInst.getId().toString(), portletInst);

            }

        }
View Full Code Here

            throws Exception
    {
    super(id, config, parent, fragDesc, navigation);
        log = Log.getService().getLogger(getClass());
    String portletEntityId = getInitParameters().getString("portlet");
    PortletEntity portletEntity = PortletEntityRegistry.getPortletEntity(ObjectID.createFromString(portletEntityId));
    portletWindow = new PortletWindowImpl(getId());
    ((PortletWindowCtrl) portletWindow).setPortletEntity(portletEntity);
    PortletWindowList windowList = portletEntity.getPortletWindowList();
    ((PortletWindowListCtrl) windowList).add(portletWindow);
  }
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

    }

    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

    public void removePortletEntities( PortletDefinition portletDefinition ) throws PortletEntityNotDeletedException
    {
        Iterator entities = getPortletEntities(portletDefinition).iterator();
        while (entities.hasNext())
        {
            PortletEntity entity = (PortletEntity) entities.next();
            removePortletEntity(entity);
        }

    }
View Full Code Here

     * @throws PortletEntityNotStoredException
     * @throws FailedToRetrievePortletWindow
     */
    protected void initActionsForFragment(RequestContext requestContext, ContentFragment fragment, PageActionAccess pageActionAccess, Decoration decoration) throws FailedToRetrievePortletWindow, PortletEntityNotStoredException
    {
        PortletEntity portletEntity = windowAccessor.getPortletWindow(fragment).getPortletEntity();
        PortletDefinitionComposite portlet = (PortletDefinitionComposite) portletEntity.getPortletDefinition();
        Page page = requestContext.getPage();
       
        if (null == portlet)
        {
            return; // allow nothing
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.