|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectinfo.magnolia.cms.core.version.BaseVersionManager
public abstract class BaseVersionManager
Field Summary | |
---|---|
static java.lang.String |
PROPERTY_RULE
property name for collection rule |
protected static java.lang.String |
ROOT_VERSION
jcr root version |
protected static java.lang.String |
SYSTEM_NODE
version system node, holds this node version specific data |
static java.lang.String |
TMP_REFERENCED_NODES
version workspace system path |
static java.lang.String |
VERSION_WORKSPACE
version data base |
Constructor Summary | |
---|---|
BaseVersionManager()
|
Method Summary | |
---|---|
javax.jcr.version.Version |
addVersion(Content node)
add version of the specified node and all child nodes while ignoring the same node type |
javax.jcr.version.Version |
addVersion(Content node,
Rule rule)
add version of the specified node and all child nodes while ignoring the same node type |
protected void |
checkAndAddMixin(Content node)
Veryfies the existence of the mix:versionable and adds it if not. |
protected void |
createInitialStructure()
create structure needed for version store workspace |
protected javax.jcr.version.Version |
createVersion(Content node,
Rule rule)
create version of the specified node and all child nodes based on the given Rule |
protected java.util.List |
getAccessManagerPermissions()
get access manager permission list |
javax.jcr.version.VersionIterator |
getAllVersions(Content node)
get all versions |
javax.jcr.version.Version |
getBaseVersion(Content node)
Returns the current base version of given node |
protected HierarchyManager |
getHierarchyManager()
get version store hierarchy manager |
protected Content |
getSystemNode(Content node)
get magnolia system node created under the given node |
protected Rule |
getUsedFilter(Content versionedNode)
get Rule used for this version |
javax.jcr.version.Version |
getVersion(Content node,
java.lang.String name)
get named version |
Content |
getVersionedNode(Content node)
get node from version store |
protected Content |
getVersionedNode(java.lang.String uuid)
get node from version store |
javax.jcr.version.VersionHistory |
getVersionHistory(Content node)
get history of this node as recorded in the version store |
protected void |
impersonateAccessManager(java.util.List permissions)
impersonate to be access manager with system rights |
abstract boolean |
isInvalidMaxVersions()
check if version index is set to negative number |
void |
removeVersionHistory(java.lang.String uuid)
Removes all versions of the node associated with given UUID |
void |
restore(Content node,
javax.jcr.version.Version version,
boolean removeExisting)
restore specified version |
protected void |
revertAccessManager(java.util.List permissions)
revert access manager permissions |
abstract void |
setMaxVersionHistory(Content node)
set version history to max version possible |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION_WORKSPACE
public static final java.lang.String TMP_REFERENCED_NODES
protected static final java.lang.String SYSTEM_NODE
public static final java.lang.String PROPERTY_RULE
protected static final java.lang.String ROOT_VERSION
Constructor Detail |
---|
public BaseVersionManager()
Method Detail |
---|
protected void createInitialStructure() throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
- if unable to create magnolia system structurepublic javax.jcr.version.Version addVersion(Content node) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
node
- to be versioned
java.lang.UnsupportedOperationException
- if repository implementation does not support Versions API
javax.jcr.RepositoryException
- if any repository error occurs
javax.jcr.UnsupportedRepositoryOperationException
public javax.jcr.version.Version addVersion(Content node, Rule rule) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
node
- to be versioned
java.lang.UnsupportedOperationException
- if repository implementation does not support Versions API
javax.jcr.RepositoryException
- if any repository error occurs
javax.jcr.UnsupportedRepositoryOperationException
protected javax.jcr.version.Version createVersion(Content node, Rule rule) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
Rule
node
- to be versionedrule
-
java.lang.UnsupportedOperationException
- if repository implementation does not support Versions API
javax.jcr.RepositoryException
- if any repository error occurs
javax.jcr.UnsupportedRepositoryOperationException
public abstract boolean isInvalidMaxVersions()
public Content getVersionedNode(Content node) throws javax.jcr.RepositoryException
node
-
javax.jcr.RepositoryException
protected Content getVersionedNode(java.lang.String uuid) throws javax.jcr.RepositoryException
uuid
-
javax.jcr.RepositoryException
public abstract void setMaxVersionHistory(Content node) throws javax.jcr.RepositoryException
node
-
javax.jcr.RepositoryException
- if failed to get VersionHistory or fail to removepublic javax.jcr.version.VersionHistory getVersionHistory(Content node) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
node
-
java.lang.UnsupportedOperationException
- if repository implementation does not support Versions API
javax.jcr.RepositoryException
- if any repository error occurs
javax.jcr.UnsupportedRepositoryOperationException
public javax.jcr.version.Version getVersion(Content node, java.lang.String name) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
node
- name
-
java.lang.UnsupportedOperationException
- if repository implementation does not support Versions API
javax.jcr.RepositoryException
- if any repository error occurs
javax.jcr.UnsupportedRepositoryOperationException
public javax.jcr.version.Version getBaseVersion(Content node) throws java.lang.UnsupportedOperationException, javax.jcr.RepositoryException
javax.jcr.UnsupportedRepositoryOperationException
javax.jcr.RepositoryException
java.lang.UnsupportedOperationException
public javax.jcr.version.VersionIterator getAllVersions(Content node) throws javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
node
-
java.lang.UnsupportedOperationException
- if repository implementation does not support Versions API
javax.jcr.RepositoryException
- if any repository error occurs
javax.jcr.UnsupportedRepositoryOperationException
public void restore(Content node, javax.jcr.version.Version version, boolean removeExisting) throws javax.jcr.version.VersionException, javax.jcr.UnsupportedRepositoryOperationException, javax.jcr.RepositoryException
node
- to be restoredversion
- to be usedremoveExisting
-
javax.jcr.version.VersionException
- if the specified versionName
does not exist in this
node's version history
javax.jcr.RepositoryException
- if an error occurs
javax.jcr.version.VersionException
javax.jcr.UnsupportedRepositoryOperationException
public void removeVersionHistory(java.lang.String uuid) throws javax.jcr.RepositoryException
uuid
-
javax.jcr.RepositoryException
- if fails to remove versioned node from the version storeprotected void checkAndAddMixin(Content node) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected Rule getUsedFilter(Content versionedNode) throws java.io.IOException, java.lang.ClassNotFoundException, javax.jcr.RepositoryException
versionedNode
-
java.io.IOException
java.lang.ClassNotFoundException
javax.jcr.RepositoryException
protected Content getSystemNode(Content node) throws javax.jcr.RepositoryException
node
-
javax.jcr.RepositoryException
- if failed to create system nodeprotected void impersonateAccessManager(java.util.List permissions)
permissions
- protected void revertAccessManager(java.util.List permissions)
permissions
- protected java.util.List getAccessManagerPermissions()
protected HierarchyManager getHierarchyManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |