Package org.opencms.acacia.client.entity
Class CmsEntityBackend
java.lang.Object
org.opencms.acacia.client.entity.CmsEntityBackend
- All Implemented Interfaces:
I_CmsEntityBackend
The editor data back-end.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
changeEntityContentValues
(org.opencms.acacia.shared.CmsEntity original, org.opencms.acacia.shared.CmsEntity newContent) Changes the original entities content to the given new content.void
Clears all entities from VIE.org.opencms.acacia.shared.CmsEntity
createEntity
(String entityId, String entityType) Creates a new entity registering it within VIE.static org.opencms.acacia.shared.CmsEntity
createFromNativeWrapper
(com.google.gwt.core.client.JavaScriptObject entityWrapper) Method to create an entity object from a wrapped instance.org.opencms.acacia.shared.CmsType
createType
(String id) Creates a new type.List<com.google.gwt.dom.client.Element>
getAttributeElements
(String entityId, String attributeName, com.google.gwt.dom.client.Element context) Returns DOM elements displaying the given attribute's value.List<com.google.gwt.dom.client.Element>
getAttributeElements
(org.opencms.acacia.shared.CmsEntity entity, String attributeName, com.google.gwt.dom.client.Element context) Returns DOM elements displaying the given attribute's value.org.opencms.acacia.shared.CmsEntity
Returns the entity with the given id.static CmsEntityBackend
Returns the instance.org.opencms.acacia.shared.CmsType
Returns the type with the given id/name.org.opencms.acacia.shared.CmsEntity
registerEntity
(org.opencms.acacia.shared.CmsEntity entity) Registers the given entity within the VIE model.org.opencms.acacia.shared.CmsEntity
registerEntity
(org.opencms.acacia.shared.CmsEntity entity, boolean discardIds) Registers the given entity within the VIE model.void
registerTypes
(org.opencms.acacia.shared.CmsType type, Map<String, org.opencms.acacia.shared.CmsType> types) Registers the type and it's sub-types.void
removeEntity
(String entityId) Removes the given entity from VIE.protected List<com.google.gwt.dom.client.Element>
Returns a list of DOM elements matching the given selector.
-
Constructor Details
-
CmsEntityBackend
public CmsEntityBackend()Constructor.
-
-
Method Details
-
createFromNativeWrapper
public static org.opencms.acacia.shared.CmsEntity createFromNativeWrapper(com.google.gwt.core.client.JavaScriptObject entityWrapper) Method to create an entity object from a wrapped instance.- Parameters:
entityWrapper
- the wrappe entity- Returns:
- the entity
-
getInstance
Returns the instance.- Returns:
- the instance
-
clearEntities
Description copied from interface:I_CmsEntityBackend
Clears all entities from VIE.- Specified by:
clearEntities
in interfaceI_CmsEntityBackend
- See Also:
-
createEntity
Description copied from interface:I_CmsEntityBackend
Creates a new entity registering it within VIE.- Specified by:
createEntity
in interfaceI_CmsEntityBackend
- Parameters:
entityId
- the entity identityType
- the entity type- Returns:
- the new entity
- See Also:
-
createType
Description copied from interface:I_CmsEntityBackend
Creates a new type.- Specified by:
createType
in interfaceI_CmsEntityBackend
- Parameters:
id
- the type id/name- Returns:
- the new type
- See Also:
-
getAttributeElements
public List<com.google.gwt.dom.client.Element> getAttributeElements(String entityId, String attributeName, com.google.gwt.dom.client.Element context) Description copied from interface:I_CmsEntityBackend
Returns DOM elements displaying the given attribute's value.- Specified by:
getAttributeElements
in interfaceI_CmsEntityBackend
- Parameters:
entityId
- the entity id/subjectattributeName
- the attribute namecontext
- the context to search within- Returns:
- the elements
- See Also:
-
getEntity
Description copied from interface:I_CmsEntityBackend
Returns the entity with the given id.- Specified by:
getEntity
in interfaceI_CmsEntityBackend
- Parameters:
entityId
- the entity id- Returns:
- the entity
- See Also:
-
getType
Description copied from interface:I_CmsEntityBackend
Returns the type with the given id/name.- Specified by:
getType
in interfaceI_CmsEntityBackend
- Parameters:
id
- the type id/name- Returns:
- the type
- See Also:
-
removeEntity
Description copied from interface:I_CmsEntityBackend
Removes the given entity from VIE.- Specified by:
removeEntity
in interfaceI_CmsEntityBackend
- Parameters:
entityId
- the entity id- See Also:
-
select
protected List<com.google.gwt.dom.client.Element> select(String selector, com.google.gwt.dom.client.Element context) Returns a list of DOM elements matching the given selector.- Parameters:
selector
- the CSS selectorcontext
- the context element- Returns:
- the matching elements
-