org.xiruss.repository.server
Class OnSnapShotResolutionPolicyBase
java.lang.Object
org.xiruss.repository.server.RepositoryObjectBase
org.xiruss.repository.server.ResolutionPolicyBase
org.xiruss.repository.server.OnSnapShotResolutionPolicyBase
- All Implemented Interfaces:
- java.lang.Comparable, OnSnapshotResolutionPolicy, RepositoryObject, ResolutionPolicy
public class OnSnapShotResolutionPolicyBase
- extends ResolutionPolicyBase
- implements OnSnapshotResolutionPolicy
Resolution policy that resolves to the latest version visible on the current snapshot, if any.
This policy has no construction-time parameters.
Methods inherited from class org.xiruss.repository.server.RepositoryObjectBase |
accept, compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, initialize, isNull, setId, setName, setProperties, setProperty, setRepository, setType, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xiruss.snapcm.api.RepositoryObject |
accept, compareTo, getId, getName, getProperties, getProperty, getPropertyNames, getRepository, getType, hasProperty, initialize, isNull, setId, setName, setProperty, toString |
OnSnapShotResolutionPolicyBase
public OnSnapShotResolutionPolicyBase()
applyPolicy
public Version applyPolicy(Version sourceVersion,
Resource targetResource,
Snapshot onSnapshot)
throws ResolutionPolicyException
- Description copied from interface:
ResolutionPolicy
- Applies a policy and returns a collection of zero or more
result versions.
- Specified by:
applyPolicy
in interface ResolutionPolicy
- Specified by:
applyPolicy
in class ResolutionPolicyBase
- Parameters:
sourceVersion
- The version the dependency is fromtargetResource
- The resource the depencency targetsonSnapshot
- The snapshot that establishes the visibility context within which
the policy is resolved.
- Throws:
ResolutionPolicyException
getPolicyTypeName
public java.lang.String getPolicyTypeName()
- Returns the string "onSnapshot". This value is reserved
by the SnapCM implementation and is a special case. All
other policy types must return a repository-unique policy
type name, i.e., the class name.
FIXME: Not sure what my original intent was here other than
providing a string-based mechanism for doing mapping from
resolution policy types to business logic. Not sure we really
need this given we can do instanceof.
- Specified by:
getPolicyTypeName
in interface ResolutionPolicy
- Overrides:
getPolicyTypeName
in class ResolutionPolicyBase
- Returns: