public class CmsServiceImpl extends Object implements CmsService
| Modifier and Type | Field and Description |
|---|---|
static Map<String,Object> |
properties |
NODE, POST_CREATE_CONTENT_EVENT, POST_EDIT_CONTENT_EVENT, PRE_CREATE_CONTENT_EVENT, PRE_EDIT_CONTENT_EVENT| Constructor and Description |
|---|
CmsServiceImpl(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.idgenerator.IDGeneratorService idGeneratorService,
org.exoplatform.services.listener.ListenerService listenerService)
Method constructor
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,Object> |
getPreProperties()
Gets all properties of a node.
|
boolean |
isEqualsValueStringArrays(javax.jcr.Value[] arrayValue1,
String[] arrayValue2) |
void |
moveNode(String nodePath,
String srcWorkspace,
String destWorkspace,
String destPath)
Moves a node from one workspace to the other, with the same repository.
|
String |
storeEditedNode(String nodeTypeName,
javax.jcr.Node storeNode,
Map mappings,
boolean isAddNew)
Stores the edited node in a given repository with given properties
used in case that user only has permission to access storeNode but
cannot access parent of storeNode (storeHomeNode).
|
String |
storeNode(String nodeTypeName,
javax.jcr.Node storeHomeNode,
Map mappings,
boolean isAddNew)
Stores a node in a given repository with given properties.
|
String |
storeNode(String workspace,
String nodeTypeName,
String storePath,
Map mappings)
Stores a node in a given workspace and repository with given properties.
|
String |
storeNodeByUUID(String nodeTypeName,
javax.jcr.Node storeHomeNode,
Map mappings,
boolean isAddNew)
Stores a node in a repository with given properties.
|
public CmsServiceImpl(org.exoplatform.services.jcr.RepositoryService jcrService,
org.exoplatform.services.idgenerator.IDGeneratorService idGeneratorService,
org.exoplatform.services.listener.ListenerService listenerService)
jcrService: - Manage repositoryidGeneratorService: - Generate an identify stringlistenerService: - Register listener, broadcast some event after create/edit nodepublic Map<String,Object> getPreProperties()
CmsServicegetPreProperties in interface CmsServicepublic String storeNode(String workspace, String nodeTypeName, String storePath, Map mappings) throws Exception
storeNode in interface CmsServiceworkspace - Name of the workspace.nodeTypeName - Name of the nodetype.storePath - Path of the store node.mappings - Map of node's properties, including property name and value.Exception - The exceptionpublic String storeNode(String nodeTypeName, javax.jcr.Node storeHomeNode, Map mappings, boolean isAddNew) throws Exception
storeNode in interface CmsServicenodeTypeName - Name of the nodetype.storeHomeNode - The parent node where the node is stored.mappings - Map of node's properties, including property name and value.isAddNew - If "true", the new node is added. If "false", the node is updated.Exception - The exceptionpublic String storeEditedNode(String nodeTypeName, javax.jcr.Node storeNode, Map mappings, boolean isAddNew) throws Exception
storeEditedNode in interface CmsServicenodeTypeName - Name of the nodetype.storeNode - The store node.mappings - Map of node's properties, including property name and value.isAddNew - If "true", the new node is added. If "false", the node is updated.Exception - The exceptionpublic String storeNodeByUUID(String nodeTypeName, javax.jcr.Node storeHomeNode, Map mappings, boolean isAddNew) throws Exception
storeNodeByUUID in interface CmsServicenodeTypeName - Name of the nodetype.storeHomeNode - The store node.mappings - Map of node's properties, including property name and value.isAddNew - If "true", the new node is added. If "false", the node is updated.Exception - The exceptionpublic boolean isEqualsValueStringArrays(javax.jcr.Value[] arrayValue1,
String[] arrayValue2)
throws javax.jcr.ValueFormatException,
IllegalStateException,
javax.jcr.RepositoryException
javax.jcr.ValueFormatExceptionIllegalStateExceptionjavax.jcr.RepositoryExceptionpublic void moveNode(String nodePath, String srcWorkspace, String destWorkspace, String destPath)
moveNode in interface CmsServicenodePath - Path to the node in the source workspace.srcWorkspace - Name of the source workspace.destWorkspace - Name of the destination workspace.destPath - Path of the destination node.Copyright © 2003–2019 eXo Platform SAS. All rights reserved.