|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.core.storage.sql.HierarchyContext
public class HierarchyContext
This class holds cached information for children relationships in the hierarchy table.
Field Summary | |
---|---|
java.util.Map<java.io.Serializable,Children> |
childrenRegularHard
|
Constructor Summary | |
---|---|
HierarchyContext(Model model,
RowMapper mapper,
SessionImpl session,
PersistenceContext context)
|
Method Summary | |
---|---|
java.io.Serializable |
checkIn(Node node,
java.lang.String label,
java.lang.String checkinComment)
Checks in a node (creates a version). |
void |
checkOut(Node node)
Checks out a node. |
int |
clearCaches()
|
java.io.Serializable |
copy(Node source,
java.io.Serializable parentId,
java.lang.String name)
Copy a child to a new parent with a new name. |
void |
createdSimpleFragment(SimpleFragment fragment)
|
void |
gatherInvalidations(Invalidations invalidations)
Gathers invalidations from this session. |
SimpleFragment |
getChildHierByName(java.io.Serializable parentId,
java.lang.String name,
boolean complexProp)
Find a fragment in the hierarchy schema given its parent id and name. |
java.util.List<SimpleFragment> |
getChildren(java.io.Serializable parentId,
java.lang.String name,
boolean complexProp)
Gets the list of children main fragments for a given parent id. |
java.io.Serializable |
getContainingDocument(java.io.Serializable id)
Finds the id of the enclosing non-complex-property node. |
SimpleFragment |
getHier(java.io.Serializable id,
boolean allowAbsent)
|
SimpleFragment |
getHierIfPresent(java.io.Serializable id)
|
java.lang.Long |
getNextPos(java.io.Serializable nodeId,
boolean complexProp)
Gets the next pos value for a new child in a folder. |
boolean |
isDeleted(java.io.Serializable id)
Recursively checks if any of a fragment's parents has been deleted. |
void |
markInvalidated(java.util.Set<RowId> modified)
Marks locally all the invalidations gathered by a Mapper
operation (like a version restore). |
void |
move(Node source,
java.io.Serializable parentId,
java.lang.String name)
Move a child to a new parent with a new name. |
void |
orderBefore(java.io.Serializable parentId,
java.io.Serializable sourceId,
java.io.Serializable destId)
Order a child before another. |
void |
postSave()
|
void |
processReceivedInvalidations(java.util.Set<RowId> modified)
Processes all invalidations accumulated. |
void |
recordFragment(Fragment fragment)
|
void |
removeFragment(Fragment fragment)
Deletes a fragment from the context. |
void |
removeNode(Fragment hierFragment)
|
void |
restoreVersion(Node node,
Node version)
Restores a node to a given version. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final java.util.Map<java.io.Serializable,Children> childrenRegularHard
Constructor Detail |
---|
public HierarchyContext(Model model, RowMapper mapper, SessionImpl session, PersistenceContext context)
Method Detail |
---|
public int clearCaches()
public void createdSimpleFragment(SimpleFragment fragment) throws StorageException
StorageException
public SimpleFragment getChildHierByName(java.io.Serializable parentId, java.lang.String name, boolean complexProp) throws StorageException
parentId
- the parent idname
- the namecomplexProp
- whether to get complex properties or regular children
null
if not found
StorageException
public java.util.List<SimpleFragment> getChildren(java.io.Serializable parentId, java.lang.String name, boolean complexProp) throws StorageException
Complex properties and children of ordered folders are returned in the proper order.
parentId
- the parent idname
- the name of the children, or null
for allcomplexProp
- whether to get complex properties or regular children
StorageException
public java.io.Serializable getContainingDocument(java.io.Serializable id) throws StorageException
id
- the id
null
if there is no
parent or the parent has been deleted.
StorageException
public void orderBefore(java.io.Serializable parentId, java.io.Serializable sourceId, java.io.Serializable destId) throws StorageException
parentId
- the parent idsourceId
- the node id to movedestId
- the node id before which to place the source node, if
null
then move the source to the end
StorageException
public java.lang.Long getNextPos(java.io.Serializable nodeId, boolean complexProp) throws StorageException
nodeId
- the folder node idcomplexProp
- whether to deal with complex properties or regular
children
null
if not orderable
StorageException
public void move(Node source, java.io.Serializable parentId, java.lang.String name) throws StorageException
source
- the sourceparentId
- the destination parent idname
- the new name
StorageException
public java.io.Serializable copy(Node source, java.io.Serializable parentId, java.lang.String name) throws StorageException
source
- the source of the copyparentId
- the destination parent idname
- the new name
StorageException
public void removeNode(Fragment hierFragment) throws StorageException
StorageException
public void removeFragment(Fragment fragment) throws StorageException
StorageException
public void postSave()
public SimpleFragment getHierIfPresent(java.io.Serializable id)
public SimpleFragment getHier(java.io.Serializable id, boolean allowAbsent) throws StorageException
StorageException
public void recordFragment(Fragment fragment) throws StorageException
StorageException
public boolean isDeleted(java.io.Serializable id) throws StorageException
StorageException
public java.io.Serializable checkIn(Node node, java.lang.String label, java.lang.String checkinComment) throws StorageException
node
- the node to check inlabel
- the version labelcheckinComment
- the version description
StorageException
public void checkOut(Node node) throws StorageException
node
- the node to check out
StorageException
public void restoreVersion(Node node, Node version) throws StorageException
The restored node is checked in.
node
- the nodeversion
- the version to restore on this node
StorageException
public void markInvalidated(java.util.Set<RowId> modified)
Mapper
operation (like a version restore).
public void gatherInvalidations(Invalidations invalidations)
Called post-transaction to gathers invalidations to be sent to others.
public void processReceivedInvalidations(java.util.Set<RowId> modified) throws StorageException
Called pre-transaction.
StorageException
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |