org.xiruss.snapcm.api
Interface ResolutionPolicy

All Superinterfaces:
RepositoryObject
All Known Subinterfaces:
OnSnapshotResolutionPolicy, SpecificVersionResolutionPolicy
All Known Implementing Classes:
MyResolutionPolicy, NullResolutionPolicy, OnSnapShotResolutionPolicyBase, OnSnapshotResolutionPolicyProxy, ResolutionPolicyBase, ResolutionPolicyProxy, SpecificVersionResolutionPolicyBase, SpecificVersionResolutionPolicyProxy

public interface ResolutionPolicy
extends RepositoryObject

Base interface for dependency resolution policies.


Method Summary
 Version applyPolicy(Version sourceVersion, Resource targetResource, Snapshot onSnapshot)
          Applies a policy and returns a collection of zero or more result versions.
 java.lang.String getParameter(java.lang.String paramName)
          Returns the value of the specified parameter.
 java.util.Map getParams()
          Returns the map of name/value pairs representing the specific parameter values the policy was created with.
 java.lang.String getPolicyTypeName()
          Returns the repository-implementation-unique name for the policy, i.e., the class name.
 void initialize(java.util.Map parameters)
          Initialize the new policy instance with a set of parameters.
 void setParameter(java.lang.String name, java.lang.String value)
          Sets a parameter of the resolution policy instance.
 
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
 

Method Detail

applyPolicy

Version applyPolicy(Version sourceVersion,
                    Resource targetResource,
                    Snapshot onSnapshot)
                    throws RepositoryException
Applies a policy and returns a collection of zero or more result versions.

Parameters:
sourceVersion - The version the dependency is from
targetResource - The resource the depencency targets
onSnapshot - The snapshot that establishes the visibility context within which the policy is resolved.
Throws:
java.lang.Throwable
RepositoryException

initialize

void initialize(java.util.Map parameters)
Initialize the new policy instance with a set of parameters. The parameters used are implementation specific.

Parameters:
parameters -

getPolicyTypeName

java.lang.String getPolicyTypeName()
Returns the repository-implementation-unique name for the policy, i.e., the class name. The name "onSnapshot" is reserved by the XIRUSS system.

Returns:

getParams

java.util.Map getParams()
Returns the map of name/value pairs representing the specific parameter values the policy was created with.

Returns:

setParameter

void setParameter(java.lang.String name,
                  java.lang.String value)
Sets a parameter of the resolution policy instance.

Parameters:
name -
value -

getParameter

java.lang.String getParameter(java.lang.String paramName)
Returns the value of the specified parameter.

Parameters:
paramName - Name of the parameter to get;
Returns:
Parameter value or null if the parameter is not set.