org.apache.jackrabbit.oak.jcr.delegate
Class VersionManagerDelegate

java.lang.Object
  extended by org.apache.jackrabbit.oak.jcr.delegate.VersionManagerDelegate

public class VersionManagerDelegate
extends Object

VersionManagerDelegate...


Method Summary
 void addVersionLabel(VersionHistoryDelegate versionHistory, VersionDelegate version, String oakVersionLabel, boolean moveLabel)
          Add a version label to the given version history.
 VersionDelegate checkin(NodeDelegate nodeDelegate)
           
 void checkout(NodeDelegate nodeDelegate)
           
static VersionManagerDelegate create(SessionDelegate sessionDelegate)
           
 VersionDelegate createVersion(NodeDelegate version)
           
 VersionHistoryDelegate createVersionHistory(NodeDelegate versionHistory)
           
 VersionDelegate getBaseVersion(NodeDelegate versionable)
           
 VersionDelegate getVersionByIdentifier(String identifier)
           
 VersionHistoryDelegate getVersionHistory(NodeDelegate versionable)
           
 boolean isCheckedOut(NodeDelegate nodeDelegate)
           
 void removeVersion(VersionHistoryDelegate versionHistory, String oakVersionName)
          Removes a version from the given history.
 void removeVersionLabel(VersionHistoryDelegate versionHistory, String oakVersionLabel)
          Removes a version label from the given history.
 void restore(NodeDelegate parent, String oakName, VersionDelegate vd)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static VersionManagerDelegate create(SessionDelegate sessionDelegate)

checkin

@Nonnull
public VersionDelegate checkin(@Nonnull
                                       NodeDelegate nodeDelegate)
                        throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

checkout

public void checkout(@Nonnull
                     NodeDelegate nodeDelegate)
              throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

isCheckedOut

public boolean isCheckedOut(@Nonnull
                            NodeDelegate nodeDelegate)
                     throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

createVersionHistory

@Nonnull
public VersionHistoryDelegate createVersionHistory(@Nonnull
                                                           NodeDelegate versionHistory)
                                            throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

createVersion

@Nonnull
public VersionDelegate createVersion(@Nonnull
                                             NodeDelegate version)
                              throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getVersionHistory

@Nonnull
public VersionHistoryDelegate getVersionHistory(@Nonnull
                                                        NodeDelegate versionable)
                                         throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getBaseVersion

@Nonnull
public VersionDelegate getBaseVersion(@Nonnull
                                              NodeDelegate versionable)
                               throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getVersionByIdentifier

@Nonnull
public VersionDelegate getVersionByIdentifier(@Nonnull
                                                      String identifier)
                                       throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

restore

public void restore(@Nonnull
                    NodeDelegate parent,
                    @Nonnull
                    String oakName,
                    @Nonnull
                    VersionDelegate vd)
             throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

addVersionLabel

public void addVersionLabel(@Nonnull
                            VersionHistoryDelegate versionHistory,
                            @Nonnull
                            VersionDelegate version,
                            @Nonnull
                            String oakVersionLabel,
                            boolean moveLabel)
                     throws javax.jcr.InvalidItemStateException,
                            javax.jcr.version.LabelExistsVersionException,
                            javax.jcr.version.VersionException,
                            javax.jcr.RepositoryException
Add a version label to the given version history.

Parameters:
versionHistory - the version history.
version - the version.
oakVersionLabel - the version label.
moveLabel - whether to move the label if it already exists.
Throws:
javax.jcr.InvalidItemStateException - if any of the nodes is stale.
javax.jcr.version.LabelExistsVersionException - if moveLabel is false, and an attempt is made to add a label that already exists in this version history.
javax.jcr.version.VersionException - if the specified version does not exist in this version history or if the specified version is the root version (jcr:rootVersion).
javax.jcr.RepositoryException - if another error occurs.

removeVersionLabel

public void removeVersionLabel(@Nonnull
                               VersionHistoryDelegate versionHistory,
                               @Nonnull
                               String oakVersionLabel)
                        throws javax.jcr.InvalidItemStateException,
                               javax.jcr.version.VersionException,
                               javax.jcr.RepositoryException
Removes a version label from the given history.

Parameters:
versionHistory - the version history.
oakVersionLabel - the version label.
Throws:
javax.jcr.InvalidItemStateException - if any of the nodes is stale.
javax.jcr.version.VersionException - if the name label does not exist in this version history.
javax.jcr.RepositoryException - if another error occurs.

removeVersion

public void removeVersion(@Nonnull
                          VersionHistoryDelegate versionHistory,
                          @Nonnull
                          String oakVersionName)
                   throws javax.jcr.RepositoryException
Removes a version from the given history.

Parameters:
versionHistory - the version history delegate.
oakVersionName - the version name
Throws:
javax.jcr.RepositoryException - if an error occurs.


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.