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
|
clearItems
public WGTransientPortletRegistry(WGDatabase parent, WGUserProfile profile)
public void insertPortlet(WGPortlet portlet) throws WGAPIException
WGPortletRegistry
insertPortlet
in class WGPortletRegistry
portlet
- The portlet to insert. Must have been created via WGPortletRegistry.createPortlet(String, WGPortlet)
WGAPIException
public WGPortlet getPortlet(java.lang.String appDb, java.lang.String key) throws WGAPIException
WGPortletRegistry
getPortlet
in class WGPortletRegistry
appDb
- Dbkey of the current application databasekey
- The portlet keyWGAPIException
public WGPortlet getPortletByName(java.lang.String appDb, WGPortlet parentPortlet, java.lang.String name) throws WGAPIException
WGPortletRegistry
getPortletByName
in class WGPortletRegistry
appDb
- current application databaseparentPortlet
- The parent portlet of the portlet to retrievename
- The name of the portletWGAPIException
public void updatePortlet(WGPortlet portlet) throws WGAPIException
WGPortletRegistry
updatePortlet
in class WGPortletRegistry
portlet
- The portlet object whose data is used to update the registrationWGAPIException
public void removePortlet(WGPortlet portlet) throws WGAPIException
WGPortletRegistry
removePortlet
in class WGPortletRegistry
portlet
- The portlet to be removedWGAPIException
public WGPortlet getOrCreateRootPortlet(java.lang.String appDb) throws WGAPIException
WGPortletRegistry
getOrCreateRootPortlet
in class WGPortletRegistry
appDb
- The database whose root portlet is to be retrievedWGAPIException
public void prepareNewProfile(WGUserProfile profile) throws WGAPIException
WGPortletRegistry
prepareNewProfile
in class WGPortletRegistry
profile
- The new profileWGAPIException
public java.util.List<WGPortlet> getChildPortlets(WGPortlet portlet) throws WGAPIException
WGPortletRegistry
getChildPortlets
in class WGPortletRegistry
portlet
- The parent portletWGAPIException
public WGPortlet createPortlet(java.lang.String appDb, WGPortlet parent)
WGPortletRegistry
WGPortletRegistry.insertPortlet(WGPortlet)
giving it as parameter.createPortlet
in class WGPortletRegistry
appDb
- The application database of the portletparent
- The parent of the portlet to be createdpublic boolean isTransient() throws WGAPIException
WGPortletRegistry
isTransient
in class WGPortletRegistry
WGAPIException
public void preSaveProfile(WGUserProfile profile) throws WGAPIException
WGPortletRegistry
preSaveProfile
in class WGPortletRegistry
WGAPIException
public java.util.List<java.lang.String> getItemNames(WGPortlet portlet) throws WGAPIException
WGPortletRegistry
getItemNames
in class WGPortletRegistry
portlet
- The portletWGAPIException
public boolean hasItem(WGPortlet portlet, java.lang.String name) throws WGAPIException
WGPortletRegistry
hasItem
in class WGPortletRegistry
portlet
- The portletWGAPIException
public java.lang.Object getItemValue(WGPortlet portlet, java.lang.String name) throws WGAPIException
WGPortletRegistry
getItemValue
in class WGPortletRegistry
portlet
- The portlet whose item is to be retrievedname
- The name of the itemWGAPIException
public void setItemValue(WGPortlet portlet, java.lang.String name, java.lang.Object value) throws WGAPIException
WGPortletRegistry
setItemValue
in class WGPortletRegistry
portlet
- The portlet whose item is to be setname
- The name of the itemvalue
- The value of the itemWGAPIException
public void removeItem(WGPortlet portlet, java.lang.String name) throws WGAPIException
WGPortletRegistry
removeItem
in class WGPortletRegistry
portlet
- The portlet whose item is to be removedname
- The name of the itemWGAPIException
public java.lang.String getApplicationId(WGDatabase db)
WGPortletRegistry
getApplicationId
in class WGPortletRegistry
db
- The application database