org.xiruss.repository.server
Class ResolutionPolicyBase

java.lang.Object
  extended by org.xiruss.repository.server.RepositoryObjectBase
      extended by org.xiruss.repository.server.ResolutionPolicyBase
All Implemented Interfaces:
java.lang.Comparable, RepositoryObject, ResolutionPolicy
Direct Known Subclasses:
MyResolutionPolicy, OnSnapShotResolutionPolicyBase, SpecificVersionResolutionPolicyBase

public abstract class ResolutionPolicyBase
extends RepositoryObjectBase
implements ResolutionPolicy


Field Summary
 java.util.Map params
           
 
Fields inherited from class org.xiruss.repository.server.RepositoryObjectBase
id, name, objectTypeConstant, properties, rep
 
Constructor Summary
ResolutionPolicyBase()
           
 
Method Summary
abstract  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 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
 

Field Detail

params

public java.util.Map params
Constructor Detail

ResolutionPolicyBase

public ResolutionPolicyBase()
Method Detail

applyPolicy

public abstract Version applyPolicy(Version sourceVersion,
                                    Resource targetResource,
                                    Snapshot onSnapshot)
                             throws RepositoryException
Description copied from interface: ResolutionPolicy
Applies a policy and returns a collection of zero or more result versions.

Specified by:
applyPolicy in interface ResolutionPolicy
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:
RepositoryException

getPolicyTypeName

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

Specified by:
getPolicyTypeName in interface ResolutionPolicy
Returns:

getParams

public java.util.Map getParams()
Description copied from interface: ResolutionPolicy
Returns the map of name/value pairs representing the specific parameter values the policy was created with.

Specified by:
getParams in interface ResolutionPolicy
Returns:

initialize

public void initialize(java.util.Map parameters)
Description copied from interface: ResolutionPolicy
Initialize the new policy instance with a set of parameters. The parameters used are implementation specific.

Specified by:
initialize in interface ResolutionPolicy

setParameter

public void setParameter(java.lang.String name,
                         java.lang.String value)
Description copied from interface: ResolutionPolicy
Sets a parameter of the resolution policy instance.

Specified by:
setParameter in interface ResolutionPolicy

getParameter

public java.lang.String getParameter(java.lang.String paramName)
Description copied from interface: ResolutionPolicy
Returns the value of the specified parameter.

Specified by:
getParameter in interface ResolutionPolicy
Parameters:
paramName - Name of the parameter to get;
Returns:
Parameter value or null if the parameter is not set.