|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Dictionary | +--java.util.Hashtable | +--ORG.oclc.jassi.StyleTable
The StyleTable class stores interface definitions
such as colors, fonts, default html pages, and interface gadgets
that are read from the JaSSI configuration files during
server initialization.
Information held in the StyleTable object is used to customize
the the look and feel of interface applications. The information is
shared globally by all user sessions in the JaSSI Server and can
be accessed in HTML documents via the style table entity notation:
&<TableName>.<SectionName>.<Name>;
The data containined in the StyleTable is organized by the section and name/value pairs. For example, a JaSSI configuration input:
[colors] bgcolor = #ffffff text = #000000 link = #006600 [images] toolbar = /images/toolbar.gif webplaces= /images/grn_destinations.gif go = /images/grn_go.gif
The StyleTable class provides methods to retrieve information for each entry, based on the name of a section within the table and the variable within the section. For example, &StyleTable.colors.bgcolors; retrieves the value from the colors section for the variable named bgcolor (i.e. #ffffff). The get methods in the StyleTable object are also responsible for executing the interface or display gadgets.
The StyleTable class maintains two categories of static data that can be accessed by all applications in the JaSSI: the interface styles and the display gadgets for each style. There are methods to retrieve an individual StyleTable object based on the unique style name.
Constructor Summary | |
StyleTable(int capacity)
Constructs a StyleTable object with the initial size specified as the input parameter. |
Method Summary | |
Object |
get(String key)
Retrieves the value for the input key which has the syntax including the variable section name (<sectionname>.<name>) and by default, executes the gadget class for gadget objects retrieved. |
Object |
get(String key,
boolean execute)
Retrieves the value for the input key which has the syntax including the variable section name (<sectionname>.<name>) and executes the gadget class based on the input execute flag. |
Object |
get(String key,
boolean execute,
RequestManager rMngr)
Retrieves the value for the input RequestManager object and key which has the syntax including the variable section name (<sectionname>.<name>) and executes the gadget class based on the input execute flag. |
Object |
get(String key,
RequestManager rMngr)
Retrieves the value for the input RequestManager object and key which has the syntax including the variable section name (<sectionname>.<name>) and by default, executes the gadget class for gadget objects retrieved. |
Object |
get(String section,
String key)
Retrieves the value for the input key from the input section name and by default, executes the gadget class for any gadget objects retrieved. |
Object |
get(String section,
String key,
boolean execute,
RequestManager rMngr)
Retrieves the value for the input key from the input section name and executes the gadget class based on the input execute flag. |
Object |
get(String section,
String key,
RequestManager rMngr)
Retrieves the value for the input RequestManager object and key from the input section name and by default, executes the gadget class for any gadget objects retrieved. |
static StyleTable |
getDisplayGadgets(String name)
Retrieves a StyleTable object from the cache of saved display gadget styles for the input table name. |
static Hashtable |
getDisplayGadgetsTables()
Returns a Hashtable object containing all the saved display gadgets tables. |
static StyleTable |
getStyle(String name)
Retrieves a StyleTable object from the cache of saved interface styles for the input table name. |
static StyleTable |
getStyle(String category,
String name)
Retrieves a StyleTable object from the cache of saved styles for the input table name found in the input category. |
static Hashtable |
getStyleTables()
Returns a Hashtable object containing all the saved interface style tables. |
static Hashtable |
getStyleTables(String category)
Returns a Hashtable object containing all the saved style tables for a certain category. |
void |
put(String section,
String key,
Object data)
Stores an Object that is associated with the input section and key name in the style table. |
static void |
saveDisplayGadgets(String name,
StyleTable table)
Saves a StyleTable object into the cache of display gadgets which can be retrieved using the input name. |
static void |
saveStyle(String category,
String name,
StyleTable table)
Saves a StyleTable object into the cache based on the input category and is named using the input name. |
static void |
saveStyle(String name,
StyleTable table)
Saves a StyleTable object into the cache of interface styles which can be retrieved using the input name. |
Methods inherited from class java.util.Hashtable |
clear,
clone,
contains,
containsKey,
containsValue,
elements,
entrySet,
equals,
get,
hashCode,
isEmpty,
keys,
keySet,
put,
putAll,
rehash,
remove,
size,
toString,
values |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public StyleTable(int capacity)
capacity
- the initial size to allocate the StyleTable Hashtable.Method Detail |
public static void saveStyle(String name, StyleTable table)
name
- the name of the saved StyleTables's object.table
- the StyleTable object to store in the saved StyleTables
Hashtable.public static void saveStyle(String category, String name, StyleTable table)
category
- the type of StyleTable object it is.name
- the name of the saved StyleTables's object.table
- the StyleTable object to store in the saved StyleTables
Hashtable.public static StyleTable getStyle(String name)
name
- the name of the saved StyleTables's object.public static StyleTable getStyle(String category, String name)
category
- the type of stylename
- the name of the saved StyleTables's object.public static Hashtable getStyleTables()
public static Hashtable getStyleTables(String category)
category
- the name of the style table categorypublic static void saveDisplayGadgets(String name, StyleTable table)
name
- the name of the save DisplayGadgets's object.table
- the StyleTable object to store in the saved DisplayGadgets
Hashtable.public static StyleTable getDisplayGadgets(String name)
name
- the name of the saved DisplayGadgets's object.public static Hashtable getDisplayGadgetsTables()
public Object get(String key)
key
- the name of the StyleTable section name and variable
delineated by a period.public Object get(String key, RequestManager rMngr)
key
- the name of the StyleTable section name and variable
delineated by a period.rMngr
- the current RequestManager objectpublic Object get(String key, boolean execute)
key
- the name of the StyleTable section name and variable
delineated by a period.boolean
- indicating whether to execute a gadgetpublic Object get(String key, boolean execute, RequestManager rMngr)
key
- the name of the StyleTable section name and variable
delineated by a period.boolean
- indicating whether to execute a gadgetrMngr
- the RequestManager objectpublic Object get(String section, String key)
section
- the section name in the StyleTable objectkey
- the variable name within the sectionpublic Object get(String section, String key, RequestManager rMngr)
section
- the section name in the StyleTable objectkey
- the variable name within the sectionrMngr
- the current RequestManager object for the transactionpublic Object get(String section, String key, boolean execute, RequestManager rMngr)
section
- the section name in the StyleTable objectkey
- the variable name within the sectionboolean
- indicating whether to execute a gadgetrMngr
- the current RequestManager objectpublic void put(String section, String key, Object data)
section
- the name of the section in the StyleTablekey
- the name of the Object.data
- the data to store in the Object.
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |