PortletDefinitionManagerImpl Class

com.bea.netuix.application.manager.persistence.jdbc
PortletDefinitionManagerImpl Class

public class PortletDefinitionManagerImpl

    extends Object
    implements IPortletDefinitionManager, SessionBean

Hierarchy
Object
  PortletDefinitionManagerImpl
All Implemented Interfaces

EnterpriseBean, IPortletDefinitionManager, Serializable, SessionBean

Field Summary

protected static Debug
debug
Debug
 

Constructor Summary

PortletDefinitionManagerImpl()

 

Method Summary

public PortletDefinition
clonePortletDefinition(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)

Clone an existing portlet definition and all of it's localization resources.

public PortletDefinition
createPortletDefinition(CustomizationContext customizationContext, PortletDefinition portletDefinition)
Create a new portlet definition.
public void
deletePortletDefinition(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)

Delete a portlet definition, but only if it is not used byt other portlet instances.

public void
deletePortletDefinitionWithCascade(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)

Delete a portlet definition and all portlet instances associated with this definition.

public void
ejbActivate()
public void
ejbCreate()
public void
ejbPassivate()
public void
ejbRemove()
public PortletDefinition
getPortletDefinition(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)

Getter for returning a single PortletDefinition object given a supplied portlet definition identifier.

public PortletDefinition
getPortletDefinition(CustomizationContext customizationContext, String label, String webAppName)

Getter for returning a single PortletDefinition by Label.

public PortletDefinition
getPortletDefinitionFromFile(CustomizationContext customizationContext, String portletFile, String webAppName)

Return a portlet definitions with the portletFile equal to the supplied portlet file.

public PortletDefinition[]
getPortletDefinitions(CustomizationContext customizationContext, String webapp)

Getter for returning a list of all PortletDefinitions scoped to the supplied webapp.

public PortletDefinition[]
getPortletDefinitions(CustomizationContext customizationContext, String webapp, PortletDefinitionId firstPortletDefinitionId, int limit)

Returns PortletDefinitions in definitionId order (create order).

public PortletView
getPortletView(CustomizationContext customizationContext, PortletDefinitionId portletDefinitionId)

Getter for returning an immutable deep copy of a PortletView.

public PortletDefinition[]
searchPortletDefinitions(CustomizationContext customizationContext, String webapp, String partialPortletTitle, int limit)

Search for portlets given the supplied search string.

public void
setSessionContext(SessionContext sessionContext)
public void
updatePortletDefinition(CustomizationContext customizationContext, PortletDefinition portletDefinition)

Update the portlet definition with the new data.

 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from class com.bea.netuix.application.manager.IPortletDefinitionManager
clonePortletDefinition, createPortletDefinition, deletePortletDefinition, deletePortletDefinitionWithCascade, getPortletDefinition, getPortletDefinition, getPortletDefinitionFromFile, getPortletDefinitions, getPortletDefinitions, getPortletView, searchPortletDefinitions, updatePortletDefinition
 
Methods from class javax.ejb.SessionBean
ejbActivate, ejbPassivate, ejbRemove, setSessionContext
 

Field Detail

debug

protected static Debug debug

 

Constructor Detail

PortletDefinitionManagerImpl

public PortletDefinitionManagerImpl()
 

Method Detail

clonePortletDefinition(CustomizationContext, PortletDefinitionId) Method

public PortletDefinition clonePortletDefinition(CustomizationContext customizationContext, 
                                                PortletDefinitionId portletDefinitionId)
throws RemoteException, ObjectNotFoundException, NotEntitledException
Description copied from IPortletDefinitionManager.clonePortletDefinition(CustomizationContext, PortletDefinitionId)

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 distingish from the original. Note: this method only clones the primary instance, any user instances derived from the original are not cloned.

Parameters

customizationContext
customization information such as prefered locales
portletDefinitionId
the id of the portlet definition to clone

Returns

a fully populated portlet definition object

Exceptions

RemoteException
ObjectNotFoundException
NotEntitledException

createPortletDefinition(CustomizationContext, PortletDefinition) Method

public PortletDefinition createPortletDefinition(CustomizationContext customizationContext, 
                                                 PortletDefinition portletDefinition)
throws RemoteException, MissingDataException, NotEntitledException, DuplicateObjectException
Description copied from IPortletDefinitionManager.createPortletDefinition(CustomizationContext, PortletDefinition)
Create a new portlet definition.

Parameters

customizationContext
customization information such as prefered locales
portletDefinition
the object containing the data to create the new portlet definition with.

Returns

a fully populated portlet definition object

Exceptions

RemoteException
MissingDataException
NotEntitledException
DuplicateObjectException

deletePortletDefinition(CustomizationContext, PortletDefinitionId) Method

public void deletePortletDefinition(CustomizationContext customizationContext, 
                                    PortletDefinitionId portletDefinitionId)
throws RemoteException, ObjectNotFoundException, ObjectInUseException, NotEntitledException
Description copied from IPortletDefinitionManager.deletePortletDefinition(CustomizationContext, PortletDefinitionId)

Delete a portlet definition, but only if it is not used byt other portlet instances.

Parameters

customizationContext
customization information such as prefered locales
portletDefinitionId
the id of the portlet definition to delete.

Exceptions

RemoteException
ObjectNotFoundException
ObjectInUseException
NotEntitledException

deletePortletDefinitionWithCascade(CustomizationContext, PortletDefinitionId) Method

public void deletePortletDefinitionWithCascade(CustomizationContext customizationContext, 
                                               PortletDefinitionId portletDefinitionId)
throws RemoteException, ObjectNotFoundException, NotEntitledException
Description copied from IPortletDefinitionManager.deletePortletDefinitionWithCascade(CustomizationContext, PortletDefinitionId)

Delete a portlet definition and all portlet instances associated with this definition.

Parameters

customizationContext
customization information such as prefered locales
portletDefinitionId
the id of the portlet definition to delete.

Exceptions

RemoteException
ObjectNotFoundException
NotEntitledException

ejbActivate() Method

public void ejbActivate()
throws EJBException, RemoteException

Exceptions

EJBException
RemoteException

ejbCreate() Method

public void ejbCreate()
throws CreateException, RemoteException

Exceptions

CreateException
RemoteException

ejbPassivate() Method

public void ejbPassivate()
throws EJBException, RemoteException

Exceptions

EJBException
RemoteException

ejbRemove() Method

public void ejbRemove()
throws EJBException, RemoteException

Exceptions

EJBException
RemoteException

getPortletDefinition(CustomizationContext, PortletDefinitionId) Method

public PortletDefinition getPortletDefinition(CustomizationContext customizationContext, 
                                              PortletDefinitionId portletDefinitionId)
throws RemoteException
Description copied from IPortletDefinitionManager.getPortletDefinition(CustomizationContext, PortletDefinitionId)

Getter for returning a single PortletDefinition object given a supplied portlet definition identifier.

Parameters

customizationContext
customization information such as prefered locales
portletDefinitionId
the unique portlet definition identifier.

Returns

a PortletDefinition object fully populated and internationalized, otherwise, null if the object does not exist.

Exceptions

RemoteException

getPortletDefinition(CustomizationContext, String, String) Method

public PortletDefinition getPortletDefinition(CustomizationContext customizationContext, 
                                              String label, 
                                              String webAppName)
throws RemoteException
Description copied from IPortletDefinitionManager.getPortletDefinition(CustomizationContext, String, String)

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.

Parameters

customizationContext
customization information such as prefered locales
label
the unique definitionLabel for the portlet. this is an optional label that the developer can set.
webAppName
the webapp this portlet is scoped to.

Returns

a PortletDefinition object fully populated and internationalized, otherwise, null if the object does not exist.

Exceptions

RemoteException

getPortletDefinitionFromFile(CustomizationContext, String, String) Method

public PortletDefinition getPortletDefinitionFromFile(CustomizationContext customizationContext, 
                                                      String portletFile, 
                                                      String webAppName)
throws RemoteException
Description copied from IPortletDefinitionManager.getPortletDefinitionFromFile(CustomizationContext, String, String)

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.

Returns

a portlet definition, if no portlet matched then null

Exceptions

RemoteException

getPortletDefinitions(CustomizationContext, String) Method

public PortletDefinition[] getPortletDefinitions(CustomizationContext customizationContext, 
                                               String webapp)
throws RemoteException
Description copied from IPortletDefinitionManager.getPortletDefinitions(CustomizationContext, String)

Getter for returning a list of all PortletDefinitions scoped to the supplied webapp.

Parameters

customizationContext
customization information such as prefered locales
webapp
the web application these portlet definitions are scoped to.

Returns

an array of PortletDefinition objects if they exist, otherwise, an empty array.

Exceptions

RemoteException

getPortletDefinitions(CustomizationContext, String, PortletDefinitionId, int) Method

public PortletDefinition[] getPortletDefinitions(CustomizationContext customizationContext, 
                                               String webapp, 
                                               PortletDefinitionId firstPortletDefinitionId, 
                                               int limit)
throws RemoteException
Description copied from IPortletDefinitionManager.getPortletDefinitions(CustomizationContext, String, PortletDefinitionId, int)

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.

Parameters

customizationContext
customization information such as preferred locales.
webapp
the web application these portlet definitions are scoped to.
firstPortletDefinitionId
optional parameter to indicate where the list should start.
limit
the maximum result set size. Note the limit may be negative indicating a reverse sort order. For all the records specify a limit of zero. Note: some elements may be pruned because of entitlements.

Returns

array of PortletDefinitions no greater than limit in size.

Exceptions

RemoteException

getPortletView(CustomizationContext, PortletDefinitionId) Method

public PortletView getPortletView(CustomizationContext customizationContext, 
                                  PortletDefinitionId portletDefinitionId)
Description copied from IPortletDefinitionManager.getPortletView(CustomizationContext, PortletDefinitionId)

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.

Parameters

customizationContext
customization information such as prefered locales
portletDefinitionId
the unique portletDefinitionId.

Returns

an immutable deep copy PortletView object if one exist, otherwise null.

searchPortletDefinitions(CustomizationContext, String, String, int) Method

public PortletDefinition[] searchPortletDefinitions(CustomizationContext customizationContext, 
                                                  String webapp, 
                                                  String partialPortletTitle, 
                                                  int limit)
throws RemoteException
Description copied from IPortletDefinitionManager.searchPortletDefinitions(CustomizationContext, String, String, int)

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.

Parameters

customizationContext
customization information such as preferred locales.
webapp
the web application these portlet definitions are scoped to.
partialPortletTitle
the search string for portlet title match. Note: this string may contain special '*' and '?' characters, where '*' matches any characters and '?' matches any single character.
limit
the maximum result set size. Note the limit may be negative indicating a reverse sort order. For all the records specify a limit of zero. Note: some elements may be pruned because of entitlements.

Returns

array of PortletDefinitions no greater than limit in size.

Exceptions

RemoteException

setSessionContext(SessionContext) Method

public void setSessionContext(SessionContext sessionContext)
throws EJBException, RemoteException

Exceptions

EJBException
RemoteException

updatePortletDefinition(CustomizationContext, PortletDefinition) Method

public void updatePortletDefinition(CustomizationContext customizationContext, 
                                    PortletDefinition portletDefinition)
throws RemoteException, ObjectNotFoundException, NotEntitledException
Description copied from IPortletDefinitionManager.updatePortletDefinition(CustomizationContext, PortletDefinition)

Update the portlet definition with the new data.

Parameters

customizationContext
customization information such as prefered locales
portletDefinition
the portlet definition containing the new data

Exceptions

RemoteException
ObjectNotFoundException
NotEntitledException