|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 XirussRepository
public java.lang.String getURLforSnapshot(Snapshot snapshot)
XirussRepository
getURLforSnapshot
in interface XirussRepository
snapshot
- The snapshot to get the URL for.
public java.lang.String getHttpHost()
getHttpHost
in interface XirussRepository
public java.lang.String getUrlStringForBranch(Branch branch)
getUrlStringForBranch
in interface XirussRepository
public void registerSchema(java.lang.String namespaceUri, Resource schema)
SchemaAwareRepository
registerSchema
in interface SchemaAwareRepository
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.public boolean hasSchema(java.lang.String namespaceUri)
SchemaAwareRepository
hasSchema
in interface SchemaAwareRepository
namespaceUri
- The URI (namespace name) of the schema.
public Resource getSchemaResource(java.lang.String namespaceUri)
SchemaAwareRepository
getSchemaResource
in interface SchemaAwareRepository
namespaceUri
- The schema to get.
public java.lang.String getURLforResource(Resource targetRes)
public java.lang.String getUrlStringForObject(RepositoryObject obj)
XirussRepository
getUrlStringForObject
in interface XirussRepository
public 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 Repository
accept
in interface XirussRepository
java.lang.Throwable
public java.util.Map getObjects()
public java.lang.String getName()
Repository
getName
in interface Repository
public void setId(java.lang.Integer id)
setId
in interface Repository
public java.lang.Integer getId()
getId
in interface Repository
public Resource createResource(java.lang.String resourceName) throws NameNotUniqueException
Repository
createResource
in interface Repository
resourceName
- The display name to use for the resource.
NameNotUniqueException
public Branch createBranch(java.lang.String branchName) throws RepositoryException
Repository
createBranch
in interface Repository
branchName
- 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 Repository
ImporterException
VersionCommitException
NoSuchPolicyTypeException
NoSuchDependencyTypeException
RepositoryException
VersionMutationException
public StorageManager getStorageManager()
public Branch getBranch(java.lang.String branchId) throws RepositoryException
Repository
getBranch
in interface Repository
RepositoryException
public User createUser(java.lang.String userName) throws RepositoryException
createUser
in interface XirussRepository
RepositoryException
public java.util.Set getBranchIds()
getBranchIds
in interface Repository
public java.util.Set getBranchNames()
getBranchNames
in interface Repository
public Branch getBranchByName(java.lang.String branchName)
getBranchByName
in interface Repository
public boolean hasBranchNamed(java.lang.String branchName)
hasBranchNamed
in interface Repository
public boolean hasResourceNamed(java.lang.String resourceName)
hasResourceNamed
in interface Repository
public Resource getResourceByKey(java.lang.String resourceName)
getResourceByKey
in interface Repository
public Resource getResourceById(java.lang.String resId)
Repository
getResourceById
in interface Repository
public java.util.Map getBranches()
getBranches
in interface Repository
public 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 Repository
RepositoryException
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 Repository
NoSuchDependencyTypeException
RepositoryException
public DependencyLink createDependency(java.lang.String dependencyClassName, Version sourceVersion, Resource targetResource, java.lang.String resolutionPolicyClassName) throws NoSuchDependencyTypeException, RepositoryException
Repository
createDependency
in interface Repository
dependencyClassName
- 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 Repository
RepositoryException
NoSuchPolicyTypeException
public 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 Repository
name
- Name (alias) for the version.res
- The resource this is a version of
java.lang.InstantiationException
java.lang.IllegalAccessException
public Version getVersionById(java.lang.String verId)
getVersionById
in interface Repository
public 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 Repository
resource
- 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 Repository
resource
- 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 Repository
resource
- 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 Repository
resource
- 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 Repository
public Snapshot getSnapshotById(java.lang.String objId)
getSnapshotById
in interface Repository
public MutableSnapshot getMutableSnapshotById(java.lang.String objId)
Repository
getMutableSnapshotById
in interface Repository
objId
- ID of mutable snapshot.
public RepositoryObject getObjectById(java.lang.String objId)
Repository
getObjectById
in interface Repository
objId
- The repository ID of the object to retrieve.
public java.lang.String getURLStringforResourceOnSnapshot(Resource targetRes, ResolutionPolicy policy)
getURLStringforResourceOnSnapshot
in interface XirussRepository
public java.lang.String getUrlStringForResource(Resource resource)
getUrlStringForResource
in interface XirussRepository
public java.lang.String getUrlStringForSnapshot(Snapshot snapshot)
getUrlStringForSnapshot
in interface XirussRepository
public java.lang.String getUrlStringForVersion(Version version)
public int getRepositoryObjectType(java.lang.String objId) throws SnapCMException
Repository
getRepositoryObjectType
in interface Repository
SnapCMException
public java.lang.String reportRepositoryContents() throws java.lang.Throwable
java.lang.Throwable
public void registerSnapshot(Snapshot snapshot)
registerSnapshot
in interface Repository
public User getUser(java.lang.String userId)
getUser
in interface MultiUserRepository
public Snapshot getNullSnapshot()
getNullSnapshot
in interface Repository
public void unRegisterBranchName(Branch branch, java.lang.String alias)
Repository
unRegisterBranchName
in interface Repository
branch
- The branch whose alias is to be unregistered.alias
- The alias value to unregister.public void registerBranchName(Branch branch, java.lang.String name) throws RepositoryException
Repository
registerBranchName
in interface Repository
branch
- The branch to which the alias will be associated.
RepositoryException
public void registerVersion(Version ver)
registerVersion
in interface Repository
public ResourceMap getResources()
getResources
in interface Repository
public VersionMap getVersions()
getVersions
in interface Repository
public SnapshotMap getMutableSnapshots()
getMutableSnapshots
in interface Repository
public java.util.Map getDependencies()
getDependencies
in interface Repository
public Resource getNullResource()
getNullResource
in interface Repository
public Snapshot createSnapshot(Branch branch, MutableSnapshot snapshot, java.util.Date commitTime)
Repository
createSnapshot
in interface Repository
snapshot
- Mutable snapshot with which to initialize the new snapshot.
public Session getSession(User user)
MultiUserRepository
getSession
in interface MultiUserRepository
public long getUserCount()
MultiUserRepository
getUserCount
in interface MultiUserRepository
public java.util.Iterator getUserIterator()
MultiUserRepository
getUserIterator
in interface MultiUserRepository
public void endSession(Session session)
MultiUserRepository
endSession
in interface MultiUserRepository
public Session getSessionById(java.lang.String objId)
getSessionById
in interface MultiUserRepository
public long getSessionCount()
getSessionCount
in interface MultiUserRepository
public java.util.Iterator getSessionIterator()
getSessionIterator
in interface MultiUserRepository
public long getResourceCount()
getResourceCount
in interface Repository
public long getVersionCount()
getVersionCount
in interface Repository
public long getSnapshotCount()
getSnapshotCount
in interface Repository
public SnapshotMap getSnapShots()
getSnapShots
in interface Repository
protected SnapshotMap constructSnapshotMap(PathString path, java.lang.reflect.Method getMethod)
public long getDependencyCount()
Repository
getDependencyCount
in interface Repository
public long getBranchCount()
Repository
getBranchCount
in interface Repository
protected long getCountForObjectType(java.lang.String countTagName)
protected org.w3c.dom.Element getRepositoryResult()
public DependencyLink getDependencyById(java.lang.String objId)
getDependencyById
in interface Repository
public java.lang.String addStorageManager(StorageManager manager)
Repository
addStorageManager
in interface Repository
public void setDefaultStorageManager(java.lang.String managerId)
Repository
setDefaultStorageManager
in interface Repository
public StorageManager getStorageManager(java.lang.String managerId)
Repository
getStorageManager
in interface Repository
public StorageManager getDefaultStorageManager()
getDefaultStorageManager
in interface Repository
public long getMutableSnapshotCount()
getMutableSnapshotCount
in interface Repository
public RepositoryObjectProxy constructProxy(java.lang.Class serverClassOrInterface, org.w3c.dom.Element dataSource) throws java.lang.InstantiationException
serverClassOrInterface
- elem
-
java.lang.InstantiationException
public void setPort(int i)
public void setName(java.lang.String string)
setName
in interface XirussRepository
public static java.util.Properties getProperties()
public long getPolicyCount()
Repository
getPolicyCount
in interface Repository
public java.util.Map getResolutionPolicies()
Repository
getResolutionPolicies
in interface Repository
public ResolutionPolicy getPolicyById(java.lang.String objId)
Repository
getPolicyById
in interface Repository
public int getHttpApiPort()
XirussRepository
getHttpApiPort
in interface XirussRepository
public int getHttpViewerPort()
XirussRepository
getHttpViewerPort
in interface XirussRepository
public java.lang.String getUrlStringForRepository()
getUrlStringForRepository
in interface XirussRepository
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |