|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object rj.tools.jcsc.rules.RulesHandler
RulesHandler
is a helper class which is resoponsibel for saving the
rules properties.
Field Summary | |
static java.lang.String |
CHOICE
choice token |
static java.lang.String |
CHOICES
choices token |
static java.lang.String |
JCSC
jcsc token |
static java.lang.String |
RULE
rule token |
static java.lang.String |
RULES
rules token |
static java.lang.String |
SEVERITY
severity token |
static java.lang.String |
TYPE
type token |
static java.lang.String |
VALUE
value token |
Constructor Summary | |
RulesHandler()
|
Method Summary | |
void |
closeTag(java.lang.String tag)
Close a XML tag |
java.io.InputStream |
getInputStreamOfZipRulesFile(java.lang.String fileName)
Returns the InputStream of a rules files from within the JAR file |
static Rule |
getRuleFromMap(java.util.Map rules,
java.lang.String name)
Get the rule from the map of all rules if the rule was not found the default rule is being returned. |
void |
openTag(java.lang.String tag)
Print a XML open tag |
void |
openTag(java.lang.String tag,
java.lang.String[] attributes)
Print a XML open tag with attributes |
void |
persistRules(java.util.Map map)
Persist the rules map into the print stream |
void |
printIndent()
Print the indent for the xml file |
java.util.Properties |
readPropertiesRulesFile(java.lang.String fileName)
Reads a rules .jcsc properties file; only used for conversion from older JCSC versions |
java.util.Map |
readRulesFile(java.lang.String fileName)
Read a rules XML file from the file system |
java.util.Map |
readZipRulesFile(java.lang.String fileName)
Read a rules XML file from a zip/jar file (rj/tools/jcsc/rules is path) |
void |
setPrintStream(java.io.PrintStream ps)
Set the print stream for reading |
void |
tag(java.lang.String tagName,
java.lang.String value)
Print a XML tag with a value |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String JCSC
public static final java.lang.String RULES
public static final java.lang.String RULE
public static final java.lang.String TYPE
public static final java.lang.String VALUE
public static final java.lang.String SEVERITY
public static final java.lang.String CHOICES
public static final java.lang.String CHOICE
Constructor Detail |
public RulesHandler()
Method Detail |
public void setPrintStream(java.io.PrintStream ps)
ps
- public void persistRules(java.util.Map map)
map
- public void printIndent()
public void openTag(java.lang.String tag)
tag
- public void openTag(java.lang.String tag, java.lang.String[] attributes)
tag
- attributes
- public void tag(java.lang.String tagName, java.lang.String value)
tagName
- value
- public void closeTag(java.lang.String tag)
tag
- public java.io.InputStream getInputStreamOfZipRulesFile(java.lang.String fileName) throws java.io.IOException
fileName
-
java.io.IOException
public java.util.Map readZipRulesFile(java.lang.String fileName) throws java.io.IOException
fileName
-
java.io.IOException
public java.util.Map readRulesFile(java.lang.String fileName) throws java.io.IOException
fileName
-
java.io.IOException
public java.util.Properties readPropertiesRulesFile(java.lang.String fileName) throws java.io.IOException
fileName
-
java.io.IOException
public static Rule getRuleFromMap(java.util.Map rules, java.lang.String name)
rules
- name
-
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |