com.ibm.ram.policy
Class PolicyContext

java.lang.Object
  extended by com.ibm.ram.policy.PolicyContext

public class PolicyContext
extends java.lang.Object

Allows a policy to access an asset that is being validated, and queues other assets to be modified or created

Since:
7.2

Constructor Summary
PolicyContext(Asset asset)
           
 
Method Summary
 void createAsset(Asset asset)
          Deprecated. use PolicyContext#getRAMSession().createAsset()
 Asset getAsset()
          Deprecated. use getRAMAsset()
 java.util.List<PolicyEvent> getEventList()
          Deprecated.  
 RAMAsset getRAMAsset()
           
 RAMSession getRAMSession()
           
 void setAsset(Asset asset)
          Deprecated.  
 void setRAMSession(RAMSession ramSession)
           
 void updateAsset(Asset asset)
          Deprecated. use PolicyContext#getRAMSession().put(RAMAsset)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolicyContext

public PolicyContext(Asset asset)
Parameters:
asset - The asset being validated.
Since:
7.2
Method Detail

getRAMSession

public RAMSession getRAMSession()
Returns:
Returns the ramSession.
Since:
7.5.1

setRAMSession

public void setRAMSession(RAMSession ramSession)
Parameters:
ramSession - The ramSession to set. Set the ramSession. *NOTE* This is not intended for use from within a Policy.
Since:
7.5.1

getAsset

public Asset getAsset()
Deprecated. use getRAMAsset()

Returns:
The asset being validated.
Since:
7.2

setAsset

public void setAsset(Asset asset)
Deprecated. 

Set the asset being validated. *NOTE* This is not intended for use from within a Policy.

Since:
7.2.0.1

getEventList

public java.util.List<PolicyEvent> getEventList()
Deprecated. 

Returns:
The list of events waiting to be processed. Use createAsset(Asset asset) or updateAsset(Asset asset) to add events to this list.
Since:
7.2

createAsset

public void createAsset(Asset asset)
Deprecated. use PolicyContext#getRAMSession().createAsset()

Request that a new asset be created based on the provided object.

Parameters:
asset - The asset to create.
Since:
7.2

updateAsset

public void updateAsset(Asset asset)
Deprecated. use PolicyContext#getRAMSession().put(RAMAsset)

Request that an asset be updated with information from the provided object.

Parameters:
asset - The asset to update.
Since:
7.2

getRAMAsset

public RAMAsset getRAMAsset()
Returns:
RAMAsset The asset being validated.
Since:
7.5.1