|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.acm.KernelApplication
public class KernelApplication
This class is the starting module of the Privilege Allocator.
It initialises
Environmental Variables and starts up GUI of the Attribute Certificate
Editor,
.
KernelFrame
This class is one of the central objects in the architecture, since it
implements
interface, which is the storage of all
references to the components of the system.
Registry
Initialisation procedures start with reading in "acm.cfg" configuration file. This is a text file, located in the current directory. Its contents is divided into several parts. Each of the parts consists of series of lines of unrestricted length. The first line is the name of the part, and thus this application knows what kind of information follows. The parts may contain comment lines, which must start with '#' or ';' sign. Other lines must be either empty (or contain spaces and tabulations only), or contain correct information.
At the moment two kinds of parts are supported, named "[variables]" and "[utilities]". Parts with other names are simply ignored (are treated as comments), up to the beginning of a known part.
A configuration file without any known parts in it (e.g. everything commented out, no known parts, empty known parts) is a correct configuration file. Having such a file, the default behaviour will be assumed.
If the file is missing, or an error is encountered, a message box comes up, but the application will continue its work. You cannot rely on what exactly the Environment will contain, so you would not expect to see the default values before you close the application and rectify the problem: at least comment out that line. We do not think it is crucial to terminate the application, since the proper error messages will pop up, if anything really essential is missing.
The syntax of the parts is as follows.
[variables] part
<variable name>'='<variable value>
...{repeat the above as appropriate}
So it is possible to set variable with any name, starting with a character,
and may include any characters, including spaces and tabulations, up to the
'=' mark. If the assignment mark is missing, a variable will have no value,
but you can check its presence later, by verifying if it is null or not. See
the Collections
concept. Everything after
assignment mark is the string value of the variable with the specified name.
Note, that trailing spaces will be truncated, so if you need them, put your
string values in brackets, or use any other character you can think of, to delimit the actual
value, and chop them off at run-time. Since
you will process the value, we do not care. The predefined set of
variables do not require values with spaces in the end, so we mandate not to
use any delimiters when inputting values for such variables.
[utilities] part
<class name>
...{repeat the above as appropriate}
So this part actually contains just a list of classes-utilities. All of
them must implement Utility
interface to work properly. The
classes must be accessible, i.e. they must be in the classpath of the JVM.
Sample configuration file:
[variables]
; here we'll put certain values
AC.Holder.Name=cn=Sassa
AC.ValidityPeriod=2001.01.01 00:00:00;2002.01.01 00:00:00
EntrustSigningUtility.DefaultProfile=C:\Entrust Profile\Sassa.epf
[utilities]
# and here we'll put certain editors
issrg.acm.extensions.StandardCertificationEditor
issrg.acm.extensions.EntrustSigningUtility
[more comments here]
ignore this line for now, till we know how to interpret it
Field Summary | |
---|---|
static boolean |
AAIA
|
java.lang.String |
configFile
|
static boolean |
DAVREV
|
static boolean |
NOREV
|
Constructor Summary | |
---|---|
KernelApplication(javax.swing.JFrame parent,
boolean existing,
java.util.Map env)
|
Method Summary | |
---|---|
java.util.Map |
getCollection(java.lang.String collection_name)
Gets the Collection with the given name. |
protected void |
registerACExtensions()
|
boolean |
registerHere(java.lang.String collection_name,
java.lang.String utilityName,
Utility e)
This is the implementation of the
interface. |
void |
revoke()
|
void |
show()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean DAVREV
public static boolean NOREV
public static boolean AAIA
public java.lang.String configFile
Constructor Detail |
---|
public KernelApplication(javax.swing.JFrame parent, boolean existing, java.util.Map env)
Method Detail |
---|
protected void registerACExtensions()
public void show()
public void revoke()
public boolean registerHere(java.lang.String collection_name, java.lang.String utilityName, Utility e)
Registry
interface. This method registers the utility e under given name into the
stipulated collection.
registerHere
in interface Registry
collection_name
- the name of the Collection where to register the
utilityutilityName
- the name reference to the utilitye
- the Utility
object
public java.util.Map getCollection(java.lang.String collection_name)
All information is grouped into Collections. Some information is put
into certain collections by the KernelApplication
, some is
put by the utilities. The one who puts the information decides what
collection it must be in. The designers must comply with certain constraints
as to what information must be kept where, and what its name must be. Refer
to
for
the full list of collection and variables' names and their meanings.
EnvironmentalVariables
For example all variables are stored in
collection. Or, say,
all service utilities are registered in
EnvironmentalVariables.VARIABLES_COLLECTION
collection.
EnvironmentalVariables.UTILITIES_COLLECTION
getCollection
in interface Registry
collection_name
- the name of the collection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |