|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.admingui.common.handlers.TagSupport
public class TagSupport
This class provides API support for managing Tags.
| Field Summary | |
|---|---|
static java.lang.String |
BASE_NODE
This is the base Preferences node for tags. |
static java.lang.String |
TAG_DATA_KEY
This is the key used to access the tag data under the BASE_NODE Java Preferences API node. |
| Constructor Summary | |
|---|---|
TagSupport()
|
|
| Method Summary | |
|---|---|
static void |
addTag(java.lang.String tagName,
java.lang.String tagViewId,
java.lang.String displayName,
java.lang.String user)
This method adds a tag for the given tagViewId and
user. |
static void |
main(java.lang.String[] args)
|
static java.lang.String |
normalizeTagViewId(java.lang.String tagViewId)
tagViewId's are expected to be context relative paths. |
static java.util.List<Tag> |
queryTags(java.lang.String tagName,
java.lang.String tagViewId,
java.lang.String user)
This method searches the tags based on the given criteria. |
static void |
removeTag(java.lang.String tagName,
java.lang.String tagViewId,
java.lang.String user)
This method removes a Tag. |
| 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 BASE_NODE
This is the base Preferences node for tags.
public static final java.lang.String TAG_DATA_KEY
This is the key used to access the tag data under the
BASE_NODE Java Preferences API node.
| Constructor Detail |
|---|
public TagSupport()
| Method Detail |
|---|
public static void addTag(java.lang.String tagName,
java.lang.String tagViewId,
java.lang.String displayName,
java.lang.String user)
This method adds a tag for the given tagViewId and
user. If the tagViewId is new, it will store the
given displayName.
public static java.util.List<Tag> queryTags(java.lang.String tagName,
java.lang.String tagViewId,
java.lang.String user)
This method searches the tags based on the given criteria. Any of the criteria may be null, meaning not to filter by that criterion.
tagName - Name of the tag to find, not required. May be null
if tagViewId, or user is supplied -- or to return
all tags.tagViewId - Unique id for the page to search for tags. May be
null (for all pages).user - User id. From getUserPrincipal() in some cases?
Allow seeing tags created by specific users. May be
null (for all users).
null if nothing
is found.
public static void removeTag(java.lang.String tagName,
java.lang.String tagViewId,
java.lang.String user)
This method removes a Tag.
public static java.lang.String normalizeTagViewId(java.lang.String tagViewId)
tagViewId's are expected to be context relative paths. These tagViewId's may include QUERY_STRING parameters if they are used to determine the content of the page. This means, we must take extra special care to normalize the order of important QUERY_STRING properties. We also need to ensure leading (or intermediate) '/' characters are normalized, and that the extension is normalized (this method will ensure all tagViewId's end in .jsf).
Case will be preserved.
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||