public class WGTransientPortletRegistry extends WGPortletRegistry implements de.innovationgate.wga.common.ImmutableObject
| Modifier and Type | Class and Description |
|---|---|
class |
WGTransientPortletRegistry.RootPortletInformation |
| Constructor and Description |
|---|
WGTransientPortletRegistry(WGDatabase parent,
WGUserProfile profile) |
| Modifier and Type | Method and Description |
|---|---|
WGPortlet |
createPortlet(java.lang.String appDb,
WGPortlet parent)
Creates a new portlet object that is not yet registered.
|
java.lang.String |
getApplicationId(WGDatabase db)
Returns the string ID that should be passed to the methods of this portlet registry to identify the given database
|
java.util.List<WGPortlet> |
getChildPortlets(WGPortlet portlet)
Returns the child portlets for the given parent portlet
|
java.util.List<java.lang.String> |
getItemNames(WGPortlet portlet)
Returns the names of all portlet items for the given portlet
|
java.lang.Object |
getItemValue(WGPortlet portlet,
java.lang.String name)
Returns the value of a portlet item
|
WGPortlet |
getOrCreateRootPortlet(java.lang.String appDb)
Returns the root portlet for the database of the given dbkey.
|
WGPortlet |
getPortlet(java.lang.String appDb,
java.lang.String key)
Returns the portlet for the given key.
|
WGPortlet |
getPortletByName(java.lang.String appDb,
WGPortlet parentPortlet,
java.lang.String name)
Returns the portlet for the given name under the given parent portlet.
|
boolean |
hasItem(WGPortlet portlet,
java.lang.String name)
Tests if the given portlet has a portlet item of the given name
|
void |
insertPortlet(WGPortlet portlet)
Inserts a new portlet to the registry
|
boolean |
isTransient()
Returns if the registry is transient, and it is not to expect that a new request will reproduce once registered portlets
|
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.
|
void |
preSaveProfile(WGUserProfile profile)
Called immediately before a user profile is saved, so that the portlet registry may do some work necessary before saving
|
void |
removeItem(WGPortlet portlet,
java.lang.String name)
Removes a portlet item
|
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)
|
void |
setItemValue(WGPortlet portlet,
java.lang.String name,
java.lang.Object value)
Sets the value of a portlet item, eventually creating it
|
void |
updatePortlet(WGPortlet portlet)
Updates an already registered portlet with the information given in the parameter portlet object
|
clearItemspublic WGTransientPortletRegistry(WGDatabase parent, WGUserProfile profile)
public void insertPortlet(WGPortlet portlet) throws WGAPIException
WGPortletRegistryinsertPortlet in class WGPortletRegistryportlet - The portlet to insert. Must have been created via WGPortletRegistry.createPortlet(String, WGPortlet)WGAPIExceptionpublic WGPortlet getPortlet(java.lang.String appDb, java.lang.String key) throws WGAPIException
WGPortletRegistrygetPortlet in class WGPortletRegistryappDb - Dbkey of the current application databasekey - The portlet keyWGAPIExceptionpublic WGPortlet getPortletByName(java.lang.String appDb, WGPortlet parentPortlet, java.lang.String name) throws WGAPIException
WGPortletRegistrygetPortletByName in class WGPortletRegistryappDb - current application databaseparentPortlet - The parent portlet of the portlet to retrievename - The name of the portletWGAPIExceptionpublic void updatePortlet(WGPortlet portlet) throws WGAPIException
WGPortletRegistryupdatePortlet in class WGPortletRegistryportlet - The portlet object whose data is used to update the registrationWGAPIExceptionpublic void removePortlet(WGPortlet portlet) throws WGAPIException
WGPortletRegistryremovePortlet in class WGPortletRegistryportlet - The portlet to be removedWGAPIExceptionpublic WGPortlet getOrCreateRootPortlet(java.lang.String appDb) throws WGAPIException
WGPortletRegistrygetOrCreateRootPortlet in class WGPortletRegistryappDb - The database whose root portlet is to be retrievedWGAPIExceptionpublic void prepareNewProfile(WGUserProfile profile) throws WGAPIException
WGPortletRegistryprepareNewProfile in class WGPortletRegistryprofile - The new profileWGAPIExceptionpublic java.util.List<WGPortlet> getChildPortlets(WGPortlet portlet) throws WGAPIException
WGPortletRegistrygetChildPortlets in class WGPortletRegistryportlet - The parent portletWGAPIExceptionpublic WGPortlet createPortlet(java.lang.String appDb, WGPortlet parent)
WGPortletRegistryWGPortletRegistry.insertPortlet(WGPortlet) giving it as parameter.createPortlet in class WGPortletRegistryappDb - The application database of the portletparent - The parent of the portlet to be createdpublic boolean isTransient()
throws WGAPIException
WGPortletRegistryisTransient in class WGPortletRegistryWGAPIExceptionpublic void preSaveProfile(WGUserProfile profile) throws WGAPIException
WGPortletRegistrypreSaveProfile in class WGPortletRegistryWGAPIExceptionpublic java.util.List<java.lang.String> getItemNames(WGPortlet portlet) throws WGAPIException
WGPortletRegistrygetItemNames in class WGPortletRegistryportlet - The portletWGAPIExceptionpublic boolean hasItem(WGPortlet portlet, java.lang.String name) throws WGAPIException
WGPortletRegistryhasItem in class WGPortletRegistryportlet - The portletWGAPIExceptionpublic java.lang.Object getItemValue(WGPortlet portlet, java.lang.String name) throws WGAPIException
WGPortletRegistrygetItemValue in class WGPortletRegistryportlet - The portlet whose item is to be retrievedname - The name of the itemWGAPIExceptionpublic void setItemValue(WGPortlet portlet, java.lang.String name, java.lang.Object value) throws WGAPIException
WGPortletRegistrysetItemValue in class WGPortletRegistryportlet - The portlet whose item is to be setname - The name of the itemvalue - The value of the itemWGAPIExceptionpublic void removeItem(WGPortlet portlet, java.lang.String name) throws WGAPIException
WGPortletRegistryremoveItem in class WGPortletRegistryportlet - The portlet whose item is to be removedname - The name of the itemWGAPIExceptionpublic java.lang.String getApplicationId(WGDatabase db)
WGPortletRegistrygetApplicationId in class WGPortletRegistrydb - The application database