com.ibm.ram.policy
Class Policy

java.lang.Object
  extended by com.ibm.ram.policy.Policy
Direct Known Subclasses:
AssetPolicy

public abstract class Policy
extends java.lang.Object

Must be implemented by all policies that are intended to be run in Rational Asset Manager.

Since:
7.0.0.1

Nested Class Summary
static class Policy.CustomReturnCode
          Policy writers use this class to map custom return codes to a description.
 
Constructor Summary
Policy()
           
 
Method Summary
 ConfigurationDetails[] getConfigurationDetails()
          Deprecated. Use getConfigurationDetails(Locale)
 ConfigurationDetails[] getConfigurationDetails(java.util.Locale locale)
          Get the custom fields of the policy
 Policy.CustomReturnCode[] getCustomReturnCodes(java.util.Locale locale)
          Get the custom return codes of the policy.
 java.lang.String getDescription()
          Deprecated. Use getDescription(Locale)
 java.lang.String getDescription(java.util.Locale locale)
          Get the description of the policy
abstract  java.lang.String getID()
          Return the unique identifier for the policy
 java.lang.String getName()
          Deprecated. Use getName(Locale)
 java.lang.String getName(java.util.Locale locale)
          Get the name of the policy
 java.util.Map<?,?> getParameters()
          Get the Map of runtime parameters for this policy.
abstract  PolicyGovernor getPolicyGovernor()
          Get the governor who owns this policy
 void initialize(java.util.Map<?,?> parameters)
          Initialize the Map of parameters for the policy.
abstract  Result test()
          Run the policy's compliance test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Policy

public Policy()
Method Detail

initialize

public void initialize(java.util.Map<?,?> parameters)
Initialize the Map of parameters for the policy. All classes extending this method should call super.initialize to ensure proper initialization.

Parameters:
parameters - Map of key/value pairs containing configuration details and other runtime parameters.
Since:
7.1

test

public abstract Result test()
Run the policy's compliance test

Note: This will be called with the Extension point's classloader as the thread context class loader.

Returns:
The Result of the compliance test
Since:
7.1

getPolicyGovernor

public abstract PolicyGovernor getPolicyGovernor()
Get the governor who owns this policy

Returns:
The PolicyGovernor that contains this Policy
Since:
7.0.0.1

getID

public abstract java.lang.String getID()
Return the unique identifier for the policy

Returns:
The unique identifier
Since:
7.0.0.1

getName

public java.lang.String getName()
Deprecated. Use getName(Locale)

Get the name of the policy

Returns:
The name of the policy
Since:
7.0.0.1

getName

public java.lang.String getName(java.util.Locale locale)
Get the name of the policy

Parameters:
locale - The Locale of the user making the request.
Returns:
The name of the policy
Since:
7.1.1

getDescription

public java.lang.String getDescription()
Deprecated. Use getDescription(Locale)

Get the description of the policy

Returns:
A description of the policy
Since:
7.1

getDescription

public java.lang.String getDescription(java.util.Locale locale)
Get the description of the policy

Parameters:
locale - The Locale of the user making the request.
Returns:
A description of the policy
Since:
7.1.1

getConfigurationDetails

public ConfigurationDetails[] getConfigurationDetails()
Deprecated. Use getConfigurationDetails(Locale)

Get the custom fields of the policy

Returns:
The custom information this policy will use at runtime.
Since:
7.1

getConfigurationDetails

public ConfigurationDetails[] getConfigurationDetails(java.util.Locale locale)
Get the custom fields of the policy

Parameters:
locale - The Locale of the user making the request.
Returns:
The custom information this policy will use at runtime.
Since:
7.1.1

getCustomReturnCodes

public Policy.CustomReturnCode[] getCustomReturnCodes(java.util.Locale locale)
Get the custom return codes of the policy. These return codes may be used to configure the action to take upon completion of the policy.

Parameters:
locale - The Locale of the user making the request.
Returns:
The custom return codes this policy may return.
Since:
7.2

getParameters

public java.util.Map<?,?> getParameters()
Get the Map of runtime parameters for this policy.

Returns:
The Map of runtime parameters for this policy.
Since:
7.1