|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openadaptor.security.SimplePolicy
public class SimplePolicy
This class represents a Security Policy that is used by the adaptor to apply security operations on a DO (DO[]) with a specific DOType before publishing onto to messaging layer like ETX.
There can be more than only policy for a DOType, the distinguishing factor amongst them is based on actual data contents. For this purpose, policy contains a DOPredicate, which specifies the condition based on DOAttributes.
A policy contains the following details:
An example properties representation of a Policy -
Policy.PolicyName = allTrades
Policy.allTrades.EncodingOrder = ENCRYPT-COMPRESS-SIGN
Policy.allTrades.DecodingOrder = SIGN-COMPRESS-ENCRYPT
Policy.allTrades.ENCRYPT.Algo = DES
Policy.allTrades.ENCRYPT.ClassName = com.cryptix.encryptor
Policy.allTrades.SIGN.Algo = MD5
Policy.allTrades.SIGN.ClassName = com.cryptix.sign
Policy.allTrades.COMPRESS.Algo = ZIP
Policy.allTrades.COMPRESS.ClassName = com.cryptix.compressor
Policy.allTrades.Timeout = 10000 (in ms)
Policy.allTrades.DOType1 = TRADE
Policy.allTrades.DOType2 = ORDER
Policy.allTrades.Filter.TRADE.AttName1 = Counterparty
Policy.allTrades.Filter.TRADE.AttValue1 =
Policy.allTrades.Filter.TRADE.AttValueRegExp1 = London*[a-zA-Z]
Policy.allTrades.Filter.TRADE.AttName2 = Quantity
Policy.allTrades.Filter.TRADE.AttValue2 = 200
Policy.allTrades.Filter.TRADE.AttValueRegExp2 =
Policy.allTrades.TRADE.mCounterparty.PolicyName = allCPs
Policy.allTrades.TRADE.mInstrument.Exchange.PolicyName = allExs
DOPredicate,
SimpleDOPredicate| Constructor Summary | |
|---|---|
SimplePolicy()
|
|
| Method Summary | |
|---|---|
DOPredicate |
getDOPredicate(java.lang.String doType)
Returns the DOPredicate |
java.lang.String |
getName()
Returns the name of the Policy |
java.util.Properties |
getPolicyForSubDOs(DOType doType)
Searches the properties of this to find if any attribute of doType requires to be encoded in a separate way. |
java.util.Properties |
getPolicyForSubDOs(java.lang.String doType)
Searches the properties of this to find if any attribute of doType Name requires to be encoded in a separate way. |
java.util.Properties |
getProperties()
Returns all the properties in the policy |
java.lang.String |
getProperty(java.lang.String attr)
Returns the requested property in the policy object |
java.lang.String |
getPropsPrefix()
Policy property prefix |
void |
init(java.lang.String name,
java.util.Properties props,
java.lang.String propsPrefix)
The Security Manager class creates the policy and calls the init function |
boolean |
isApplicableForDO(DataObject doObj)
Checks whether this Policy is applicable for the DataObject Provided |
boolean |
isApplicableForType(DOType doType)
Checks wether this policy is applicable to the DOType |
boolean |
isApplicableForType(java.lang.String doType)
Checks wether this policy is applicable to the DOType Name |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimplePolicy()
| Method Detail |
|---|
public void init(java.lang.String name,
java.util.Properties props,
java.lang.String propsPrefix)
throws java.lang.SecurityException
init in interface Policyname - The name of the Polciy createdproperties - The properties object used the security agentspropsPrefix - The policy's property prefix
java.lang.SecurityException - If anything fails during initializationpublic DOPredicate getDOPredicate(java.lang.String doType)
getDOPredicate in interface Policypublic java.lang.String getName()
getName in interface Policypublic java.lang.String getProperty(java.lang.String attr)
getProperty in interface Policypublic java.util.Properties getProperties()
getProperties in interface Policypublic java.lang.String getPropsPrefix()
getPropsPrefix in interface Policypublic java.util.Properties getPolicyForSubDOs(DOType doType)
getPolicyForSubDOs in interface Policypublic java.util.Properties getPolicyForSubDOs(java.lang.String doType)
getPolicyForSubDOs in interface Policypublic boolean isApplicableForType(DOType doType)
isApplicableForType in interface Policypublic boolean isApplicableForType(java.lang.String doType)
isApplicableForType in interface Policypublic boolean isApplicableForDO(DataObject doObj)
isApplicableForDO in interface Policy
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||