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

    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

    {
        try
        {
            PortletDefinition pd = getPortletDefintion(request);
            String newId = request.getParameter("newEntityId");
            PortletEntity entity = null;
           
            if(newId != null)
            {
                entity = entityAccess.newPortletEntityInstance(pd, newId);
            }
View Full Code Here

        }
    }
   
    protected final void doAddPref(ActionRequest request, ActionResponse response) throws PortletException
    {
        PortletEntity entity = getPortletEntity(request);
        String newName = request.getParameter("newPreferenceName");
        if(newName == null || newName.length() < 1)
        {
            throw new PortletException("You must specify a name for a new preference.");
        }
       
        String[] newValues = request.getParameterValues("newPreferenceValue");
        if(newValues == null || newValues.length == 0)
        {
            throw new PortletException("You must specfiy a value for the new preference "+newName);
        }
       
        PreferenceSetComposite prefSet = (PreferenceSetComposite) entity.getPreferenceSet();
        prefSet.add(newName, Arrays.asList(newValues));
        try
        {
            entityAccess.storePortletEntity(entity);
        }
View Full Code Here

        }
    }
   
    protected final void doAddValue(ActionRequest request, ActionResponse response) throws PortletException
    {
        PortletEntity entity = getPortletEntity(request);
        String prefString= request.getParameter("selectedPref");
        String newValue = request.getParameter("newPrefValue");
        String prefName = prefString.split("::")[1];
        PreferenceComposite pref = (PreferenceComposite) entity.getPreferenceSet().get(prefName);
        pref.addValue(newValue);
    }
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

     * @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

        {
            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();
                }
                PortletApplicationDefinition portletAppDef = entity.getPortletDefinition()
                        .getPortletApplicationDefinition();

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

       
        if ( !resource )
        {
          if ( ! desktopRequestNotAjax )
            {
            PortletEntity pe = window.getPortletEntity();
            buffer.append( "?entity=" ).append( pe.getId() );
           
            PortletDefinition portlet = pe.getPortletDefinition();
            MutablePortletApplication app = (MutablePortletApplication)portlet.getPortletApplicationDefinition();
            String uniqueName = app.getName() + "::" + portlet.getName();
            buffer.append( "&portlet=" ).append( uniqueName );
            }
        }
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.