public interface WorkspaceStorageConnection
Modifier and Type | Method and Description |
---|---|
void |
add(org.exoplatform.services.jcr.datamodel.NodeData data)
Adds single
NodeData . |
void |
add(org.exoplatform.services.jcr.datamodel.PropertyData data)
Adds single
PropertyData . |
void |
close()
Close connection.
|
void |
commit()
Persist changes and closes connection.
|
void |
delete(org.exoplatform.services.jcr.datamodel.NodeData data)
Deletes
NodeData . |
void |
delete(org.exoplatform.services.jcr.datamodel.PropertyData data)
Deletes
PropertyData . |
List<org.exoplatform.services.jcr.impl.dataflow.persistent.ACLHolder> |
getACLHolders()
Returns all the nodes that hold some ACL info like owner or permissions
|
int |
getChildNodesCount(org.exoplatform.services.jcr.datamodel.NodeData parent)
Reads count of
parent |
List<org.exoplatform.services.jcr.datamodel.NodeData> |
getChildNodesData(org.exoplatform.services.jcr.datamodel.NodeData parent)
Reads
List of NodeData from the storage using item's parent location. |
List<org.exoplatform.services.jcr.datamodel.NodeData> |
getChildNodesData(org.exoplatform.services.jcr.datamodel.NodeData parent,
List<org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter> pattern)
Reads
List of NodeData from the storage using item's parent location, and name filter. |
boolean |
getChildNodesDataByPage(org.exoplatform.services.jcr.datamodel.NodeData parent,
int fromOrderNum,
int toOrderNum,
List<org.exoplatform.services.jcr.datamodel.NodeData> childs)
Get child Nodes of the parent node.
|
List<org.exoplatform.services.jcr.datamodel.PropertyData> |
getChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData parent)
Reads
List of PropertyData from the storage using item's parent
location. |
List<org.exoplatform.services.jcr.datamodel.PropertyData> |
getChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData parent,
List<org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter> pattern)
Reads
List of PropertyData from the storage using item's parent
location. |
ItemData |
getItemData(org.exoplatform.services.jcr.datamodel.NodeData parentData,
org.exoplatform.services.jcr.datamodel.QPathEntry name,
org.exoplatform.services.jcr.datamodel.ItemType itemType)
Reads
ItemData from the storage using item's parent and name relative the parent
location of a given type. |
ItemData |
getItemData(String identifier)
Reads
ItemData from the storage by item identifier. |
int |
getLastOrderNumber(org.exoplatform.services.jcr.datamodel.NodeData parent)
Reads order number of last
parent |
long |
getNodesCount()
Reads count of nodes in workspace.
|
List<org.exoplatform.services.jcr.datamodel.PropertyData> |
getReferencesData(String nodeIdentifier)
Reads
List of PropertyData from the storage using item's parent
location. |
boolean |
hasItemData(org.exoplatform.services.jcr.datamodel.NodeData parentData,
org.exoplatform.services.jcr.datamodel.QPathEntry name,
org.exoplatform.services.jcr.datamodel.ItemType itemType)
Checks if
ItemData exists into the storage using item's parent and name relative the parent
location of define type. |
boolean |
isOpened()
Returns true if connection can be used.
|
List<org.exoplatform.services.jcr.datamodel.PropertyData> |
listChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData parent)
Reads
List of PropertyData with empty ValueData from the
storage using item's parent location. |
void |
prepare()
Prepare the commit phase.
|
void |
rename(org.exoplatform.services.jcr.datamodel.NodeData data)
Renames
NodeData using Node identifier and new name and index from the data. |
void |
rollback()
Refuses persistent changes and closes connection.
|
void |
update(org.exoplatform.services.jcr.datamodel.NodeData data)
Updates
NodeData . |
void |
update(org.exoplatform.services.jcr.datamodel.PropertyData data)
Updates
PropertyData . |
boolean hasItemData(org.exoplatform.services.jcr.datamodel.NodeData parentData, org.exoplatform.services.jcr.datamodel.QPathEntry name, org.exoplatform.services.jcr.datamodel.ItemType itemType) throws javax.jcr.RepositoryException, IllegalStateException
ItemData
exists into the storage using item's parent and name relative the parent
location of define type.parentData
- - the item's parent NodeDataname
- - item's path entry (QName + index)itemType
- item typejavax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedItemData getItemData(org.exoplatform.services.jcr.datamodel.NodeData parentData, org.exoplatform.services.jcr.datamodel.QPathEntry name, org.exoplatform.services.jcr.datamodel.ItemType itemType) throws javax.jcr.RepositoryException, IllegalStateException
ItemData
from the storage using item's parent and name relative the parent
location of a given type.parentData
- - the item's parent NodeDataname
- - item's path entry (QName + index)itemType
- item typejavax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedItemData getItemData(String identifier) throws javax.jcr.RepositoryException, IllegalStateException
ItemData
from the storage by item identifier.identifier
- - Item identifierjavax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedList<org.exoplatform.services.jcr.datamodel.NodeData> getChildNodesData(org.exoplatform.services.jcr.datamodel.NodeData parent) throws javax.jcr.RepositoryException, IllegalStateException
List
of NodeData
from the storage using item's parent location.parent
- NodeDataList
javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedList<org.exoplatform.services.jcr.datamodel.NodeData> getChildNodesData(org.exoplatform.services.jcr.datamodel.NodeData parent, List<org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter> pattern) throws javax.jcr.RepositoryException, IllegalStateException
List
of NodeData
from the storage using item's parent location, and name filter.parent
- NodeDatapattern
- - list of QPathEntryFiltersList
javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedint getChildNodesCount(org.exoplatform.services.jcr.datamodel.NodeData parent) throws javax.jcr.RepositoryException
parent
child nodes.
parent
- NodeDatajavax.jcr.RepositoryException
- if error occursint getLastOrderNumber(org.exoplatform.services.jcr.datamodel.NodeData parent) throws javax.jcr.RepositoryException
parent
child nodes.
parent
- NodeDatajavax.jcr.RepositoryException
- if error occursList<org.exoplatform.services.jcr.datamodel.PropertyData> getChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData parent) throws javax.jcr.RepositoryException, IllegalStateException
List
of PropertyData
from the storage using item's parent
location.parent
- NodeDataList
javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedList<org.exoplatform.services.jcr.datamodel.PropertyData> getChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData parent, List<org.exoplatform.services.jcr.impl.core.itemfilters.QPathEntryFilter> pattern) throws javax.jcr.RepositoryException, IllegalStateException
List
of PropertyData
from the storage using item's parent
location.parent
- NodeDatapattern
- String[] list of wild card namesList
javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedList<org.exoplatform.services.jcr.datamodel.PropertyData> listChildPropertiesData(org.exoplatform.services.jcr.datamodel.NodeData parent) throws javax.jcr.RepositoryException, IllegalStateException
List
of PropertyData
with empty ValueData
from the
storage using item's parent location.
parent
- NodeDataList
javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedList<org.exoplatform.services.jcr.datamodel.PropertyData> getReferencesData(String nodeIdentifier) throws javax.jcr.RepositoryException, IllegalStateException, UnsupportedOperationException
List
of PropertyData
from the storage using item's parent
location.
nodeIdentifier
.
See more Node.getReferences()
nodeIdentifier
- of referenceable NodeList
javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedUnsupportedOperationException
- if operation is not supportedboolean getChildNodesDataByPage(org.exoplatform.services.jcr.datamodel.NodeData parent, int fromOrderNum, int toOrderNum, List<org.exoplatform.services.jcr.datamodel.NodeData> childs) throws javax.jcr.RepositoryException
parent
- the parent datafromOrderNum
- the returned list of child nodes should not contain the node with order number
less than fromOrderNum
toOrderNum
- the returned list of child nodes should not contain the node with order number
more than toOrderNum
childs
- will contain the resulted child nodesjavax.jcr.RepositoryException
void add(org.exoplatform.services.jcr.datamodel.NodeData data) throws javax.jcr.RepositoryException, UnsupportedOperationException, javax.jcr.InvalidItemStateException, IllegalStateException
NodeData
.data
- - the new datajavax.jcr.InvalidItemStateException
- if the item already existsUnsupportedOperationException
- if operation is not supported (it is container for level 1)javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedvoid add(org.exoplatform.services.jcr.datamodel.PropertyData data) throws javax.jcr.RepositoryException, UnsupportedOperationException, javax.jcr.InvalidItemStateException, IllegalStateException
PropertyData
.data
- - the new datajavax.jcr.InvalidItemStateException
- if the item already existsUnsupportedOperationException
- if operation is not supported (it is container for level 1)javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedvoid update(org.exoplatform.services.jcr.datamodel.NodeData data) throws javax.jcr.RepositoryException, UnsupportedOperationException, javax.jcr.InvalidItemStateException, IllegalStateException
NodeData
.data
- - the new datajavax.jcr.InvalidItemStateException
- (1)if the data is already updated, i.e. persisted version value of persisted data >=
of new data's persisted version value (2) if the persisted data is not NodeData (i.e.
it is PropertyData). It means that some other process deleted original data and
replace it with other type of data.UnsupportedOperationException
- if operation is not supported (it is container for level 1)javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedvoid update(org.exoplatform.services.jcr.datamodel.PropertyData data) throws javax.jcr.RepositoryException, UnsupportedOperationException, javax.jcr.InvalidItemStateException, IllegalStateException
PropertyData
.data
- - the new datajavax.jcr.InvalidItemStateException
- (1)if the data is already updated, i.e. persisted version value of persisted data >=
of new data's persisted version value (2) if the persisted data is not PropertyData
(i.e. it is NodeData). It means that some other process deleted original data and
replace it with other type of data.UnsupportedOperationException
- if operation is not supported (it is container for level 1)javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedvoid rename(org.exoplatform.services.jcr.datamodel.NodeData data) throws javax.jcr.RepositoryException, UnsupportedOperationException, javax.jcr.InvalidItemStateException, IllegalStateException
NodeData
using Node identifier and new name and index from the data.data
- - NodeData to be renamedjavax.jcr.InvalidItemStateException
- (1)if the data is already updated, i.e. persisted version value of persisted data >=
of new data's persisted version value (2) if the persisted data is not PropertyData
(i.e. it is NodeData). It means that some other process deleted original data and
replace it with other type of data.UnsupportedOperationException
- if operation is not supported (it is container for level 1)javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedvoid delete(org.exoplatform.services.jcr.datamodel.NodeData data) throws javax.jcr.RepositoryException, UnsupportedOperationException, javax.jcr.InvalidItemStateException, IllegalStateException
NodeData
.data
- that identifies data to be deletedjavax.jcr.InvalidItemStateException
- if the data is already deletedUnsupportedOperationException
- if operation is not supported (it is container for level 1)javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedvoid delete(org.exoplatform.services.jcr.datamodel.PropertyData data) throws javax.jcr.RepositoryException, UnsupportedOperationException, javax.jcr.InvalidItemStateException, IllegalStateException
PropertyData
.data
- that identifies data to be deletedjavax.jcr.InvalidItemStateException
- if the data is already deletedUnsupportedOperationException
- if operation is not supported (it is container for level 1)javax.jcr.RepositoryException
- if some exception occurredIllegalStateException
- if connection is closedvoid prepare() throws IllegalStateException, javax.jcr.RepositoryException
IllegalStateException
- if connection is already closedjavax.jcr.RepositoryException
- if some exception occurredvoid commit() throws IllegalStateException, javax.jcr.RepositoryException
IllegalStateException
- if connection is already closedjavax.jcr.RepositoryException
- if some exception occurredvoid rollback() throws IllegalStateException, javax.jcr.RepositoryException
IllegalStateException
- if connection is already closedjavax.jcr.RepositoryException
- if some exception occurredvoid close() throws IllegalStateException, javax.jcr.RepositoryException
IllegalStateException
- if connection is already closedjavax.jcr.RepositoryException
- if some exception occurredboolean isOpened()
List<org.exoplatform.services.jcr.impl.dataflow.persistent.ACLHolder> getACLHolders() throws javax.jcr.RepositoryException, IllegalStateException, UnsupportedOperationException
javax.jcr.RepositoryException
- if some exception occuredIllegalStateException
- if connection is closedUnsupportedOperationException
- if operation is not supportedlong getNodesCount() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- if a database access error occursCopyright © 2003-2017 eXo Platform SAS. All Rights Reserved.