org.xiruss.xirussrepository.client
Class XirussRepositoryProxy

java.lang.Object
  extended by org.xiruss.xirussrepository.client.XirussRepositoryProxy
All Implemented Interfaces:
Repository, MultiUserRepository, SchemaAwareRepository, XirussRepository

public class XirussRepositoryProxy
extends java.lang.Object
implements XirussRepository


Field Summary
static java.util.Map serverToProxyClassMap
           
 
Fields inherited from interface org.xiruss.repository.multiuser.api.MultiUserRepository
nullSession, nullUser
 
Fields inherited from interface org.xiruss.repository.api.Repository
builtinContainerNames, nullBranch, nullDependencyLink, nullDependencyMap, nullMutableSnapshot, nullRepository, nullRepositoryObject, nullResolutionPolicy, nullResource, nullResourceMap, nullSnapshot, nullSnapshotMap, nullStorageManager, nullVersion, nullVersionByResourceMap, nullVersionMap
 
Constructor Summary
XirussRepositoryProxy()
           
XirussRepositoryProxy(XirussHttpApiClientHelper cHelper)
           
 
Method Summary
 void accept(RepositoryVisitor visitor)
           
 java.lang.String addStorageManager(StorageManager manager)
          Sets the active storage manager to the specified manager.
 DependencyLink constructDependencyProxy(org.w3c.dom.Element elem)
           
 RepositoryObjectProxy constructProxy(java.lang.Class serverClassOrInterface, org.w3c.dom.Element dataSource)
          Factory method to construct a new repository object proxy based on the base class or interface type specified.
 ResolutionPolicy constructResolutionPolicyProxy(org.w3c.dom.Element elem)
           
protected  SnapshotMap constructSnapshotMap(PathString path, java.lang.reflect.Method getMethod)
           
 Version constructVersionProxy(org.w3c.dom.Element elem)
           
 Branch createBranch(java.lang.String branchName)
          Create a new branch and assign the specified branch name to it.
 DependencyLink createDependency(java.lang.String dependencyClassName, Version sourceVersion, Resource targetResource, ResolutionPolicy policy)
          Create a new dependency between the specified Version and a target Resource, using the specified resolution policy.
 DependencyLink createDependency(java.lang.String dependencyType, Version sourceVersion, Resource targetResource, ResolutionPolicy policy, java.lang.Object sourceObject)
          Factory method for creating new dependency instances based on the dependency type value.
 DependencyLink createDependency(java.lang.String dependencyClassName, Version sourceVersion, Resource targetResource, java.lang.String resolutionPolicyClassName)
          Creates a new dependency link instance of the specified class and using the specified resolution policy class.
 MutableSnapshot createMutableSnapshot(Branch br)
          Creates a new mutable snapshot.
 MutableSnapshot createMutableSnapshot(Branch br, java.lang.String name)
          Creates a new mutable snapshot and names it.
 ResolutionPolicy createResolutionPolicy(java.lang.String policyType)
           
 Resource createResource(java.lang.String resourceName)
          Creates a new resource instance with the specified name.
 Snapshot createSnapshot(Branch branch, MutableSnapshot snapshot, java.util.Date commitTime)
          Create a new immutable snapshot from an existing mutable snapshot.
 User createUser(java.lang.String userName)
           
 Version createVersion(java.lang.String name, Resource res, java.lang.Class versionSubClass)
          Creates a new version instance of the specified class.
 void endSession(Session session)
          Ends (closes) an active session.
 Branch getBranch(java.lang.String branchId)
          Returns the specified branch.
 Branch getBranchById(java.lang.String branchId)
          Get a Branch by its repository ID.
 Branch getBranchByName(java.lang.String branchName)
           
 long getBranchCount()
          Returns the total number of branches in the repository.
 java.util.Map getBranches()
           
 java.util.Set getBranchIds()
           
 java.util.Set getBranchNames()
           
protected  long getCountForObjectType(java.lang.String countTagName)
           
 StorageManager getDefaultStorageManager()
           
 java.util.Map getDependencies()
           
 DependencyLink getDependencyById(java.lang.String objId)
           
 long getDependencyCount()
          Returns the total number of dependency objects in the repository.
 int getHttpApiPort()
          Gets the port by which the repository is exposed via the HTTP API.
 java.lang.String getHttpHost()
           
 int getHttpViewerPort()
          Gets the port by which the repository is exposed for direct HTTP access to repository content.
 java.lang.Integer getId()
           
 MutableSnapshot getMutableSnapshotById(java.lang.String objId)
          Gets a mutable snapshot by ID
 long getMutableSnapshotCount()
           
 SnapshotMap getMutableSnapshots()
           
 java.lang.String getName()
          Get the display name of the repository.
 Resource getNullResource()
           
 Snapshot getNullSnapshot()
           
 RepositoryObject getObjectById(java.lang.String objId)
          Returns an object of any type given an object ID.
 java.util.Map getObjects()
           
 ResolutionPolicy getPolicyById(java.lang.String objId)
          Gets the specified resolution policy.
 long getPolicyCount()
          Returns the number of resolution policy objects in the repository.
static java.util.Properties getProperties()
           
 int getRepositoryObjectType(java.lang.String objId)
          Returns the repository object ID constant for the object identified by the specified object ID.
protected  org.w3c.dom.Element getRepositoryResult()
           
 java.util.Map getResolutionPolicies()
          Returns a map of all the resolution policies by object ID.
 Resource getResourceById(java.lang.String resId)
          Gets a resource by its repository ID.
 Resource getResourceByKey(java.lang.String resourceName)
           
 long getResourceCount()
           
 java.util.Set getResourceIds()
          List of all resource IDs.
 ResourceMap getResources()
           
 java.util.Map getResourcesByKeyMap()
           
 Resource getSchemaResource(java.lang.String namespaceUri)
          Returns the resource of the specified schema.
 Session getSession(User user)
          Get a session bound to a specific user.
 Session getSessionById(java.lang.String objId)
           
 long getSessionCount()
           
 java.util.Iterator getSessionIterator()
           
 Snapshot getSnapshotById(java.lang.String objId)
           
 long getSnapshotCount()
           
 SnapshotMap getSnapShots()
           
 StorageManager getStorageManager()
           
 StorageManager getStorageManager(java.lang.String managerId)
          Returns the storage manager with the specified ID, if it exists.
 java.lang.String getURLforResource(Resource targetRes)
           
 java.lang.String getURLforSnapshot(Snapshot snapshot)
          Given a snapshot, returns a URL that addresses that snapshot.
 java.lang.String getUrlStringForBranch(Branch branch)
           
 java.lang.String getUrlStringForDependency(DependencyLink dep)
           
 java.lang.String getUrlStringForObject(RepositoryObject obj)
          Given a repository object, returns the cannonical URL for addressing it.
 java.lang.String getUrlStringForRepository()
           
 java.lang.String getUrlStringForResource(Resource resource)
           
 java.lang.String getURLStringforResourceOnSnapshot(Resource targetRes, ResolutionPolicy policy)
          Returns a path sequence that, when appended to the path for snapshot, will resolve to a version on that snapshot.
 java.lang.String getUrlStringForSnapshot(Snapshot snapshot)
           
 java.lang.String getUrlStringForVersion(Version version)
           
 User getUser(java.lang.String userId)
           
 long getUserCount()
          Returns the number of users defined in the repository.
 java.util.Iterator getUserIterator()
          Returns an iterator over the User objects in the repository.
 Version getVersionById(java.lang.String verId)
           
 long getVersionCount()
           
 VersionMap getVersions()
           
 boolean hasBranchNamed(java.lang.String branchName)
           
 boolean hasResourceNamed(java.lang.String resourceName)
           
 boolean hasSchema(java.lang.String namespaceUri)
          Returns true if the specified schema URI has been registered.
 void importCompoundDoc(java.io.File compoundDocumentRootFile, Branch branch, User user, java.lang.String docName)
          Import a compound document into the repository.
 java.lang.String listVersionIds()
           
 void registerBranchName(Branch branch, java.lang.String name)
          Register a new alias for the specified branch.
 void registerSchema(java.lang.String namespaceUri, Resource schema)
          Registers a schema URI and its location.
 void registerSnapshot(Snapshot snapshot)
           
 void registerVersion(Version ver)
           
 java.lang.String reportRepositoryContents()
           
 void setDefaultStorageManager(java.lang.String managerId)
          Sets the storage manager that will store new storage objects by default.
 void setId(java.lang.Integer id)
           
 void setName(java.lang.String string)
           
 void setPort(int i)
           
 void setProperty(java.lang.String name, java.lang.String value)
           
 void unRegisterBranchName(Branch branch, java.lang.String alias)
          Delete an alias entry for the specified branch.
 VersionMap whereUsedByTypeOnSnapshot(Resource resource, Snapshot snapshot, java.lang.Class versionClass)
          Returns a version map of versions of the specified type visible on the specified snapshot that have a dependency relationship to the specified resource.
 VersionMap whereUsedByTypeOnSnapshot(Resource resource, Snapshot snapshot, java.lang.Class versionClass, java.lang.String dependencyTypeName)
          Returns a version map of versions of the specified type visible on the specified snapshot that have a dependency relationship of the specified type to the specified resource.
 VersionMap whereUsedInCompoundDocOnSnapShot(Resource resource, Snapshot snapshot)
           
 VersionMap whereUsedOnSnapshot(Resource resource, Snapshot snapshot)
          Returns a version map of versions visible on the specified snapshot that have a dependency relationship to the specified resource.
 VersionMap whereUsedOnSnapshot(Resource resource, Snapshot snapshot, java.lang.String dependencyTypeName)
          Returns a version map of versions visible on the specified snapshot that have a dependency of the specified type to the specified resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serverToProxyClassMap

public static java.util.Map serverToProxyClassMap
Constructor Detail

XirussRepositoryProxy

public XirussRepositoryProxy()

XirussRepositoryProxy

public XirussRepositoryProxy(XirussHttpApiClientHelper cHelper)
                      throws XirussRepositoryException
Throws:
XirussRepositoryException
Method Detail

whereUsedInCompoundDocOnSnapShot

public VersionMap whereUsedInCompoundDocOnSnapShot(Resource resource,
                                                   Snapshot snapshot)
Specified by:
whereUsedInCompoundDocOnSnapShot in interface XirussRepository

getURLforSnapshot

public java.lang.String getURLforSnapshot(Snapshot snapshot)
Description copied from interface: XirussRepository
Given a snapshot, returns a URL that addresses that snapshot.

Specified by:
getURLforSnapshot in interface XirussRepository
Parameters:
snapshot - The snapshot to get the URL for.
Returns:

getHttpHost

public java.lang.String getHttpHost()
Specified by:
getHttpHost in interface XirussRepository
Returns:
name of HTTP host by which this repository is being served.

getUrlStringForBranch

public java.lang.String getUrlStringForBranch(Branch branch)
Specified by:
getUrlStringForBranch in interface XirussRepository
Returns:

registerSchema

public void registerSchema(java.lang.String namespaceUri,
                           Resource schema)
Description copied from interface: SchemaAwareRepository
Registers a schema URI and its location.

Specified by:
registerSchema in interface SchemaAwareRepository
Parameters:
namespaceUri - The URI (namespace name) of the schema, that is, the namespace that this schema governs.
schema - The repository resource for the schema as it exists within the repository.

hasSchema

public boolean hasSchema(java.lang.String namespaceUri)
Description copied from interface: SchemaAwareRepository
Returns true if the specified schema URI has been registered.

Specified by:
hasSchema in interface SchemaAwareRepository
Parameters:
namespaceUri - The URI (namespace name) of the schema.
Returns:
Returns true if the schema URI has been registered with the repository.

getSchemaResource

public Resource getSchemaResource(java.lang.String namespaceUri)
Description copied from interface: SchemaAwareRepository
Returns the resource of the specified schema.

Specified by:
getSchemaResource in interface SchemaAwareRepository
Parameters:
namespaceUri - The schema to get.
Returns:
Returns the resource of the schema or null if the schema is not registered.

getURLforResource

public java.lang.String getURLforResource(Resource targetRes)

getUrlStringForObject

public java.lang.String getUrlStringForObject(RepositoryObject obj)
Description copied from interface: XirussRepository
Given a repository object, returns the cannonical URL for addressing it.

Specified by:
getUrlStringForObject in interface XirussRepository
Returns:

getUrlStringForDependency

public java.lang.String getUrlStringForDependency(DependencyLink dep)
Specified by:
getUrlStringForDependency in interface XirussRepository
Returns:

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)

getResourcesByKeyMap

public java.util.Map getResourcesByKeyMap()

accept

public void accept(RepositoryVisitor visitor)
            throws java.lang.Throwable
Specified by:
accept in interface Repository
Specified by:
accept in interface XirussRepository
Throws:
java.lang.Throwable

getObjects

public java.util.Map getObjects()

getName

public java.lang.String getName()
Description copied from interface: Repository
Get the display name of the repository.

Specified by:
getName in interface Repository

setId

public void setId(java.lang.Integer id)
Specified by:
setId in interface Repository

getId

public java.lang.Integer getId()
Specified by:
getId in interface Repository

createResource

public Resource createResource(java.lang.String resourceName)
                        throws NameNotUniqueException
Description copied from interface: Repository
Creates a new resource instance with the specified name.

Specified by:
createResource in interface Repository
Parameters:
resourceName - The display name to use for the resource.
Returns:
The created resource
Throws:
NameNotUniqueException

createBranch

public Branch createBranch(java.lang.String branchName)
                    throws RepositoryException
Description copied from interface: Repository
Create a new branch and assign the specified branch name to it.

Specified by:
createBranch in interface Repository
Parameters:
branchName - The name to use for the branch. This will act as an alias for the internal branch ID.
Returns:
The created branch
Throws:
RepositoryException

importCompoundDoc

public void importCompoundDoc(java.io.File compoundDocumentRootFile,
                              Branch branch,
                              User user,
                              java.lang.String docName)
                       throws ImporterException,
                              VersionCommitException,
                              NoSuchPolicyTypeException,
                              NoSuchDependencyTypeException,
                              RepositoryException,
                              VersionMutationException
Description copied from interface: Repository
Import a compound document into the repository.

Specified by:
importCompoundDoc in interface Repository
Throws:
ImporterException
VersionCommitException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationException

getStorageManager

public StorageManager getStorageManager()

getBranch

public Branch getBranch(java.lang.String branchId)
                 throws RepositoryException
Description copied from interface: Repository
Returns the specified branch.

Specified by:
getBranch in interface Repository
Throws:
RepositoryException

createUser

public User createUser(java.lang.String userName)
                throws RepositoryException
Specified by:
createUser in interface XirussRepository
Throws:
RepositoryException

getBranchIds

public java.util.Set getBranchIds()
Specified by:
getBranchIds in interface Repository

getBranchNames

public java.util.Set getBranchNames()
Specified by:
getBranchNames in interface Repository

getBranchByName

public Branch getBranchByName(java.lang.String branchName)
Specified by:
getBranchByName in interface Repository

hasBranchNamed

public boolean hasBranchNamed(java.lang.String branchName)
Specified by:
hasBranchNamed in interface Repository

hasResourceNamed

public boolean hasResourceNamed(java.lang.String resourceName)
Specified by:
hasResourceNamed in interface Repository
Returns:

getResourceByKey

public Resource getResourceByKey(java.lang.String resourceName)
Specified by:
getResourceByKey in interface Repository
Returns:

getResourceById

public Resource getResourceById(java.lang.String resId)
Description copied from interface: Repository
Gets a resource by its repository ID.

Specified by:
getResourceById in interface Repository
Returns:
Resource or null

getBranches

public java.util.Map getBranches()
Specified by:
getBranches in interface Repository
Returns:
Map of branch objects by branch ID

getBranchById

public Branch getBranchById(java.lang.String branchId)
Description copied from interface: Repository
Get a Branch by its repository ID.

Specified by:
getBranchById in interface Repository
Returns:
Branch with ID or NullBranch object

createDependency

public DependencyLink createDependency(java.lang.String dependencyClassName,
                                       Version sourceVersion,
                                       Resource targetResource,
                                       ResolutionPolicy policy)
                                throws RepositoryException,
                                       NoSuchDependencyTypeException
Description copied from interface: Repository
Create a new dependency between the specified Version and a target Resource, using the specified resolution policy. The dependency is added to the source version's dependencies.

Specified by:
createDependency in interface Repository
Returns:
Throws:
RepositoryException
NoSuchDependencyTypeException

createDependency

public DependencyLink createDependency(java.lang.String dependencyType,
                                       Version sourceVersion,
                                       Resource targetResource,
                                       ResolutionPolicy policy,
                                       java.lang.Object sourceObject)
                                throws NoSuchDependencyTypeException,
                                       RepositoryException
Description copied from interface: Repository
Factory method for creating new dependency instances based on the dependency type value. The source object is used to maintain knowledge of what version object data the dependency reflects (i.e., a link element of some sort).

Specified by:
createDependency in interface Repository
Returns:
Throws:
NoSuchDependencyTypeException
RepositoryException

createDependency

public DependencyLink createDependency(java.lang.String dependencyClassName,
                                       Version sourceVersion,
                                       Resource targetResource,
                                       java.lang.String resolutionPolicyClassName)
                                throws NoSuchDependencyTypeException,
                                       RepositoryException
Description copied from interface: Repository
Creates a new dependency link instance of the specified class and using the specified resolution policy class.

Specified by:
createDependency in interface Repository
Parameters:
dependencyClassName - Name of the dependency type to instantiate
sourceVersion - The specific version that has the dependency
targetResource - The resource on which the source version is dependent
resolutionPolicyClassName - The name of the resolution policy type to use for this dependency.
Returns:
New dependency link instance.
Throws:
NoSuchDependencyTypeException
RepositoryException

createResolutionPolicy

public ResolutionPolicy createResolutionPolicy(java.lang.String policyType)
                                        throws RepositoryException,
                                               NoSuchPolicyTypeException
Specified by:
createResolutionPolicy in interface Repository
Returns:
Throws:
RepositoryException
NoSuchPolicyTypeException

createMutableSnapshot

public MutableSnapshot createMutableSnapshot(Branch br)
Description copied from interface: Repository
Creates a new mutable snapshot.

Specified by:
createMutableSnapshot in interface Repository
Returns:

createMutableSnapshot

public MutableSnapshot createMutableSnapshot(Branch br,
                                             java.lang.String name)
Description copied from interface: Repository
Creates a new mutable snapshot and names it.

Specified by:
createMutableSnapshot in interface Repository
Returns:

createVersion

public Version createVersion(java.lang.String name,
                             Resource res,
                             java.lang.Class versionSubClass)
                      throws java.lang.InstantiationException,
                             java.lang.IllegalAccessException
Description copied from interface: Repository
Creates a new version instance of the specified class.

Specified by:
createVersion in interface Repository
Parameters:
name - Name (alias) for the version.
res - The resource this is a version of
Returns:
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException

getVersionById

public Version getVersionById(java.lang.String verId)
Specified by:
getVersionById in interface Repository
Returns:

constructVersionProxy

public Version constructVersionProxy(org.w3c.dom.Element elem)

constructDependencyProxy

public DependencyLink constructDependencyProxy(org.w3c.dom.Element elem)

constructResolutionPolicyProxy

public ResolutionPolicy constructResolutionPolicyProxy(org.w3c.dom.Element elem)

listVersionIds

public java.lang.String listVersionIds()
Specified by:
listVersionIds in interface Repository

whereUsedOnSnapshot

public VersionMap whereUsedOnSnapshot(Resource resource,
                                      Snapshot snapshot)
Description copied from interface: Repository
Returns a version map of versions visible on the specified snapshot that have a dependency relationship to the specified resource. Used to determine where a particular version (through its resource) is used.

Specified by:
whereUsedOnSnapshot in interface Repository
Parameters:
resource - The resource whose usage is being queried
snapshot - The snapshot the result versionSet must be visible on.
Returns:
A version map of versionSet that use the resource.

whereUsedOnSnapshot

public VersionMap whereUsedOnSnapshot(Resource resource,
                                      Snapshot snapshot,
                                      java.lang.String dependencyTypeName)
Description copied from interface: Repository
Returns a version map of versions visible on the specified snapshot that have a dependency of the specified type to the specified resource.

Specified by:
whereUsedOnSnapshot in interface Repository
Parameters:
resource - The resource whose usage is being queried
snapshot - The snapshot the result versionSet must be visible on.
Returns:

whereUsedByTypeOnSnapshot

public VersionMap whereUsedByTypeOnSnapshot(Resource resource,
                                            Snapshot snapshot,
                                            java.lang.Class versionClass)
Description copied from interface: Repository
Returns a version map of versions of the specified type visible on the specified snapshot that have a dependency relationship to the specified resource. Used to determine where a particular version (through its resource) is used.

Specified by:
whereUsedByTypeOnSnapshot in interface Repository
Parameters:
resource - The resource whose usage is being queried
snapshot - The snapshot the result versionSet must be visible on.
Returns:
A version map of versionSet that use the resource.

whereUsedByTypeOnSnapshot

public VersionMap whereUsedByTypeOnSnapshot(Resource resource,
                                            Snapshot snapshot,
                                            java.lang.Class versionClass,
                                            java.lang.String dependencyTypeName)
Description copied from interface: Repository
Returns a version map of versions of the specified type visible on the specified snapshot that have a dependency relationship of the specified type to the specified resource. Used to determine where a particular version (through its resource) is used.

Specified by:
whereUsedByTypeOnSnapshot in interface Repository
Parameters:
resource - The resource whose usage is being queried
snapshot - The snapshot the result versionSet must be visible on.
Returns:
A version map of versionSet that use the resource.

getResourceIds

public java.util.Set getResourceIds()
Description copied from interface: Repository
List of all resource IDs.

Specified by:
getResourceIds in interface Repository
Returns:

getSnapshotById

public Snapshot getSnapshotById(java.lang.String objId)
Specified by:
getSnapshotById in interface Repository
Returns:

getMutableSnapshotById

public MutableSnapshot getMutableSnapshotById(java.lang.String objId)
Description copied from interface: Repository
Gets a mutable snapshot by ID

Specified by:
getMutableSnapshotById in interface Repository
Parameters:
objId - ID of mutable snapshot.
Returns:
Snapshot.

getObjectById

public RepositoryObject getObjectById(java.lang.String objId)
Description copied from interface: Repository
Returns an object of any type given an object ID.

Specified by:
getObjectById in interface Repository
Parameters:
objId - The repository ID of the object to retrieve.
Returns:
The repository object with the specified ID, or null.

getURLStringforResourceOnSnapshot

public java.lang.String getURLStringforResourceOnSnapshot(Resource targetRes,
                                                          ResolutionPolicy policy)
Returns a path sequence that, when appended to the path for snapshot, will resolve to a version on that snapshot.

Specified by:
getURLStringforResourceOnSnapshot in interface XirussRepository
Returns:

getUrlStringForResource

public java.lang.String getUrlStringForResource(Resource resource)
Specified by:
getUrlStringForResource in interface XirussRepository

getUrlStringForSnapshot

public java.lang.String getUrlStringForSnapshot(Snapshot snapshot)
Specified by:
getUrlStringForSnapshot in interface XirussRepository

getUrlStringForVersion

public java.lang.String getUrlStringForVersion(Version version)

getRepositoryObjectType

public int getRepositoryObjectType(java.lang.String objId)
                            throws SnapCMException
Description copied from interface: Repository
Returns the repository object ID constant for the object identified by the specified object ID.

Specified by:
getRepositoryObjectType in interface Repository
Throws:
SnapCMException

reportRepositoryContents

public java.lang.String reportRepositoryContents()
                                          throws java.lang.Throwable
Throws:
java.lang.Throwable

registerSnapshot

public void registerSnapshot(Snapshot snapshot)
Specified by:
registerSnapshot in interface Repository

getUser

public User getUser(java.lang.String userId)
Specified by:
getUser in interface MultiUserRepository

getNullSnapshot

public Snapshot getNullSnapshot()
Specified by:
getNullSnapshot in interface Repository

unRegisterBranchName

public void unRegisterBranchName(Branch branch,
                                 java.lang.String alias)
Description copied from interface: Repository
Delete an alias entry for the specified branch. Does not report the case where the specified alias is not registered.

Specified by:
unRegisterBranchName in interface Repository
Parameters:
branch - The branch whose alias is to be unregistered.
alias - The alias value to unregister.

registerBranchName

public void registerBranchName(Branch branch,
                               java.lang.String name)
                        throws RepositoryException
Description copied from interface: Repository
Register a new alias for the specified branch.

Specified by:
registerBranchName in interface Repository
Parameters:
branch - The branch to which the alias will be associated.
Throws:
RepositoryException

registerVersion

public void registerVersion(Version ver)
Specified by:
registerVersion in interface Repository

getResources

public ResourceMap getResources()
Specified by:
getResources in interface Repository

getVersions

public VersionMap getVersions()
Specified by:
getVersions in interface Repository

getMutableSnapshots

public SnapshotMap getMutableSnapshots()
Specified by:
getMutableSnapshots in interface Repository

getDependencies

public java.util.Map getDependencies()
Specified by:
getDependencies in interface Repository

getNullResource

public Resource getNullResource()
Specified by:
getNullResource in interface Repository

createSnapshot

public Snapshot createSnapshot(Branch branch,
                               MutableSnapshot snapshot,
                               java.util.Date commitTime)
Description copied from interface: Repository
Create a new immutable snapshot from an existing mutable snapshot.

Specified by:
createSnapshot in interface Repository
snapshot - Mutable snapshot with which to initialize the new snapshot.
Returns:

getSession

public Session getSession(User user)
Description copied from interface: MultiUserRepository
Get a session bound to a specific user.

Specified by:
getSession in interface MultiUserRepository

getUserCount

public long getUserCount()
Description copied from interface: MultiUserRepository
Returns the number of users defined in the repository.

Specified by:
getUserCount in interface MultiUserRepository

getUserIterator

public java.util.Iterator getUserIterator()
Description copied from interface: MultiUserRepository
Returns an iterator over the User objects in the repository.

Specified by:
getUserIterator in interface MultiUserRepository
Returns:

endSession

public void endSession(Session session)
Description copied from interface: MultiUserRepository
Ends (closes) an active session. It is not an error to close an already closed session.

Specified by:
endSession in interface MultiUserRepository

getSessionById

public Session getSessionById(java.lang.String objId)
Specified by:
getSessionById in interface MultiUserRepository

getSessionCount

public long getSessionCount()
Specified by:
getSessionCount in interface MultiUserRepository

getSessionIterator

public java.util.Iterator getSessionIterator()
Specified by:
getSessionIterator in interface MultiUserRepository

getResourceCount

public long getResourceCount()
Specified by:
getResourceCount in interface Repository

getVersionCount

public long getVersionCount()
Specified by:
getVersionCount in interface Repository

getSnapshotCount

public long getSnapshotCount()
Specified by:
getSnapshotCount in interface Repository

getSnapShots

public SnapshotMap getSnapShots()
Specified by:
getSnapShots in interface Repository

constructSnapshotMap

protected SnapshotMap constructSnapshotMap(PathString path,
                                           java.lang.reflect.Method getMethod)

getDependencyCount

public long getDependencyCount()
Description copied from interface: Repository
Returns the total number of dependency objects in the repository.

Specified by:
getDependencyCount in interface Repository
Returns:

getBranchCount

public long getBranchCount()
Description copied from interface: Repository
Returns the total number of branches in the repository.

Specified by:
getBranchCount in interface Repository
Returns:

getCountForObjectType

protected long getCountForObjectType(java.lang.String countTagName)

getRepositoryResult

protected org.w3c.dom.Element getRepositoryResult()

getDependencyById

public DependencyLink getDependencyById(java.lang.String objId)
Specified by:
getDependencyById in interface Repository

addStorageManager

public java.lang.String addStorageManager(StorageManager manager)
Description copied from interface: Repository
Sets the active storage manager to the specified manager.

Specified by:
addStorageManager in interface Repository
Returns:
Object ID of added storage manager

setDefaultStorageManager

public void setDefaultStorageManager(java.lang.String managerId)
Description copied from interface: Repository
Sets the storage manager that will store new storage objects by default.

Specified by:
setDefaultStorageManager in interface Repository

getStorageManager

public StorageManager getStorageManager(java.lang.String managerId)
Description copied from interface: Repository
Returns the storage manager with the specified ID, if it exists. Otherwise returns a null storage manager.

Specified by:
getStorageManager in interface Repository

getDefaultStorageManager

public StorageManager getDefaultStorageManager()
Specified by:
getDefaultStorageManager in interface Repository

getMutableSnapshotCount

public long getMutableSnapshotCount()
Specified by:
getMutableSnapshotCount in interface Repository

constructProxy

public RepositoryObjectProxy constructProxy(java.lang.Class serverClassOrInterface,
                                            org.w3c.dom.Element dataSource)
                                     throws java.lang.InstantiationException
Factory method to construct a new repository object proxy based on the base class or interface type specified. For now this mapping is static but it could easily be exposed through some sort of configuration mechanism.

Parameters:
serverClassOrInterface -
elem -
Returns:
Throws:
java.lang.InstantiationException

setPort

public void setPort(int i)

setName

public void setName(java.lang.String string)
Specified by:
setName in interface XirussRepository

getProperties

public static java.util.Properties getProperties()

getPolicyCount

public long getPolicyCount()
Description copied from interface: Repository
Returns the number of resolution policy objects in the repository.

Specified by:
getPolicyCount in interface Repository

getResolutionPolicies

public java.util.Map getResolutionPolicies()
Description copied from interface: Repository
Returns a map of all the resolution policies by object ID.

Specified by:
getResolutionPolicies in interface Repository

getPolicyById

public ResolutionPolicy getPolicyById(java.lang.String objId)
Description copied from interface: Repository
Gets the specified resolution policy.

Specified by:
getPolicyById in interface Repository
Returns:
Specified policy or NullResolutionPolicy

getHttpApiPort

public int getHttpApiPort()
Description copied from interface: XirussRepository
Gets the port by which the repository is exposed via the HTTP API.

Specified by:
getHttpApiPort in interface XirussRepository
Returns:
Port number

getHttpViewerPort

public int getHttpViewerPort()
Description copied from interface: XirussRepository
Gets the port by which the repository is exposed for direct HTTP access to repository content.

Specified by:
getHttpViewerPort in interface XirussRepository
Returns:
Port number

getUrlStringForRepository

public java.lang.String getUrlStringForRepository()
Specified by:
getUrlStringForRepository in interface XirussRepository