org.jasig.portal.portlets.portletadmin
Class PortletAdministrationHelper

java.lang.Object
  extended by org.jasig.portal.portlets.portletadmin.PortletAdministrationHelper
All Implemented Interfaces:
ServletContextAware

public class PortletAdministrationHelper
extends Object
implements ServletContextAware

Helper methods for the portlet administration workflow.

Author:
Jen Bourey, jbourey@unicon.net

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
PortletAdministrationHelper()
           
 
Method Summary
 void cleanOptions(ChannelDefinitionForm form, PortletRequest request)
           
 boolean configModeAction(org.springframework.webflow.context.ExternalContext externalContext, String fname)
           
 Set<ChannelLifecycleState> getAllowedLifecycleStates(IPerson person, List<JsonEntityBean> categories)
           
 Set<String> getArbitraryPortletPreferenceNames(ChannelDefinitionForm form)
          Get a list of the key names of the currently-set arbitrary portlet preferences.
 ChannelDefinitionForm getChannelDefinitionForm(int chanId)
          Construct a new ChannelDefinitionForm for the given IChannelDefinition id.
 ChannelLifecycleState[] getLifecycleStates()
           
 List<org.apache.pluto.internal.impl.PortletContextImpl> getPortletApplications()
          Retreive the list of portlet application contexts currently available in this portlet container.
 org.apache.pluto.descriptors.portlet.PortletDD getPortletDescriptor(ChannelDefinitionForm form)
          Get a portlet descriptor matching the current channel definition form.
protected  Tuple<String,String> getPortletDescriptorKeys(ChannelDefinitionForm form)
           
 boolean hasLifecyclePermission(IPerson person, ChannelLifecycleState state, List<JsonEntityBean> categories)
           
 boolean offerPortletSelection(ChannelDefinitionForm form)
           
 void prepopulatePortlet(String application, String portlet, ChannelDefinitionForm form)
          Pre-populate a ChannelDefinitionForm with portlet-specific information using the supplied portlet descriptor.
 void removePortletRegistration(int channelId, IPerson person)
          Delete the portlet with the given channel ID.
 ChannelDefinitionForm savePortletRegistration(ChannelDefinitionForm form, IPerson publisher)
          Persist a new or edited ChannelDefinition.
 void setChannelPublishingDefinitionDao(IChannelPublishingDefinitionDao channelPublishingDefinitionDao)
           
 void setChannelPublishingService(IChannelPublishingService channelPublishingService)
           
 void setChannelRegistryStore(IChannelRegistryStore channelRegistryStore)
          Set the channel registry store
 void setGroupListHelper(IGroupListHelper groupListHelper)
           
 void setOptionalContainerServices(org.apache.pluto.OptionalContainerServices optionalContainerServices)
           
 void setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefinitionRegistry)
           
 void setPortletDelegationLocator(PortletDelegationLocator portletDelegationLocator)
           
 void setServletContext(ServletContext servletContext)
           
 boolean supportsConfigMode(ChannelDefinitionForm form)
          If the channel is a portlet and if one of the supported portlet modes is IPortletAdaptor.CONFIG
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

PortletAdministrationHelper

public PortletAdministrationHelper()
Method Detail

setServletContext

public void setServletContext(ServletContext servletContext)
Specified by:
setServletContext in interface ServletContextAware

setPortletDelegationLocator

public void setPortletDelegationLocator(PortletDelegationLocator portletDelegationLocator)

setGroupListHelper

public void setGroupListHelper(IGroupListHelper groupListHelper)

setChannelRegistryStore

public void setChannelRegistryStore(IChannelRegistryStore channelRegistryStore)
Set the channel registry store

Parameters:
channelRegistryStore -

setOptionalContainerServices

public void setOptionalContainerServices(org.apache.pluto.OptionalContainerServices optionalContainerServices)

setChannelPublishingService

public void setChannelPublishingService(IChannelPublishingService channelPublishingService)

setChannelPublishingDefinitionDao

public void setChannelPublishingDefinitionDao(IChannelPublishingDefinitionDao channelPublishingDefinitionDao)

setPortletDefinitionRegistry

public void setPortletDefinitionRegistry(IPortletDefinitionRegistry portletDefinitionRegistry)

getChannelDefinitionForm

public ChannelDefinitionForm getChannelDefinitionForm(int chanId)
Construct a new ChannelDefinitionForm for the given IChannelDefinition id. If a ChannelDefinition matching this ID already exists, the form will be pre-populated with the ChannelDefinition's current configuration. If the ChannelDefinition does not yet exist, a new default form will be created.

Parameters:
chanId -
Returns:

savePortletRegistration

public ChannelDefinitionForm savePortletRegistration(ChannelDefinitionForm form,
                                                     IPerson publisher)
                                              throws Exception
Persist a new or edited ChannelDefinition.

Parameters:
form -
publisher -
Throws:
Exception

removePortletRegistration

public void removePortletRegistration(int channelId,
                                      IPerson person)
Delete the portlet with the given channel ID.

Parameters:
channelID - the channel ID
person - the person removing the channel

getArbitraryPortletPreferenceNames

public Set<String> getArbitraryPortletPreferenceNames(ChannelDefinitionForm form)
Get a list of the key names of the currently-set arbitrary portlet preferences.

Parameters:
form -
cpd -
Returns:

supportsConfigMode

public boolean supportsConfigMode(ChannelDefinitionForm form)
If the channel is a portlet and if one of the supported portlet modes is IPortletAdaptor.CONFIG


cleanOptions

public void cleanOptions(ChannelDefinitionForm form,
                         PortletRequest request)

getPortletApplications

public List<org.apache.pluto.internal.impl.PortletContextImpl> getPortletApplications()
Retreive the list of portlet application contexts currently available in this portlet container.

Returns:
list of portlet context

getPortletDescriptor

public org.apache.pluto.descriptors.portlet.PortletDD getPortletDescriptor(ChannelDefinitionForm form)
Get a portlet descriptor matching the current channel definition form. If the current form does not represent a portlet, the application or portlet name fields are blank, or the portlet description cannot be retrieved, the method will return null.

Parameters:
form -
Returns:

prepopulatePortlet

public void prepopulatePortlet(String application,
                               String portlet,
                               ChannelDefinitionForm form)
Pre-populate a ChannelDefinitionForm with portlet-specific information using the supplied portlet descriptor.

Parameters:
application -
portlet -
form -

getLifecycleStates

public ChannelLifecycleState[] getLifecycleStates()

getAllowedLifecycleStates

public Set<ChannelLifecycleState> getAllowedLifecycleStates(IPerson person,
                                                            List<JsonEntityBean> categories)

hasLifecyclePermission

public boolean hasLifecyclePermission(IPerson person,
                                      ChannelLifecycleState state,
                                      List<JsonEntityBean> categories)

configModeAction

public boolean configModeAction(org.springframework.webflow.context.ExternalContext externalContext,
                                String fname)
                         throws IOException
Throws:
IOException

offerPortletSelection

public boolean offerPortletSelection(ChannelDefinitionForm form)

getPortletDescriptorKeys

protected Tuple<String,String> getPortletDescriptorKeys(ChannelDefinitionForm form)


Copyright © 2010 Jasig. All Rights Reserved.