|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xiruss.xirussrepository.client.XirussRepositoryProxy
public class XirussRepositoryProxy
| 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 |
|---|
public static java.util.Map serverToProxyClassMap
| Constructor Detail |
|---|
public XirussRepositoryProxy()
public XirussRepositoryProxy(XirussHttpApiClientHelper cHelper)
throws XirussRepositoryException
XirussRepositoryException| Method Detail |
|---|
public VersionMap whereUsedInCompoundDocOnSnapShot(Resource resource,
Snapshot snapshot)
whereUsedInCompoundDocOnSnapShot in interface XirussRepositorypublic java.lang.String getURLforSnapshot(Snapshot snapshot)
XirussRepository
getURLforSnapshot in interface XirussRepositorysnapshot - The snapshot to get the URL for.
public java.lang.String getHttpHost()
getHttpHost in interface XirussRepositorypublic java.lang.String getUrlStringForBranch(Branch branch)
getUrlStringForBranch in interface XirussRepository
public void registerSchema(java.lang.String namespaceUri,
Resource schema)
SchemaAwareRepository
registerSchema in interface SchemaAwareRepositorynamespaceUri - 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.public boolean hasSchema(java.lang.String namespaceUri)
SchemaAwareRepository
hasSchema in interface SchemaAwareRepositorynamespaceUri - The URI (namespace name) of the schema.
public Resource getSchemaResource(java.lang.String namespaceUri)
SchemaAwareRepository
getSchemaResource in interface SchemaAwareRepositorynamespaceUri - The schema to get.
public java.lang.String getURLforResource(Resource targetRes)
public java.lang.String getUrlStringForObject(RepositoryObject obj)
XirussRepository
getUrlStringForObject in interface XirussRepositorypublic java.lang.String getUrlStringForDependency(DependencyLink dep)
getUrlStringForDependency in interface XirussRepository
public void setProperty(java.lang.String name,
java.lang.String value)
public java.util.Map getResourcesByKeyMap()
public void accept(RepositoryVisitor visitor)
throws java.lang.Throwable
accept in interface Repositoryaccept in interface XirussRepositoryjava.lang.Throwablepublic java.util.Map getObjects()
public java.lang.String getName()
Repository
getName in interface Repositorypublic void setId(java.lang.Integer id)
setId in interface Repositorypublic java.lang.Integer getId()
getId in interface Repository
public Resource createResource(java.lang.String resourceName)
throws NameNotUniqueException
Repository
createResource in interface RepositoryresourceName - The display name to use for the resource.
NameNotUniqueException
public Branch createBranch(java.lang.String branchName)
throws RepositoryException
Repository
createBranch in interface RepositorybranchName - The name to use for the branch. This will act as an alias for the internal branch ID.
RepositoryException
public void importCompoundDoc(java.io.File compoundDocumentRootFile,
Branch branch,
User user,
java.lang.String docName)
throws ImporterException,
VersionCommitException,
NoSuchPolicyTypeException,
NoSuchDependencyTypeException,
RepositoryException,
VersionMutationException
Repository
importCompoundDoc in interface RepositoryImporterException
VersionCommitException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationExceptionpublic StorageManager getStorageManager()
public Branch getBranch(java.lang.String branchId)
throws RepositoryException
Repository
getBranch in interface RepositoryRepositoryException
public User createUser(java.lang.String userName)
throws RepositoryException
createUser in interface XirussRepositoryRepositoryExceptionpublic java.util.Set getBranchIds()
getBranchIds in interface Repositorypublic java.util.Set getBranchNames()
getBranchNames in interface Repositorypublic Branch getBranchByName(java.lang.String branchName)
getBranchByName in interface Repositorypublic boolean hasBranchNamed(java.lang.String branchName)
hasBranchNamed in interface Repositorypublic boolean hasResourceNamed(java.lang.String resourceName)
hasResourceNamed in interface Repositorypublic Resource getResourceByKey(java.lang.String resourceName)
getResourceByKey in interface Repositorypublic Resource getResourceById(java.lang.String resId)
Repository
getResourceById in interface Repositorypublic java.util.Map getBranches()
getBranches in interface Repositorypublic Branch getBranchById(java.lang.String branchId)
Repository
getBranchById in interface Repository
public DependencyLink createDependency(java.lang.String dependencyClassName,
Version sourceVersion,
Resource targetResource,
ResolutionPolicy policy)
throws RepositoryException,
NoSuchDependencyTypeException
Repository
createDependency in interface RepositoryRepositoryException
NoSuchDependencyTypeException
public DependencyLink createDependency(java.lang.String dependencyType,
Version sourceVersion,
Resource targetResource,
ResolutionPolicy policy,
java.lang.Object sourceObject)
throws NoSuchDependencyTypeException,
RepositoryException
Repository
createDependency in interface RepositoryNoSuchDependencyTypeException
RepositoryException
public DependencyLink createDependency(java.lang.String dependencyClassName,
Version sourceVersion,
Resource targetResource,
java.lang.String resolutionPolicyClassName)
throws NoSuchDependencyTypeException,
RepositoryException
Repository
createDependency in interface RepositorydependencyClassName - Name of the dependency type to instantiatesourceVersion - The specific version that has the dependencytargetResource - The resource on which the source version is dependentresolutionPolicyClassName - The name of the resolution policy type to use for this
dependency.
NoSuchDependencyTypeException
RepositoryException
public ResolutionPolicy createResolutionPolicy(java.lang.String policyType)
throws RepositoryException,
NoSuchPolicyTypeException
createResolutionPolicy in interface RepositoryRepositoryException
NoSuchPolicyTypeExceptionpublic MutableSnapshot createMutableSnapshot(Branch br)
Repository
createMutableSnapshot in interface Repository
public MutableSnapshot createMutableSnapshot(Branch br,
java.lang.String name)
Repository
createMutableSnapshot in interface Repository
public Version createVersion(java.lang.String name,
Resource res,
java.lang.Class versionSubClass)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException
Repository
createVersion in interface Repositoryname - Name (alias) for the version.res - The resource this is a version of
java.lang.InstantiationException
java.lang.IllegalAccessExceptionpublic Version getVersionById(java.lang.String verId)
getVersionById in interface Repositorypublic Version constructVersionProxy(org.w3c.dom.Element elem)
public DependencyLink constructDependencyProxy(org.w3c.dom.Element elem)
public ResolutionPolicy constructResolutionPolicyProxy(org.w3c.dom.Element elem)
public java.lang.String listVersionIds()
listVersionIds in interface Repository
public VersionMap whereUsedOnSnapshot(Resource resource,
Snapshot snapshot)
Repository
whereUsedOnSnapshot in interface Repositoryresource - The resource whose usage is being queriedsnapshot - The snapshot the result versionSet must be visible on.
public VersionMap whereUsedOnSnapshot(Resource resource,
Snapshot snapshot,
java.lang.String dependencyTypeName)
Repository
whereUsedOnSnapshot in interface Repositoryresource - The resource whose usage is being queriedsnapshot - The snapshot the result versionSet must be visible on.
public VersionMap whereUsedByTypeOnSnapshot(Resource resource,
Snapshot snapshot,
java.lang.Class versionClass)
Repository
whereUsedByTypeOnSnapshot in interface Repositoryresource - The resource whose usage is being queriedsnapshot - The snapshot the result versionSet must be visible on.
public VersionMap whereUsedByTypeOnSnapshot(Resource resource,
Snapshot snapshot,
java.lang.Class versionClass,
java.lang.String dependencyTypeName)
Repository
whereUsedByTypeOnSnapshot in interface Repositoryresource - The resource whose usage is being queriedsnapshot - The snapshot the result versionSet must be visible on.
public java.util.Set getResourceIds()
Repository
getResourceIds in interface Repositorypublic Snapshot getSnapshotById(java.lang.String objId)
getSnapshotById in interface Repositorypublic MutableSnapshot getMutableSnapshotById(java.lang.String objId)
Repository
getMutableSnapshotById in interface RepositoryobjId - ID of mutable snapshot.
public RepositoryObject getObjectById(java.lang.String objId)
Repository
getObjectById in interface RepositoryobjId - The repository ID of the object to retrieve.
public java.lang.String getURLStringforResourceOnSnapshot(Resource targetRes,
ResolutionPolicy policy)
getURLStringforResourceOnSnapshot in interface XirussRepositorypublic java.lang.String getUrlStringForResource(Resource resource)
getUrlStringForResource in interface XirussRepositorypublic java.lang.String getUrlStringForSnapshot(Snapshot snapshot)
getUrlStringForSnapshot in interface XirussRepositorypublic java.lang.String getUrlStringForVersion(Version version)
public int getRepositoryObjectType(java.lang.String objId)
throws SnapCMException
Repository
getRepositoryObjectType in interface RepositorySnapCMException
public java.lang.String reportRepositoryContents()
throws java.lang.Throwable
java.lang.Throwablepublic void registerSnapshot(Snapshot snapshot)
registerSnapshot in interface