Package ch.tocco.nice2.model.menu.api
Class AbstractMenuItemReader<T extends MenuItem>
java.lang.Object
ch.tocco.nice2.model.menu.api.AbstractMenuItemReader<T>
- Direct Known Subclasses:
ActionMenuReader,AdminMenuReader,EntityExplorerReader,FlowReader
Abstract implementation for every menu item reader. If you are interested
in adding a new kind of menu items, please look in the wiki. It is described
there.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected ItemReaderContextprotected DisplayValueFactoryprotected Stringprotected ItemFactoryprotected DisplayValueprotected MenuItemLabelFactoryprotected Tprotected Stringprotected Stringprotected booleanprotected booleanprotected intprotected Stringprotected AdminMenuReceiver -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractMenuItemReader(String menuType, MenuItemLabelFactory labelFactory, ItemFactory itemFactory, DisplayValueFactory displayValueFactory, AdminMenuReceiver receiver) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidvoidfinished()Called when the element is finished when item already existsprotected abstract TgetImpl()voidsetAlwaysShowOldClient(boolean alwaysShowOldClient) voidsetExtIcon(String extIcon) voidvoidsetNewClientDisabled(boolean disabled) voidsetOldClientDisabled(boolean disabled) voidsetPosition(int position) voidsetReactIcon(String reactIcon) Because we don't know what our children are, we just handle any sub-element and ask theItemFactorybzw.
-
Field Details
-
receiver
-
displayValueFactory
-
itemFactory
-
labelFactory
-
ctx
-
name
-
label
-
extIcon
-
reactIcon
-
position
protected int position -
oldClientDisabled
protected boolean oldClientDisabled -
newClientDisabled
protected boolean newClientDisabled -
alwaysShowOldClient
protected boolean alwaysShowOldClient
-
-
Constructor Details
-
Method Details
-
setName
-
setPosition
-
setExtIcon
-
setReactIcon
-
setOldClientDisabled
-
setNewClientDisabled
-
setAlwaysShowOldClient
@Attribute("always-show-old-client") public void setAlwaysShowOldClient(boolean alwaysShowOldClient) -
tag
@AnyElement @Cardinality(min=0, max=2147483647) public Object tag(@ElementName String tagName) throws ModelBuildException Because we don't know what our children are, we just handle any sub-element and ask theItemFactorybzw. theItemReaderContextfor the reader.- Parameters:
tagName- the sub-tag- Returns:
- a reader for this tag if found in any case
- Throws:
ModelBuildException
-
getImpl
-
getInterface
-
finished
Called when the element is finished when item already exists- Throws:
ModelBuildException
-
beforeFinish
- Throws:
ModelBuildException
-
afterFinish
- Throws:
ModelBuildException
-