org.xiruss.xirussrepository.client
Class ResolutionPolicyProxy

java.lang.Object
  extended by org.xiruss.xirussrepository.client.RepositoryObjectProxy
      extended by org.xiruss.xirussrepository.client.ResolutionPolicyProxy
All Implemented Interfaces:
RepositoryObject, ResolutionPolicy
Direct Known Subclasses:
OnSnapshotResolutionPolicyProxy, SpecificVersionResolutionPolicyProxy

public abstract class ResolutionPolicyProxy
extends RepositoryObjectProxy
implements ResolutionPolicy


Field Summary
 
Fields inherited from class org.xiruss.xirussrepository.client.RepositoryObjectProxy
cHelper, logger, objectTypeCode, pathToMe
 
Constructor Summary
ResolutionPolicyProxy()
           
 
Method Summary
 Version applyPolicy(Version sourceVersion, Resource targetResource, Snapshot onSnapshot)
          This is the base resolution behavior.
 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 initialize(XirussHttpApiClientHelper helper, org.w3c.dom.Element dataSource)
           
 void setParameter(java.lang.String name, java.lang.String value)
          Sets a parameter of the resolution policy instance.
 
Methods inherited from class org.xiruss.xirussrepository.client.RepositoryObjectProxy
accept, compareTo, doPost, doStringReturnPost, equals, getBooleanValue, getId, getName, getOriginalClassName, getPathToMe, getProperties, getProperty, getPropertyNames, getRepository, getStringReturnValue, getStringSetReturnValue, getType, hasProperty, initialize, isNull, loadRepositoryObjectData, setId, setName, setProperty, toString
 
Methods inherited from class java.lang.Object
clone, 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
 

Constructor Detail

ResolutionPolicyProxy

public ResolutionPolicyProxy()
Method Detail

initialize

public void initialize(XirussHttpApiClientHelper helper,
                       org.w3c.dom.Element dataSource)
                throws XirussRepositoryException
Overrides:
initialize in class RepositoryObjectProxy
Throws:
XirussRepositoryException

applyPolicy

public Version applyPolicy(Version sourceVersion,
                           Resource targetResource,
                           Snapshot onSnapshot)
                    throws RepositoryException
This is the base resolution behavior. Subclasses can either take this result and futher refine it or completely re-implement this method. This is "onSnapshot" policy resolution.

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

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:

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:

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.