|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xiruss.repository.api.NullRepository
public class NullRepository
Null repository. Needed to allow complete closure over null returns for null repository objects.
| Field Summary |
|---|
| 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 | |
|---|---|
NullRepository()
|
|
| Method Summary | |
|---|---|
void |
accept(RepositoryVisitor visitor)
|
java.lang.String |
addStorageManager(StorageManager manager)
Sets the active storage manager to the specified manager. |
Branch |
createBranch(java.lang.String branchName)
Create a new branch and assign the specified branch name to it. |
DependencyLink |
createDependency(java.lang.String dependencyType,
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. |
Version |
createVersion(java.lang.String name,
Resource res,
java.lang.Class versionSubClass)
Creates a new version instance of the specified class. |
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()
|
StorageManager |
getDefaultStorageManager()
|
java.util.Map |
getDependencies()
|
DependencyLink |
getDependencyById(java.lang.String objId)
|
long |
getDependencyCount()
Returns the total number of dependency objects in the repository. |
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. |
ResolutionPolicy |
getPolicyById(java.lang.String token)
Gets the specified resolution policy. |
long |
getPolicyCount()
Returns the number of resolution policy objects in the repository. |
int |
getRepositoryObjectType(java.lang.String objId)
Returns the repository object ID constant for the object identified by the specified object ID. |
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()
|
Snapshot |
getSnapshotById(java.lang.String objId)
|
long |
getSnapshotCount()
|
SnapshotMap |
getSnapShots()
|
StorageManager |
getStorageManager(java.lang.String managerId)
Returns the storage manager with the specified ID, if it exists. |
Version |
getVersionById(java.lang.String verId)
|
long |
getVersionCount()
|
VersionMap |
getVersions()
|
boolean |
hasBranchNamed(java.lang.String branchName)
|
boolean |
hasResourceNamed(java.lang.String resourceName)
|
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 |
registerSnapshot(Snapshot snapshot)
|
void |
registerVersion(Version ver)
|
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 |
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 |
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 |
| Constructor Detail |
|---|
public NullRepository()
| Method Detail |
|---|
public 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(java.lang.String managerId)
Repository
getStorageManager in interface Repository
public Branch getBranch(java.lang.String branchId)
throws RepositoryException
Repository
getBranch in interface RepositoryRepositoryExceptionpublic 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 dependencyType,
Version sourceVersion,
Resource targetResource,
ResolutionPolicy policy)
throws RepositoryException,
NoSuchDependencyTypeException
Repository
createDependency in interface RepositoryRepositoryException
NoSuchDependencyTypeException
public DependencyLink createDependency(java.lang.String dependencyClassName,
Version sourceVersion,
Resource targetResource,
java.lang.String resolutionPolicyClassName)
throws NoSuchDependencyTypeException,
RepositoryException,
NoSuchPolicyTypeException
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
NoSuchPolicyTypeException
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 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 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 RepositoryObject getObjectById(java.lang.String objId)
Repository
getObjectById in interface RepositoryobjId - The repository ID of the object to retrieve.
public int getRepositoryObjectType(java.lang.String objId)
throws SnapCMException
Repository
getRepositoryObjectType in interface RepositorySnapCMExceptionpublic void registerSnapshot(Snapshot snapshot)
registerSnapshot in interface Repositorypublic MutableSnapshot getMutableSnapshotById(java.lang.String objId)
Repository
getMutableSnapshotById in interface RepositoryobjId - ID of mutable snapshot.
public Snapshot getNullSnapshot()
getNullSnapshot in interface Repository
public void unRegisterBranchName(Branch branch,
java.lang.String alias)
Repository
unRegisterBranchName in interface Repositorybranch - 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 Repositorybranch - The branch to which the alias will be associated.
RepositoryExceptionpublic void registerVersion(Version ver)
registerVersion in interface Repositorypublic ResourceMap getResources()
getResources in interface Repositorypublic VersionMap getVersions()
getVersions in interface Repositorypublic SnapshotMap getMutableSnapshots()
getMutableSnapshots in interface Repositorypublic java.util.Map getDependencies()
getDependencies in interface Repositorypublic DependencyLink getDependencyById(java.lang.String objId)
getDependencyById in interface Repositorypublic Resource getNullResource()
getNullResource in interface Repository
public void accept(RepositoryVisitor visitor)
throws java.lang.Throwable
accept in interface Repositoryjava.lang.Throwable
public Snapshot createSnapshot(Branch branch,
MutableSnapshot snapshot,
java.util.Date commitTime)
Repository
createSnapshot in interface Repositorysnapshot - Mutable snapshot with which to initialize the new snapshot.
public java.lang.String getName()
Repository
getName in interface Repositorypublic long getResourceCount()
getResourceCount in interface Repositorypublic long getSnapshotCount()
getSnapshotCount in interface Repositorypublic SnapshotMap getSnapShots()
getSnapShots in interface Repositorypublic long getDependencyCount()
Repository
getDependencyCount in interface Repositorypublic long getBranchCount()
Repository
getBranchCount in interface Repositorypublic java.lang.String addStorageManager(StorageManager manager)
Repository
addStorageManager in interface Repositorypublic void setDefaultStorageManager(java.lang.String managerId)
Repository
setDefaultStorageManager in interface Repositorypublic StorageManager getDefaultStorageManager()
getDefaultStorageManager in interface Repositorypublic long getVersionCount()
getVersionCount in interface Repositorypublic long getMutableSnapshotCount()
getMutableSnapshotCount in interface Repositorypublic long getPolicyCount()
Repository
getPolicyCount in interface Repositorypublic java.util.Map getResolutionPolicies()
Repository
getResolutionPolicies in interface Repositorypublic ResolutionPolicy getPolicyById(java.lang.String token)
Repository
getPolicyById in interface Repository
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||