public abstract class WGPortletRegistry
extends java.lang.Object
Constructor and Description |
---|
WGPortletRegistry() |
Modifier and Type | Method and Description |
---|---|
void |
clearItems(WGPortlet portlet)
Removes all portlet items for the given portlet
|
abstract WGPortlet |
createPortlet(java.lang.String appDb,
WGPortlet parent)
Creates a new portlet object that is not yet registered.
|
abstract java.lang.String |
getApplicationId(WGDatabase appDb)
Returns the string ID that should be passed to the methods of this portlet registry to identify the given database
|
abstract java.util.List<WGPortlet> |
getChildPortlets(WGPortlet portlet)
Returns the child portlets for the given parent portlet
|
abstract java.util.List<java.lang.String> |
getItemNames(WGPortlet portlet)
Returns the names of all portlet items for the given portlet
|
abstract java.lang.Object |
getItemValue(WGPortlet portlet,
java.lang.String name)
Returns the value of a portlet item
|
abstract WGPortlet |
getOrCreateRootPortlet(java.lang.String appDb)
Returns the root portlet for the database of the given dbkey.
|
abstract WGPortlet |
getPortlet(java.lang.String appDb,
java.lang.String key)
Returns the portlet for the given key.
|
abstract WGPortlet |
getPortletByName(java.lang.String appDb,
WGPortlet parentPortlet,
java.lang.String name)
Returns the portlet for the given name under the given parent portlet.
|
abstract boolean |
hasItem(WGPortlet portlet,
java.lang.String name)
Tests if the given portlet has a portlet item of the given name
|
abstract void |
insertPortlet(WGPortlet portlet)
Inserts a new portlet to the registry
|
abstract boolean |
isTransient()
Returns if the registry is transient, and it is not to expect that a new request will reproduce once registered portlets
|
abstract void |
prepareNewProfile(WGUserProfile profile)
Takes a newly created user profile to do some eventually neccessary initialisations on it
This is called on each new user profile so the registry has a chance to initialise it if neccessary.
|
abstract void |
preSaveProfile(WGUserProfile profile)
Called immediately before a user profile is saved, so that the portlet registry may do some work necessary before saving
|
abstract void |
removeItem(WGPortlet portlet,
java.lang.String name)
Removes a portlet item
|
abstract void |
removePortlet(WGPortlet portlet)
Removes the portlet of the given key from registry
This method should:
Remove all items registered for this portlet
Remove the registration of the portlet from portlet registry
Remove all child portlets the same way that this portlet was removed (including items and their child portlets)
|
abstract void |
setItemValue(WGPortlet portlet,
java.lang.String name,
java.lang.Object value)
Sets the value of a portlet item, eventually creating it
|
abstract void |
updatePortlet(WGPortlet portlet)
Updates an already registered portlet with the information given in the parameter portlet object
|
public abstract void insertPortlet(WGPortlet portlet) throws WGAPIException
portlet
- The portlet to insert. Must have been created via createPortlet(String, WGPortlet)
WGAPIException
public abstract WGPortlet getPortlet(java.lang.String appDb, java.lang.String key) throws WGAPIException
appDb
- Dbkey of the current application databasekey
- The portlet keyWGAPIException
public abstract WGPortlet getPortletByName(java.lang.String appDb, WGPortlet parentPortlet, java.lang.String name) throws WGAPIException
appDb
- current application databaseparentPortlet
- The parent portlet of the portlet to retrievename
- The name of the portletWGAPIException
public abstract void updatePortlet(WGPortlet portlet) throws WGAPIException
portlet
- The portlet object whose data is used to update the registrationWGAPIException
public abstract void removePortlet(WGPortlet portlet) throws WGAPIException
portlet
- The portlet to be removedWGAPIException
public abstract WGPortlet getOrCreateRootPortlet(java.lang.String appDb) throws WGAPIException
appDb
- The database whose root portlet is to be retrievedWGAPIException
public abstract void prepareNewProfile(WGUserProfile profile) throws WGAPIException
profile
- The new profileWGAPIException
public abstract void preSaveProfile(WGUserProfile profile) throws WGAPIException
profile
- WGAPIException
public abstract java.util.List<WGPortlet> getChildPortlets(WGPortlet portlet) throws WGAPIException
portlet
- The parent portletWGAPIException
public abstract java.util.List<java.lang.String> getItemNames(WGPortlet portlet) throws WGAPIException
portlet
- The portletWGAPIException
public abstract boolean hasItem(WGPortlet portlet, java.lang.String name) throws WGAPIException
portlet
- The portletWGAPIException
public abstract java.lang.Object getItemValue(WGPortlet portlet, java.lang.String name) throws WGAPIException
portlet
- The portlet whose item is to be retrievedname
- The name of the itemWGAPIException
public abstract void setItemValue(WGPortlet portlet, java.lang.String name, java.lang.Object value) throws WGAPIException
portlet
- The portlet whose item is to be setname
- The name of the itemvalue
- The value of the itemWGAPIException
public abstract void removeItem(WGPortlet portlet, java.lang.String name) throws WGAPIException
portlet
- The portlet whose item is to be removedname
- The name of the itemWGAPIException
public abstract boolean isTransient() throws WGAPIException
WGAPIException
public void clearItems(WGPortlet portlet) throws WGAPIException
portlet
- The portlet whose items are to be clearedWGAPIException
public abstract WGPortlet createPortlet(java.lang.String appDb, WGPortlet parent)
insertPortlet(WGPortlet)
giving it as parameter.appDb
- The application database of the portletparent
- The parent of the portlet to be createdpublic abstract java.lang.String getApplicationId(WGDatabase appDb)
appDb
- The application database