This is the primary interface for performing persistent store operations
on PortletDefinitions. In general this interface provides coarse grain
getters and fine grain setters.
It is important to note that all methods on this interface are fully internationalized and entitled. All titles and descriptions on the objects returned by these methods are internationalized to the preferred locale. Also, all methods are entitled, meaning if the caller does not have the required credentials the method may return a subset of the actual list or be unable to perform the specified function.
"Definitions" can be thought of as objects in the Library. Objects in the library are not associated to any one Desktop. In other words definitions can be placed on zero or more desktops and changes made in the Library (to the definitions) are cascaded down to object on the desktops. If you are only interested in effecting a single desktop then use thePortalCustomizationManager and
make changes to the "Instances".
PortletDefinitionManager
Method Summary |
public |
|
public |
|
public void |
|
public void |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public |
|
public void |
|
Method Detail |
publicPortletDefinitionclonePortletDefinition(CustomizationContextcustomizationContext,PortletDefinitionIdportletDefinitionId)
throwsRemoteException,ObjectNotFoundException,NotEntitledException
Clone an existing portlet definition and all of it's localization resources. The localization resources are slightly mutated with a '_' in front of them as to allow the administrator to distinguish from the original. Note: this method only clones the primary instance; any user instances derived from the original are not cloned.
RemoteException
ObjectNotFoundException
NotEntitledException
publicCreate a new portlet definition.PortletDefinitioncreatePortletDefinition(CustomizationContextcustomizationContext,PortletDefinitionportletDefinition)
throwsRemoteException,MissingDataException,NotEntitledException,DuplicateObjectException
RemoteException
MissingDataException
NotEntitledException
DuplicateObjectException
public void deletePortletDefinition(CustomizationContextcustomizationContext,PortletDefinitionIdportletDefinitionId)
throwsRemoteException,ObjectNotFoundException,ObjectInUseException,NotEntitledException
Delete a portlet definition, but only if it is not used by other portlet instances.
RemoteException
ObjectNotFoundException
ObjectInUseException
NotEntitledException
Related Topics
public void deletePortletDefinitionWithCascade(CustomizationContextcustomizationContext,PortletDefinitionIdportletDefinitionId)
throwsRemoteException,ObjectNotFoundException,NotEntitledException
Delete a portlet definition and all portlet instances associated with this definition.
RemoteException
ObjectNotFoundException
NotEntitledException
Related Topics
IPortletDefinitionManager.deletePortletDefinition(CustomizationContext, PortletDefinitionId)
publicPortletDefinitiongetPortletDefinition(CustomizationContextcustomizationContext,PortletDefinitionIdportletDefinitionId)
throwsRemoteException
Getter for returning a single PortletDefinition object given a supplied portlet
definition identifier.
PortletDefinition object fully populated and internationalized, otherwise,
null if the object does not exist. RemoteException
publicPortletDefinitiongetPortletDefinition(CustomizationContextcustomizationContext,StringdefinitionLabel,StringwebAppName)
throwsRemoteException
Getter for returning a single PortletDefinition by Label.
The webAppName name is the deployed name of the module, and is often the name of the WAR file
or directory, although this is not always the case. This name is that name given in config.xml as the
Name of the WebAppComponent element (and thus WebAppComponentMBean's Name attribute). Note that this
name is not the name of the URL context root.
PortletDefinition object fully populated and internationalized, otherwise,
null if the object does not exist. RemoteException
publicPortletDefinitiongetPortletDefinitionFromFile(CustomizationContextcustomizationContext,StringportletFile,StringwebAppName)
throwsRemoteException
Return a portlet definitions with the portletFile equal to the supplied portlet file. The webAppName name is the deployed name of the module, and is often the name of the WAR file or directory, although this is not always the case. This name is that name given in config.xml as the Name of the WebAppComponent element (and thus WebAppComponentMBean's Name attribute). Note that this name is not the name of the URL context root.
RemoteException
Related Topics
ApplicationHelper.getWebAppName(ServletContext)
publicPortletDefinition[] getPortletDefinitions(CustomizationContextcustomizationContext,Stringwebapp)
throwsRemoteException
Getter for returning a list of all PortletDefinitions scoped to the supplied webapp.
PortletDefinition objects if they exist, otherwise, an empty array. RemoteException
Related Topics
publicPortletDefinition[] getPortletDefinitions(CustomizationContextcustomizationContext,Stringwebapp,PortletDefinitionIdfirstPortletDefinitionId, int limit)
throwsRemoteException
Returns PortletDefinitions in definitionId order (create order). Starting
with the supplied definitionId and limiting the result set to size limit
If fewer PortletDefinitions exist than limit,
then a smaller result set will be returned. If no definitions are
found an empty array is returned.
To start at the beginning of the list specify null as the portletDefinitionId.
To retrieve from the end of the list and back specify null as the portletDefinitionId
and a negative limit.
To retrieve all the portletDefinitions in the database supply a limit of 0.
Implementation has to ensure that repeated calls to this
method return PortletDefinitions in a consistent
order.
PortletDefinitions no greater than limit in size. RemoteException
publicPortletViewgetPortletView(CustomizationContextcustomizationContext,PortletDefinitionIdportletDefinitionId)
throwsRemoteException
Getter for returning an immutable deep copy of a PortletView. The PortletView
object, unlike the PortletDefinition or the PortletInstance objects
contains a full set of references to all child portlets, portlets and so on. The
PortletView object however is immutable.
RemoteException
publicPortletDefinition[] searchPortletDefinitions(CustomizationContextcustomizationContext,Stringwebapp,StringpartialPortletTitle, int limit)
throwsRemoteException
Search for portlets given the supplied search string. Portlets with titles
matching the supplied pattern will be returned.
No more than limit results will be returned, however a smaller number may be
returned.
Implementation has to ensure that repeated calls to this
method return PortletDefinitions in a consistent
order.
PortletDefinitions no greater than limit in size. RemoteException
public void updatePortletDefinition(CustomizationContextcustomizationContext,PortletDefinitionportletDefinition)
throwsRemoteException,ObjectNotFoundException,NotEntitledException
Update the portlet definition with the new data.
RemoteException
ObjectNotFoundException
NotEntitledException