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
Modifier and TypeFieldDescriptionprotected List<Map<String,
CmsAttributeHandler>> The sub handlers. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the handler hierarchy.collectSimplePath
(I_CmsAttributeHandler childHandler) Returns the simple path.void
ensureHandlers
(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 void
initHandlers
(int count) Initializes the sub handlers maps for the given value count.void
insertHandlers
(int index) Inserts a handler map at the given index.void
removeHandlers
(int index) Removes the handlers at the given index.void
setHandler
(int index, String attributeName, CmsAttributeHandler handler) Sets a child attribute handler.void
setHandlerById
(String attributeName, CmsAttributeHandler handler) Sets the handler by id.void
visit
(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_CmsAttributeHandler
Returns the simple path.- Specified by:
collectSimplePath
in 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_CmsAttributeHandler
Returns the attribute name.- Specified by:
getAttributeName
in interfaceI_CmsAttributeHandler
- Returns:
- the attribute name
- See Also:
-
getChildHandler
Description copied from interface:I_CmsAttributeHandler
Returns the handler for the given attribute at the given index.- Specified by:
getChildHandler
in interfaceI_CmsAttributeHandler
- Parameters:
attributeName
- the attribute nameindex
- the value index- Returns:
- the handler
- See Also:
-
getChildHandlerBySimpleName
Description copied from interface:I_CmsAttributeHandler
Returns the child handler by simple name.- Specified by:
getChildHandlerBySimpleName
in 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_CmsAttributeHandler
Inserts a handler map at the given index.- Specified by:
insertHandlers
in interfaceI_CmsAttributeHandler
- Parameters:
index
- the value index- See Also:
-
removeHandlers
Description copied from interface:I_CmsAttributeHandler
Removes the handlers at the given index.- Specified by:
removeHandlers
in interfaceI_CmsAttributeHandler
- Parameters:
index
- the value index- See Also:
-
setHandler
Description copied from interface:I_CmsAttributeHandler
Sets a child attribute handler.- Specified by:
setHandler
in interfaceI_CmsAttributeHandler
- Parameters:
index
- the value indexattributeName
- the attribute namehandler
- the handler- See Also:
-
setHandlerById
Description copied from interface:I_CmsAttributeHandler
Sets the handler by id.- Specified by:
setHandlerById
in 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
-