|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.test.ptb.PTBRequestGenerator
public class PTBRequestGenerator
This is the main class of the Permis Test Bench Request Generator Program. With this application you can create, in an automated manner, request files from independent text files containing entries for users, targets and actions. The generated request file can be used by the Permis Test Bench without further editing.
Field Summary | |
---|---|
protected java.util.ArrayList |
actions
|
protected java.util.ArrayList |
targets
|
protected java.util.ArrayList |
users
|
Constructor Summary | |
---|---|
PTBRequestGenerator()
Constructs a Permis Test Bench Request Generator. |
Method Summary | |
---|---|
protected void |
generateRequestFile(java.lang.String file)
Generates the request file according to the format expected by the Permis Test Bench |
protected boolean |
loadActionsFile(java.lang.String file)
Reads the list of actions contained in a actions file. |
boolean |
loadTargetsFile(java.lang.String file)
Reads the list of targets contained in a targets file. |
boolean |
loadUsersFile(java.lang.String file)
Reads the list of users contained in a users file. |
protected java.lang.String[] |
loadVarValue(java.io.BufferedReader in)
Reads (attribute,value) pairs from a buffered reader. |
static void |
main(java.lang.String[] args)
|
static void |
printUsage()
Prints how to use this application (number and order of parameters) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.ArrayList users
protected java.util.ArrayList targets
protected java.util.ArrayList actions
Constructor Detail |
---|
public PTBRequestGenerator()
Method Detail |
---|
public static void main(java.lang.String[] args)
public static void printUsage()
protected java.lang.String[] loadVarValue(java.io.BufferedReader in)
PARAMETER=VALUE
pattern.
Once that pattern is found, it returns an array of Strings containing the name of the
parameter in the first element and the value in the second element. On the other hand,
when the end of the buffered reader is reached, it returns null.
in
- is the buffered reader
[0]
is the name of the parameter; [1]
is the value; null if EOF
public boolean loadUsersFile(java.lang.String file)
(USER_DN || USER)="distinguished name of the requestor"
If a line starts with #, it will be considered as a comment (it is ignored).
file
- is the name of the file containing the set of users
file
was successfully readpublic boolean loadTargetsFile(java.lang.String file)
(TARGET_DN || TARGET)="name of the requested resource (DN or URI)"
If a line starts with #, it will be considered as a comment (it is ignored).
file
- is the name of the file containing the set of targets
file
was successfully readprotected boolean loadActionsFile(java.lang.String file)
ACTION="action being requested"; NOE [1,1]
ARG_TYPE="type of the argument"; NOE [0,N]
ARG_VALUE="value of the argument"; NOE [0,N]
If a line starts with #, it will be considered as a comment (it is ignored).
file
- is the name of the file containing the set of actions
file
was successfully readprotected void generateRequestFile(java.lang.String file)
file
- is the name which is going to contain the requests
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |