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 |
publicPortletDefinition
clonePortletDefinition(CustomizationContext
customizationContext,PortletDefinitionId
portletDefinitionId)
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.PortletDefinition
createPortletDefinition(CustomizationContext
customizationContext,PortletDefinition
portletDefinition)
throwsRemoteException
,MissingDataException
,NotEntitledException
,DuplicateObjectException
RemoteException
MissingDataException
NotEntitledException
DuplicateObjectException
public void deletePortletDefinition(CustomizationContext
customizationContext,PortletDefinitionId
portletDefinitionId)
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(CustomizationContext
customizationContext,PortletDefinitionId
portletDefinitionId)
throwsRemoteException
,ObjectNotFoundException
,NotEntitledException
Delete a portlet definition and all portlet instances associated with this definition.
RemoteException
ObjectNotFoundException
NotEntitledException
Related Topics
IPortletDefinitionManager.deletePortletDefinition(CustomizationContext, PortletDefinitionId)
publicPortletDefinition
getPortletDefinition(CustomizationContext
customizationContext,PortletDefinitionId
portletDefinitionId)
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
publicPortletDefinition
getPortletDefinition(CustomizationContext
customizationContext,String
definitionLabel,String
webAppName)
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
publicPortletDefinition
getPortletDefinitionFromFile(CustomizationContext
customizationContext,String
portletFile,String
webAppName)
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(CustomizationContext
customizationContext,String
webapp)
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(CustomizationContext
customizationContext,String
webapp,PortletDefinitionId
firstPortletDefinitionId, int limit)
throwsRemoteException
Returns PortletDefinition
s in definitionId
order (create order). Starting
with the supplied definitionId and limiting the result set to size limit
If fewer PortletDefinition
s 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 PortletDefinition
s in a consistent
order.
PortletDefinition
s no greater than limit
in size. RemoteException
publicPortletView
getPortletView(CustomizationContext
customizationContext,PortletDefinitionId
portletDefinitionId)
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(CustomizationContext
customizationContext,String
webapp,String
partialPortletTitle, 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 PortletDefinition
s in a consistent
order.
PortletDefinition
s no greater than limit
in size. RemoteException
public void updatePortletDefinition(CustomizationContext
customizationContext,PortletDefinition
portletDefinition)
throwsRemoteException
,ObjectNotFoundException
,NotEntitledException
Update the portlet definition with the new data.
RemoteException
ObjectNotFoundException
NotEntitledException