com.ibm.ram.extension
Class CustomReviewProcess

java.lang.Object
  extended by com.ibm.ram.extension.CustomReviewProcess

public abstract class CustomReviewProcess
extends java.lang.Object

This extension point is for 3rd party custom review processes.

Classes that extend this abstract class will be instantiated using Class.forName(className).newInstance()

All methods should be treated as being static. If you wish to persist data between method calls, use the cookie represented by the instanceData String. This cookie is first returned when the start(...) method is called. The cookie is then associated with the asset ID and asset version for the review process and passed in as a parameter to all methods in this class that are guaranteed to only be called after the start method has been called. Calls to the and handlePolicyResults(...) methods may also return an updated cookie which will be passed into subsequent method calls with the same asset id and asset version. When the end(...) method is called the cookie will be deleted from the RAM database.

Since:
7.0.1

Field Summary
protected  int extensionID
          An ID for the extension this review process came from.
 
Constructor Summary
CustomReviewProcess()
           
 
Method Summary
abstract  void end(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.util.Map configurationValues, boolean aborted)
          Called when the review is completed
 java.lang.String[] getApprovedStateNames(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.util.Map configurationValues)
          Deprecated. 7.1.1.1 - CustomReviewProcess.isApproved will be used to check approval.
abstract  ConfigurationDetails[] getConfigurationDetails()
          Returns the properties to collect when an administrator configures a review process instance.
abstract  java.lang.String getDescription()
          Returns the description of the review process type to be displayed in Rational Asset Manager.
abstract  java.lang.String getName()
          Returns the name of the review process type to be displayed in Rational Asset Manager.
abstract  java.lang.String[] getNonFinalStateNames()
          Returns the names of non final states.
 java.lang.String[] getRejectedStateNames(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.util.Map configurationValues)
          Deprecated. 7.1.1.1 - CustomReviewProcess.isRejected will be used to check rejection.
abstract  java.lang.String getState(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.util.Map configurationValues)
          Returns the name of the state in which the specified asset resides.
abstract  java.lang.String getURL(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.util.Map configurationValues)
          Returns the external URL to be displayed in Rational Asset Manager review.
abstract  java.lang.String handleReviewSubmitted(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.lang.String username, boolean accepted, java.lang.String comment, java.io.InputStream uploadedContent, java.lang.String fileName, java.util.Map configurationValues)
          Called when a user submits a review.
abstract  boolean isApproved(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.util.Map configurationValues)
          Called after each state change to check if the asset has been approved.
abstract  boolean isRejected(java.lang.String assetId, java.lang.String assetVersion, java.lang.String instanceData, java.util.Map configurationValues)
          Called after each state change to check if the asset has been rejected.
abstract  java.lang.String start(java.lang.String assetId, java.lang.String assetVersion, java.util.Map configurationValues)
          Called when a new review process is initiated for the specified asset.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extensionID

protected int extensionID
An ID for the extension this review process came from. FOR INTERNAL USE ONLY

Since:
7.1.1
Constructor Detail

CustomReviewProcess

public CustomReviewProcess()
Method Detail

getName

public abstract java.lang.String getName()
Returns the name of the review process type to be displayed in Rational Asset Manager.

Returns:
The name of the review process type. This will be displayed to the user.
Since:
7.0.1

getDescription

public abstract java.lang.String getDescription()
Returns the description of the review process type to be displayed in Rational Asset Manager.

Returns:
A description of the review process. This will be displayed to the user.
Since:
7.0.1

getConfigurationDetails

public abstract ConfigurationDetails[] getConfigurationDetails()
Returns the properties to collect when an administrator configures a review process instance.

Returns:
A list of Configuration Details.
Since:
7.0.1

getNonFinalStateNames

public abstract java.lang.String[] getNonFinalStateNames()
Returns the names of non final states. In Rational Asset Manager it will be possible to configure the users that are reviewers at specific states.

Returns:
The non final state names.
Since:
7.0.1

getApprovedStateNames

public java.lang.String[] getApprovedStateNames(java.lang.String assetId,
                                                java.lang.String assetVersion,
                                                java.lang.String instanceData,
                                                java.util.Map configurationValues)
Deprecated. 7.1.1.1 - CustomReviewProcess.isApproved will be used to check approval.

Returns the names of all approved states.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
The names of all approved states.
Since:
7.0.1

getRejectedStateNames

public java.lang.String[] getRejectedStateNames(java.lang.String assetId,
                                                java.lang.String assetVersion,
                                                java.lang.String instanceData,
                                                java.util.Map configurationValues)
Deprecated. 7.1.1.1 - CustomReviewProcess.isRejected will be used to check rejection.

Returns the names of all rejected states.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
The names of all rejected states.
Since:
7.0.1

getState

public abstract java.lang.String getState(java.lang.String assetId,
                                          java.lang.String assetVersion,
                                          java.lang.String instanceData,
                                          java.util.Map configurationValues)
Returns the name of the state in which the specified asset resides.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
The current state name for the specified asset.
Since:
7.0.1

getURL

public abstract java.lang.String getURL(java.lang.String assetId,
                                        java.lang.String assetVersion,
                                        java.lang.String instanceData,
                                        java.util.Map configurationValues)
Returns the external URL to be displayed in Rational Asset Manager review.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
The external URL to be displayed.
Since:
7.0.1

start

public abstract java.lang.String start(java.lang.String assetId,
                                       java.lang.String assetVersion,
                                       java.util.Map configurationValues)
Called when a new review process is initiated for the specified asset.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
Instance data used to represent this review process instance
Since:
7.0.1

handleReviewSubmitted

public abstract java.lang.String handleReviewSubmitted(java.lang.String assetId,
                                                       java.lang.String assetVersion,
                                                       java.lang.String instanceData,
                                                       java.lang.String username,
                                                       boolean accepted,
                                                       java.lang.String comment,
                                                       java.io.InputStream uploadedContent,
                                                       java.lang.String fileName,
                                                       java.util.Map configurationValues)
Called when a user submits a review.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
username - The id of the user who submitted a review.
accepted - True if the user approved the asset.
comment - The comment added by the reviewer.
uploadedContent - The attachment added by the reviewer.
fileName - The name of the attachment provided by the reviewer.
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
Instance data used to represent this review process instance
Since:
7.0.1

end

public abstract void end(java.lang.String assetId,
                         java.lang.String assetVersion,
                         java.lang.String instanceData,
                         java.util.Map configurationValues,
                         boolean aborted)
Called when the review is completed

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
configurationValues - A map of the keys and resolved values for the configuration details.
aborted - true if the review was abnormally aborted. This may be due to an asset deletion.
Since:
7.0.1

isApproved

public abstract boolean isApproved(java.lang.String assetId,
                                   java.lang.String assetVersion,
                                   java.lang.String instanceData,
                                   java.util.Map configurationValues)
Called after each state change to check if the asset has been approved.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
true if the asset has been approved.
Since:
7.0.1

isRejected

public abstract boolean isRejected(java.lang.String assetId,
                                   java.lang.String assetVersion,
                                   java.lang.String instanceData,
                                   java.util.Map configurationValues)
Called after each state change to check if the asset has been rejected.

Parameters:
assetId - The unique ID of the asset in Rational Asset Manager.
assetVersion - The version of the asset in Rational Asset Manager.
instanceData - Data used to represent this review process instance
configurationValues - A map of the keys and resolved values for the configuration details.
Returns:
true if the asset has been rejected.
Since:
7.0.1