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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeEntityContentValues(org.opencms.acacia.shared.CmsEntity original, org.opencms.acacia.shared.CmsEntity newContent) Changes the original entities content to the given new content.voidClears all entities from VIE.org.opencms.acacia.shared.CmsEntitycreateEntity(String entityId, String entityType) Creates a new entity registering it within VIE.static org.opencms.acacia.shared.CmsEntitycreateFromNativeWrapper(com.google.gwt.core.client.JavaScriptObject entityWrapper) Method to create an entity object from a wrapped instance.org.opencms.acacia.shared.CmsTypecreateType(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.CmsEntityReturns the entity with the given id.static CmsEntityBackendReturns the instance.org.opencms.acacia.shared.CmsTypeReturns the type with the given id/name.org.opencms.acacia.shared.CmsEntityregisterEntity(org.opencms.acacia.shared.CmsEntity entity) Registers the given entity within the VIE model.org.opencms.acacia.shared.CmsEntityregisterEntity(org.opencms.acacia.shared.CmsEntity entity, boolean discardIds) Registers the given entity within the VIE model.voidregisterTypes(org.opencms.acacia.shared.CmsType type, Map<String, org.opencms.acacia.shared.CmsType> types) Registers the type and it's sub-types.voidremoveEntity(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_CmsEntityBackendClears all entities from VIE.- Specified by:
clearEntitiesin interfaceI_CmsEntityBackend- See Also:
-
createEntity
Description copied from interface:I_CmsEntityBackendCreates a new entity registering it within VIE.- Specified by:
createEntityin interfaceI_CmsEntityBackend- Parameters:
entityId- the entity identityType- the entity type- Returns:
- the new entity
- See Also:
-
createType
Description copied from interface:I_CmsEntityBackendCreates a new type.- Specified by:
createTypein 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_CmsEntityBackendReturns DOM elements displaying the given attribute's value.- Specified by:
getAttributeElementsin 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_CmsEntityBackendReturns the entity with the given id.- Specified by:
getEntityin interfaceI_CmsEntityBackend- Parameters:
entityId- the entity id- Returns:
- the entity
- See Also:
-
getType
Description copied from interface:I_CmsEntityBackendReturns the type with the given id/name.- Specified by:
getTypein interfaceI_CmsEntityBackend- Parameters:
id- the type id/name- Returns:
- the type
- See Also:
-
removeEntity
Description copied from interface:I_CmsEntityBackendRemoves the given entity from VIE.- Specified by:
removeEntityin 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
-