org.xiruss.xirussrepository.client
Class BranchProxy

java.lang.Object
  extended by org.xiruss.xirussrepository.client.RepositoryObjectProxy
      extended by org.xiruss.xirussrepository.client.BranchProxy
All Implemented Interfaces:
Branch, RepositoryObject

public class BranchProxy
extends RepositoryObjectProxy
implements Branch


Field Summary
 
Fields inherited from class org.xiruss.xirussrepository.client.RepositoryObjectProxy
cHelper, logger, objectTypeCode, pathToMe
 
Constructor Summary
BranchProxy(XirussHttpApiClientHelper helper, org.w3c.dom.Element dataSource)
           
 
Method Summary
 void addMutableSnapshot(MutableSnapshot snapshot)
          Adds a mutable snapshot to the branch.
 Snapshot commitSnapshot(MutableSnapshot snapshot)
          Commits a mutable snapshot to the branch and returns the resulting immutable snapshot.
 Snapshot getInitialSnapshot()
          Returns the first immutable snapshot on the branch.
 Snapshot getLatestSnapshot()
          Returns the last immutable snapshot on the branch.
 MutableSnapshot getMutableSnapshot(java.lang.String objId)
          Returns a mutable snapshot with the specified ID, if it exists.
 int getMutableSnapshotCount()
          Returns the number of mutable snapshots held by the branch.
 java.util.Iterator getMutableSnapshotIterator()
          Returns an iterator over the mutable sandboxes held by the branch.
 SnapshotMap getMutableSnapshots()
          Returns a map of the mutable snapshots on the branch.
 Snapshot getSnapshot(java.lang.String objId)
          Returns the specified snapshot if it is a snapshot on this branch.
 long getSnapshotCount()
          Returns the number of immutable snapshots on the branch.
 java.util.Iterator getSnapshotIterator()
          Returns an iterator over the immutable snapshots on the branch.
 SnapshotMap getSnapshots()
          Get a map of all the immutable snapshots on the branch, indexed by ID.
 SnapshotMap getSnapshots(long startIndex, long count)
          Get a map of all the immutable snapshots on the branch, indexed by ID.
 
Methods inherited from class org.xiruss.xirussrepository.client.RepositoryObjectProxy
accept, compareTo, doPost, doStringReturnPost, equals, getBooleanValue, getId, getName, getOriginalClassName, getPathToMe, getProperties, getProperty, getPropertyNames, getRepository, getStringReturnValue, getStringSetReturnValue, getType, hasProperty, initialize, initialize, isNull, loadRepositoryObjectData, setId, setName, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xiruss.snapcm.api.Branch
getRepository
 
Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject
accept, compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString
 

Constructor Detail

BranchProxy

public BranchProxy(XirussHttpApiClientHelper helper,
                   org.w3c.dom.Element dataSource)
            throws XirussRepositoryException
Throws:
XirussRepositoryException
Method Detail

getSnapshots

public SnapshotMap getSnapshots()
Description copied from interface: Branch
Get a map of all the immutable snapshots on the branch, indexed by ID.

Specified by:
getSnapshots in interface Branch
Returns:

getSnapshots

public SnapshotMap getSnapshots(long startIndex,
                                long count)
Description copied from interface: Branch
Get a map of all the immutable snapshots on the branch, indexed by ID.

Specified by:
getSnapshots in interface Branch
Returns:

commitSnapshot

public Snapshot commitSnapshot(MutableSnapshot snapshot)
                        throws VersionCommitException,
                               SnapshotException
Description copied from interface: Branch
Commits a mutable snapshot to the branch and returns the resulting immutable snapshot. This is an atomic transaction.

Specified by:
commitSnapshot in interface Branch
Throws:
SnapshotException
VersionCommitException

getSnapshot

public Snapshot getSnapshot(java.lang.String objId)
Description copied from interface: Branch
Returns the specified snapshot if it is a snapshot on this branch.

Specified by:
getSnapshot in interface Branch
Parameters:
objId - Object ID of the snapshot to get

getInitialSnapshot

public Snapshot getInitialSnapshot()
Description copied from interface: Branch
Returns the first immutable snapshot on the branch.

Specified by:
getInitialSnapshot in interface Branch

getLatestSnapshot

public Snapshot getLatestSnapshot()
Description copied from interface: Branch
Returns the last immutable snapshot on the branch.

Specified by:
getLatestSnapshot in interface Branch

getSnapshotCount

public long getSnapshotCount()
Description copied from interface: Branch
Returns the number of immutable snapshots on the branch.

Specified by:
getSnapshotCount in interface Branch

getSnapshotIterator

public java.util.Iterator getSnapshotIterator()
Description copied from interface: Branch
Returns an iterator over the immutable snapshots on the branch.

Specified by:
getSnapshotIterator in interface Branch

addMutableSnapshot

public void addMutableSnapshot(MutableSnapshot snapshot)
Description copied from interface: Branch
Adds a mutable snapshot to the branch. Used by the repository. Use Repository.createMutableSnapshot(Branch) to get a new mutable snapshot and add it to a branch.

Specified by:
addMutableSnapshot in interface Branch

getMutableSnapshot

public MutableSnapshot getMutableSnapshot(java.lang.String objId)
Description copied from interface: Branch
Returns a mutable snapshot with the specified ID, if it exists.

Specified by:
getMutableSnapshot in interface Branch
Returns:
Mutable snapshot with the specified ID or null snapshot.

getMutableSnapshotCount

public int getMutableSnapshotCount()
Description copied from interface: Branch
Returns the number of mutable snapshots held by the branch.

Specified by:
getMutableSnapshotCount in interface Branch

getMutableSnapshots

public SnapshotMap getMutableSnapshots()
Description copied from interface: Branch
Returns a map of the mutable snapshots on the branch.

Specified by:
getMutableSnapshots in interface Branch

getMutableSnapshotIterator

public java.util.Iterator getMutableSnapshotIterator()
Description copied from interface: Branch
Returns an iterator over the mutable sandboxes held by the branch.

Specified by:
getMutableSnapshotIterator in interface Branch