org.apache.imperius.spl.datastore.impl
Class PolicyParserImpl
java.lang.Object
org.apache.imperius.spl.datastore.impl.PolicyParserImpl
- All Implemented Interfaces:
- PolicyParser
public class PolicyParserImpl
- extends java.lang.Object
- implements PolicyParser
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
init
public void init()
- Specified by:
init
in interface PolicyParser
getInstance
public static PolicyParserImpl getInstance()
shutDown
public void shutDown()
- Specified by:
shutDown
in interface PolicyParser
createInternalPolicyObject
public SPLPolicy createInternalPolicyObject(java.lang.String policyRuleName,
java.lang.String policyString)
throws SPLException
- Specified by:
createInternalPolicyObject
in interface PolicyParser
- Throws:
SPLException
validate
public boolean validate(java.lang.String PolicyRuleName,
java.lang.String PolicyString)
- Specified by:
validate
in interface PolicyParser
parseFile
public static SPLPolicy parseFile(java.lang.String f,
java.io.Reader r)
throws SPLException
- Throws:
SPLException
traverseTree
public static void traverseTree(AST t)
doTreeAction
public static SPLPolicy doTreeAction(java.lang.String f,
AST t,
java.lang.String[] tokenNames)
throws SPLException
- Throws:
SPLException
validatePolicyString
public boolean validatePolicyString(java.lang.String policyString)
throws SPLException
- Description copied from interface:
PolicyParser
- Determine if the given policy string is properly formatted and parsable.
- Specified by:
validatePolicyString
in interface PolicyParser
- Parameters:
policyString
- the SPL policy.
- Returns:
- true if the the string is parsable, false otherwise.
- Throws:
SPLException
- // TODO: why do we need to throw an exception here?