|
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 | +--ORG.oclc.obi.util.Topics
The Topics class is a utility set of methods used to manipulate various lists of Topic Areas. Such as build a list of checkbox to add to a FORM or filter database list based on this list from a user profile.
ZUserData
,
TopicEntry
,
TopicLoader
,
UserStateObject
Field Summary | |
protected static Hashtable |
dbPageHotLinks
|
Constructor Summary | |
Topics()
Constructs a Topics object. |
Method Summary | |
static String |
buildDatabasePageHotLinks(Vector topicList,
String anchorCommand,
String color,
String font)
Builds the a set of TABLE rows, each of which contains an HTML anchors for each TopicEntry the Vector. NOTE: If topicList, matches the global vector of TopicEntry(s), then return the statically built dbPageHotLinks String. |
static String |
buildDatabasePageHotLinks(Vector topicList,
String anchorCommand,
String color,
String font,
int numAnchorPerLine)
Builds the a set of TABLE rows, each of which contains an HTML anchors for each TopicEntry the Vector. NOTE: If topicList, matches the global vector of TopicEntry(s), then return the statically built dbPageHotLinks String. |
static String |
buildDatabasePageHotLinks(Vector topicList,
String anchorCommand,
String color,
String font,
String background,
int numAnchorPerLine)
Builds the a set of TABLE rows, each of which contains an HTML anchors for each TopicEntry the Vector. NOTE: If topicList, matches the global vector of TopicEntry(s), then return the statically built dbPageHotLinks String. |
static String |
buildQuickSearchBoxes(UserStateObject user,
String topicNames,
String font)
Create a set of HTML checkboxes for the set of "QuickSearch" TopicEntry(s). |
static Vector |
cloneUserTopics(UserStateObject user)
Clone the Vector of TopicEntry(s) and update the UserStateObject entity userTopics. |
static Vector |
cloneUserTopics(UserStateObject user,
boolean updateUserState)
Clone the Vector of TopicEntry(s) and update the UserStateObject entity userTopics if the input flag indicates to do so. |
static Vector |
cloneUserTopics(Vector allTopics,
UserStateObject user,
boolean updateUserState)
Clone the complete Vector of TopicEntry(s), add the user-defined Topics and update the UserStateObject entity userTopics if the input flag indicates to do so. |
static Vector |
filterUserTopics(UserStateObject user,
String topicNames)
Remove any TopicEntry that a user is not allowed to see. |
static Vector |
filterUserTopics(UserStateObject user,
String topicNames,
boolean retainUserDefinedTopics)
Remove any TopicEntry that a user is not allowed to see. |
static TopicEntry |
findEntry(Vector topicAreas,
String name)
Find a TopicEntry in the list of Topics. |
static TopicEntry |
findEntrybyLongName(Vector topicAreas,
String name)
Find a TopicEntry in the list of Topics by longname. |
static String |
getDbCheckBoxes(UserStateObject user,
String topicName)
Retrieve the named TopicEntry's list database as a set HTML checkbox for the current user. |
static String |
getDbCheckBoxes(UserStateObject user,
String topicName,
int numBoxPerLine)
Retrieve the named TopicEntry's list database as a set HTML checkbox for the current user. |
static String |
getDbgroupFromTopics(UserStateObject user,
String topicName)
Retrieve the named TopicEntry's database group name for the current user. |
static String |
getDbnameFromTopics(UserStateObject user,
String topicName)
Retrieve a space seperated list of database name for the named TopicEntry for the current user. |
static TopicEntry |
getDefaultTopicEntry()
Retrieves the default TopicEntry. |
static Vector |
getTopicList()
Retrieves the default list of TopicEntry(s). |
static String |
getTopicLongNames(UserStateObject user,
String topicName,
String separator)
Retrieves a String containing a list of LongNames for the input topic name where the separator provided is used to delimit multiple topic names. |
static Vector |
getUserTopics(UserStateObject user)
Retrieves a user's Vector of TopicEntry(s). |
static boolean |
isAllowed(String dbname,
TopicEntry entry)
Determines if a dbname is NOT allowed in a TopicEntry's database list |
static Vector |
relatedTopics(Vector topicList,
String dbname)
Builds a list of related TopicEntry for a database name. |
static void |
resetDbList(UserStateObject user,
Vector dblist)
Resets the user's Topics after authorization. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static Hashtable dbPageHotLinks
Constructor Detail |
public Topics()
Method Detail |
public static Vector filterUserTopics(UserStateObject user, String topicNames)
user
- the current userthe
- list of avaliable TopicEnty(s)public static Vector filterUserTopics(UserStateObject user, String topicNames, boolean retainUserDefinedTopics)
user
- the current userthe
- list of avaliable TopicEnty(s)retainUserDefinedTopics
- indicates whether the filtered listpublic static void resetDbList(UserStateObject user, Vector dblist)
user
- user State Objectdblist
- the list of authorized databasespublic static TopicEntry findEntry(Vector topicAreas, String name)
topicAreas
- the vector of topic areasname
- the name of the TopicEntrypublic static TopicEntry findEntrybyLongName(Vector topicAreas, String name)
topicAreas
- the vector of topic areasname
- the longname to look forpublic static Vector cloneUserTopics(UserStateObject user)
Vector
- Vector of TopicEntr(s) to clonepublic static Vector cloneUserTopics(UserStateObject user, boolean updateUserState)
Vector
- Vector of TopicEntr(s) to cloneupdateUserState
- boolean indicating whether the cloned vector should
be saved as the user's topic list.public static Vector cloneUserTopics(Vector allTopics, UserStateObject user, boolean updateUserState)
Vector
- complete list of TopicsUserStateObject
- from which to get user's topicsupdateUserState
- boolean indicating whether the cloned vector should
be saved as the user's topic list.public static String getDbCheckBoxes(UserStateObject user, String topicName)
user
- the user state objecttopicName
- the topic areapublic static String getDbCheckBoxes(UserStateObject user, String topicName, int numBoxPerLine)
user
- the user state objecttopicName
- the topic areanumBoxPerLine
- the number of check boxes per linepublic static String getDbgroupFromTopics(UserStateObject user, String topicName)
user
- the user state objecttopicName
- the topic areapublic static String getDbnameFromTopics(UserStateObject user, String topicName)
user
- the user state objecttopicName
- the topic areapublic static String getTopicLongNames(UserStateObject user, String topicName, String separator)
user
- the user state objecttopicName
- the topic areapublic static Vector relatedTopics(Vector topicList, String dbname)
topicList
- the Vector TopicEntry(s) to checkdbname
- the database name to locate related TopicEntry(s) forpublic static String buildQuickSearchBoxes(UserStateObject user, String topicNames, String font)
topicName
- the list of "QuickSearch" TopicEntry(s)font
- the open font tag to usepublic static String buildDatabasePageHotLinks(Vector topicList, String anchorCommand, String color, String font)
topicList
- the Vector of TopicEntry(s)linkType
- the URL to use in the anchorcolor
- the color to make TABLE cellfont
- the font to usepublic static String buildDatabasePageHotLinks(Vector topicList, String anchorCommand, String color, String font, int numAnchorPerLine)
topicList
- the Vector of TopicEntry(s)linkType
- the URL to use in the anchorcolor
- the color to make TABLE cellfont
- the font to usenumAnchorPerLine
- the number of anchors boxes per linepublic static String buildDatabasePageHotLinks(Vector topicList, String anchorCommand, String color, String font, String background, int numAnchorPerLine)
topicList
- the Vector of TopicEntry(s)linkType
- the URL to use in the anchorcolor
- the color to make TABLE cellbackground
- the background gif to use in the TABLE cellfont
- the font to usenumAnchorPerLine
- the number of anchors boxes per linepublic static boolean isAllowed(String dbname, TopicEntry entry)
dbname
- - name to checkentry
- - the TopicEntry's allowed database list to checkpublic static TopicEntry getDefaultTopicEntry()
public static Vector getTopicList()
public static Vector getUserTopics(UserStateObject user)
user
- the User State Object
|
Open SiteSearch 4.1.1 Final |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |