|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.container.imp.PolicyFileParser
public class PolicyFileParser
Parse the official Policy File syntax created on Jun 13, 2005
| Constructor Summary | |
|---|---|
PolicyFileParser()
|
|
| Method Summary | |
|---|---|
protected void |
advance()
advance to next token |
protected void |
expectCharAndAdvance(char ch)
test if current token is given character and then advance. |
PolicyParseListener |
getListener()
|
protected boolean |
matchChar(char ch)
test if current token is given character |
protected boolean |
matchWord(java.lang.String word)
test if current token is the given word |
void |
parse(java.net.URL policyFile)
parse the policy file |
void |
parse(java.net.URL url,
java.io.Reader policy)
parse the policy file provided as url and stream reader |
protected void |
parseGrantAndAdvance()
parse grant construct |
protected void |
parseKeystoreAndAdvance()
parse keystore construct |
protected java.lang.String |
parseOptionAndAdvance()
parse semicolon delimited option and advance if there is no semicolon return null |
protected java.lang.String |
parseValue()
parse text quoted value |
protected java.lang.String |
parseValueAndAdvance()
parse quoted text value and advance parser to next token position if current token is not an quoted string return null without to advance. |
protected java.lang.String |
parseValueAndAdvance(java.lang.String errMsg)
parse quoted text value and advance parser to next token position if current token is not an quoted string raise and exception |
protected java.lang.String |
parseWordAndValueAndAdvance(java.lang.String word)
if current token is the given word, read the consequent quoted text and advance to next token. |
protected java.lang.String |
parseWordAndValueAndAdvance(java.lang.String word,
java.lang.String errMsg)
if current token is the given word, read the consequent quoted text and advance to next token. |
void |
setListener(PolicyParseListener listener)
set the parse listener |
protected boolean |
testForValue()
test if current token is an quoted string |
protected boolean |
testForWord()
test if current token is a word |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PolicyFileParser()
| Method Detail |
|---|
public void setListener(PolicyParseListener listener)
setListener in interface PolicyParserlistener - to pass the callbackpublic PolicyParseListener getListener()
getListener in interface PolicyParser
public void parse(java.net.URL policyFile)
throws PolicyParseException,
java.io.FileNotFoundException,
java.io.IOException
parse in interface PolicyParserpolicyFile -
PolicyParseException
java.io.FileNotFoundException
java.io.IOException
public void parse(java.net.URL url,
java.io.Reader policy)
throws PolicyParseException
parse in interface PolicyParserurl - policy -
PolicyParseException
protected void parseKeystoreAndAdvance()
throws PolicyParseException,
java.io.IOException
PolicyParseException
java.io.IOException
protected void parseGrantAndAdvance()
throws PolicyParseException,
java.io.IOException
PolicyParseException
java.io.IOExceptionprotected java.lang.String parseValue()
protected java.lang.String parseValueAndAdvance(java.lang.String errMsg)
throws PolicyParseException,
java.io.IOException
if current token is not an quoted string raise and exception
errMsg -
PolicyParseException
java.io.IOException
protected java.lang.String parseValueAndAdvance()
throws PolicyParseException,
java.io.IOException
if current token is not an quoted string return null without to advance.
PolicyParseException
java.io.IOException
protected java.lang.String parseWordAndValueAndAdvance(java.lang.String word,
java.lang.String errMsg)
throws PolicyParseException,
java.io.IOException
if current token is not the asked word return null.
if after the word token is not and quoted string raise exception.
then advance.
word - errMsg -
PolicyParseException
java.io.IOException
protected java.lang.String parseWordAndValueAndAdvance(java.lang.String word)
throws PolicyParseException,
java.io.IOException
if current token is not the asked word return null.
if after the word token is not and quoted string return null without to advance.
word -
PolicyParseException
java.io.IOException
protected java.lang.String parseOptionAndAdvance()
throws PolicyParseException,
java.io.IOException
if there is no semicolon return null
PolicyParseException
java.io.IOExceptionprotected boolean testForValue()
protected boolean testForWord()
protected void advance()
throws java.io.IOException
java.io.IOExceptionprotected boolean matchWord(java.lang.String word)
word -
protected boolean matchChar(char ch)
ch -
protected void expectCharAndAdvance(char ch)
throws PolicyParseException,
java.io.IOException
if it is not raise an exception.
ch -
PolicyParseException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||