com.anwrt.anycontent.plugins.core.repository.menu
Class EditItem
java.lang.Object
com.anwrt.anycontent.extensions.menu.Entry
com.anwrt.anycontent.plugins.core.repository.menu.EditItem
- public class EditItem
- extends Entry
Entry for display a edit item in a content menu
which could be disabled if the content is locked by another user.
|
Method Summary |
void |
configure(Configuration configuration)
At initialization time, this method is called to allow the class to
configure |
java.lang.Object[] |
getEntries(java.lang.String location,
java.util.Map objectModel,
ServiceManager manager,
java.util.Map parameters)
Generate an array of entries, separators and sub menus. |
void |
initialize()
Called at initialization time (after all components have been
configured). |
boolean |
isEmpty(java.lang.String location,
java.util.Map objectModel,
ServiceManager manager,
java.util.Map parameters)
Determines if the dynamic entry will return nothing. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EditItem
public EditItem()
configure
public void configure(Configuration configuration)
throws ConfigurationException
- Description copied from class:
Entry
- At initialization time, this method is called to allow the class to
configure
- Specified by:
configure in class Entry
- Parameters:
configuration - XML configuration from the plug file that declared
this entry
- Throws:
ConfigurationException
initialize
public void initialize()
- Description copied from class:
Entry
- Called at initialization time (after all components have been
configured).
You can use deploy values at this time if necessary to initialize your
component
- Specified by:
initialize in class Entry
isEmpty
public boolean isEmpty(java.lang.String location,
java.util.Map objectModel,
ServiceManager manager,
java.util.Map parameters)
- Description copied from class:
Entry
- Determines if the dynamic entry will return nothing.
This method determines if getEntries will be called;
Carefull, return false means an entry will exist! if not separators may
appears at unwanted places.
- Specified by:
isEmpty in class Entry
- Parameters:
location - The menu location (site, page...) see constants in
MenuManagerobjectModel - Cocoon object model, to give access to the request and
all others object,manager - The manager to retrieve for example the repository.parameters - A map containing parameters to sax items differently.
- Returns:
- true if the dynamic entry will return nothing (
getEntries
will not be called)
getEntries
public java.lang.Object[] getEntries(java.lang.String location,
java.util.Map objectModel,
ServiceManager manager,
java.util.Map parameters)
- Description copied from class:
Entry
- Generate an array of entries, separators and sub menus.
When you implement this method you can return 3 kind of objects:
-
inner class Item: for an entry
- inner class Menu: for a sub menu
(which can contains entries)
- inner class Separator for a separator
Item objects returned must be unique at each calls in order to prevent
concurrency problems (use Item copy constructor).
You should not return a separator at begining or at end of the array
(this could lead to menu starting by a separator). The separators between
your dynamic entry and other entries will be set in the global menu
configuration.
- Specified by:
getEntries in class Entry
- Parameters:
location - The menu location (site, page...) see constants in
MenuManagerobjectModel - Cocoon object model, to give access to the request and
all others object,manager - The manager to retrieve for example the repository.parameters - A map containing parameters to sax items differently.
- Returns:
- An array of Menu and Item. A separator is represented by a null
value.
Copyright © 2006 Anyware Technologies. All Rights Reserved.