Examples of PortletEntity


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

       
        try {
            PortletContainerServices.prepare(uniqueContainerName);
           
            final PortletWindowImpl portletWindow = (PortletWindowImpl)cd.getPortletWindow();
            final PortletEntity portletEntity = portletWindow.getPortletEntity();
            final PortletDefinition portletDef = portletEntity.getPortletDefinition();
            final HttpServletRequest baseRequest = pcs.getHttpServletRequest();

            HttpServletRequest wrappedRequest = new ServletRequestImpl(baseRequest, sd.getPerson(), portletDef.getInitSecurityRoleRefSet());
           
            //Wrap the request to scope attributes to this portlet instance
View Full Code Here

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

    {
        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

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

        }
    }
   
    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

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

        }
    }
   
    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

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

        pref.addValue(newValue);
    }
   
    protected final void doRemovePref(ActionRequest request, ActionResponse response) throws PortletException
    {
        PortletEntity entity = getPortletEntity(request);
        String prefString= request.getParameter("selectedPref");
        String prefName = prefString.split("::")[1];
        ((PreferenceSetComposite)entity.getPreferenceSet()).remove(prefName);
       
    }
View Full Code Here

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

       
    }
   
    protected final void doUpdateValue(ActionRequest request, ActionResponse response) throws PortletException
    {
        PortletEntity entity = getPortletEntity(request);
        String prefString= request.getParameter("selectedPref");
        String updatedValue = request.getParameter("selectedPrefValue");
        if(updatedValue.trim().length() == 0)
        {
            throw new PortletException("Preference values cannot be empty.");
        }
        String[] info = prefString.split("::");
        String prefName = info[1];
        int valueIndex = Integer.parseInt(info[2]);
        PreferenceComposite pref = (PreferenceComposite) entity.getPreferenceSet().get(prefName);
        pref.setValueAt(valueIndex, updatedValue);
    }
View Full Code Here

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

        pref.setValueAt(valueIndex, updatedValue);
    }
   
    protected final void doRemoveValue(ActionRequest request, ActionResponse response) throws PortletException
    {
        PortletEntity entity = getPortletEntity(request);
        String prefString= request.getParameter("selectedPref");
        String[] info = prefString.split("::");
        String prefName = info[1];
        int valueIndex = Integer.parseInt(info[2]);
        PreferenceComposite pref = (PreferenceComposite) entity.getPreferenceSet().get(prefName);
        pref.removeValueAt(valueIndex);
    }
View Full Code Here

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

        {
            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

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 = windowAccess.getPortletWindow(f).getPortletEntity();
        // This API hits the DB: PortletEntity portletEntity = entityAccess.getPortletEntityForFragment(f);
        if (portletEntity == null)
        {
            try
            {
View Full Code Here

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

      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
TOP
Copyright © 2018 www.massapi.com. 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.