Package org.opencms.acacia.client
Class CmsRootHandler
java.lang.Object
org.opencms.acacia.client.CmsRootHandler
- All Implemented Interfaces:
I_CmsAttributeHandler
- Direct Known Subclasses:
CmsAttributeHandler
The root attribute handler.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<Map<String, CmsAttributeHandler>> The sub handlers. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears the handler hierarchy.collectSimplePath(I_CmsAttributeHandler childHandler) Returns the simple path.voidensureHandlers(int index) Ensures attribute handler maps are available up to the specified index.Returns the attribute name.getChildHandler(String attributeName, int index) Returns the handler for the given attribute at the given index.getChildHandlerBySimpleName(String name, int index) Returns the child handler by simple name.getHandlerById(String entityId, String attributeName) Returns the handler for the given id.getHandlerByPath(String[] pathNames) Returns the attribute handler for the given path.getHandlersBySimplePath(String[] pathNames) Returns the attribute handler to the given simple path.protected voidinitHandlers(int count) Initializes the sub handlers maps for the given value count.voidinsertHandlers(int index) Inserts a handler map at the given index.voidremoveHandlers(int index) Removes the handlers at the given index.voidsetHandler(int index, String attributeName, CmsAttributeHandler handler) Sets a child attribute handler.voidsetHandlerById(String attributeName, CmsAttributeHandler handler) Sets the handler by id.voidvisit(Consumer<I_CmsAttributeHandler> handler) Recruses over all child handlers of this handler and passes them to a callback.
-
Field Details
-
m_handlers
The sub handlers.
-
-
Constructor Details
-
CmsRootHandler
public CmsRootHandler()Constructor.
-
-
Method Details
-
clearHandlers
Clears the handler hierarchy. -
collectSimplePath
Description copied from interface:I_CmsAttributeHandlerReturns the simple path.- Specified by:
collectSimplePathin interfaceI_CmsAttributeHandler- Parameters:
childHandler- the child attribute handler- Returns:
- the simple path
- See Also:
-
ensureHandlers
Ensures attribute handler maps are available up to the specified index.This is required during inline editing, where only a fragment of the handlers data structure is build and used.
- Parameters:
index- the index of the currently edited attribute
-
getAttributeName
Description copied from interface:I_CmsAttributeHandlerReturns the attribute name.- Specified by:
getAttributeNamein interfaceI_CmsAttributeHandler- Returns:
- the attribute name
- See Also:
-
getChildHandler
Description copied from interface:I_CmsAttributeHandlerReturns the handler for the given attribute at the given index.- Specified by:
getChildHandlerin interfaceI_CmsAttributeHandler- Parameters:
attributeName- the attribute nameindex- the value index- Returns:
- the handler
- See Also:
-
getChildHandlerBySimpleName
Description copied from interface:I_CmsAttributeHandlerReturns the child handler by simple name.- Specified by:
getChildHandlerBySimpleNamein interfaceI_CmsAttributeHandler- Parameters:
name- the nameindex- the value index- Returns:
- the child handler if present
- See Also:
-
getHandlerById
Returns the handler for the given id.- Parameters:
entityId- the entity idattributeName- the attribute name- Returns:
- the handler
-
getHandlerByPath
Returns the attribute handler for the given path.- Parameters:
pathNames- the path names- Returns:
- the attribute handler
-
getHandlersBySimplePath
Returns the attribute handler to the given simple path.- Parameters:
pathNames- the simple path elements- Returns:
- the attribute handler
-
insertHandlers
Description copied from interface:I_CmsAttributeHandlerInserts a handler map at the given index.- Specified by:
insertHandlersin interfaceI_CmsAttributeHandler- Parameters:
index- the value index- See Also:
-
removeHandlers
Description copied from interface:I_CmsAttributeHandlerRemoves the handlers at the given index.- Specified by:
removeHandlersin interfaceI_CmsAttributeHandler- Parameters:
index- the value index- See Also:
-
setHandler
Description copied from interface:I_CmsAttributeHandlerSets a child attribute handler.- Specified by:
setHandlerin interfaceI_CmsAttributeHandler- Parameters:
index- the value indexattributeName- the attribute namehandler- the handler- See Also:
-
setHandlerById
Description copied from interface:I_CmsAttributeHandlerSets the handler by id.- Specified by:
setHandlerByIdin interfaceI_CmsAttributeHandler- Parameters:
attributeName- the attribute namehandler- the handler- See Also:
-
visit
Recruses over all child handlers of this handler and passes them to a callback.- Parameters:
handler- the handler whose child handlers should be processed
-
initHandlers
Initializes the sub handlers maps for the given value count.- Parameters:
count- the value count
-