Package org.apache.pluto.om.entity

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


     * which never participate with other portlets.
     *
     */   
    protected boolean isNonStandardAction(PortletWindow actionWindow)
    {
        PortletEntity entity = actionWindow.getPortletEntity();
        if (entity != null)
        {
            PortletDefinitionComposite portletDefinition = (PortletDefinitionComposite)entity.getPortletDefinition();
            if (portletDefinition != null)
            {
                Collection actionList = null;
       
                if (portletDefinition != null)
View Full Code Here


     * @throws InconsistentWindowStateException
     */
    protected void validateWindow( ContentFragment fragment, PortletWindow portletWindow ) throws FailedToRetrievePortletWindow, PortletEntityNotStoredException
    {
        // make sure the window has the most up-to-date portlet entity
        PortletEntity portletEntity = entityAccessor.getPortletEntityForFragment(fragment);
        if(portletEntity != null)
        {
            ((PortletWindowCtrl) portletWindow).setPortletEntity(portletEntity);
            // if not a valid entity, remove window from cache
            checkPortletWindowEntity(portletWindow);
View Full Code Here

     * @return The PortletEntity represented by the current fragment.
     * @throws Exception
     */
    public PortletEntity getPortletEntity(ContentFragment f) throws Exception
    {
        PortletEntity portletEntity = windowAccess.getPortletWindow(f).getPortletEntity();
        // This API hits the DB: PortletEntity portletEntity = entityAccess.getPortletEntityForFragment(f);
        if (portletEntity == null)
        {
            try
            {
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

    {
        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

        {
            throw new FailedToRetrievePortletWindow("Portlet Window creation failed for fragment: "
                                                    + fragment.getId() + ", " + fragment.getName());
        }

        PortletEntity portletEntity = portletWindow.getPortletEntity();
        ((MutablePortletEntity)portletEntity).setFragment(fragment);
       
        ((PortletWindowImpl) portletWindow).setInstantlyRendered(fragment.isInstantlyRendered());

        return portletWindow;
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

        if ( this.getLogger().isDebugEnabled() ) {
            this.getLogger().debug("Coplet " + coplet.getId() + " tries to login into portlet " + portletEntityId);
        }

        PortletApplicationEntity pae = registry.getPortletApplicationEntityList().get(ObjectIDImpl.createFromString("cocoon"));
        PortletEntity portletEntity = ((PortletEntityListImpl)pae.getPortletEntityList()).add(pae, portletEntityId, coplet, registry);

        if ( portletEntity.getPortletDefinition() != null ) {
            // create the window
            PortletWindow portletWindow = new PortletWindowImpl(portletEntityId);               
            ((PortletWindowCtrl)portletWindow).setId(coplet.getId());
            ((PortletWindowCtrl)portletWindow).setPortletEntity(portletEntity);
            PortletWindowList windowList = portletEntity.getPortletWindowList();       
            ((PortletWindowListCtrl)windowList).add(portletWindow);   
            coplet.setTemporaryAttribute("window", portletWindow);

            // load the portlet
            final Map objectModel = ContextHelper.getObjectModel(this.context);
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

            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

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.