|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.ui.aribaweb.util.AWCommunityContext
public class AWCommunityContext
This models the community context (which will be passed onto community when we click on a help link or to the in situ frame as we navigate in AN, Sourcing, etc). The context is a set of attributes. Not all have to be present (in some cases the application itself, or the page, or perhaps the domain object will be enough to determine the help or content to be shown to the user). The context consists of: Where (application, page) Activity (one of create, edit, review, approve, etc.) What (one of invoice, PO, contract, etc.) Tags (set of tags from the community vocabulary) Tags from othe domains (will allow on-the-fly creation of other domains -- for example "commodity" which we will not attempt to validate)
Nested Class Summary | |
---|---|
static class |
AWCommunityContext.DomainAndValue
We implement a tag with a domain so that always know the domain in which the tag is located. |
Field Summary | |
---|---|
static java.lang.String |
DomainActivity
|
static java.lang.String |
DomainApplication
|
static java.lang.String |
DomainDomainObject
|
static java.lang.String |
DomainPage
|
Constructor Summary | |
---|---|
AWCommunityContext()
|
Method Summary | |
---|---|
void |
addTags(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> tags)
Add a set of tags (may be from any domain, registered or not). |
void |
addTags(java.lang.String domain,
java.util.Set<java.lang.String> vals)
Add a set of tags (may be from any domain, registered or not) |
java.lang.String |
getActivity()
Return the activity being engaged in |
java.lang.String |
getApplication()
Return the application |
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getContextAsMap()
Generate a map (domain -> Set |
java.lang.String |
getContextAsTagsCSV()
Generate a CSV strings with all the tags. |
java.lang.String |
getPage()
Return the page |
static java.util.Set<java.lang.String> |
getRegisteredTags(java.lang.String domain)
Given a domain, return the set of tags registered for that domain. |
static java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
parseCommunityContext(java.lang.String inStr,
char seperator,
boolean ensureValid)
Given an input string of community context with a partiular seperator (say , or ;) break this up and return a map from domain to a set of values. |
static void |
registerTag(java.lang.String domain,
java.lang.String tag)
Register the tags in a particular domain. |
void |
setActivity(java.lang.String activity)
Set the activity engaged in by user |
void |
setApplication(java.lang.String application)
Set the application |
void |
setPage(java.lang.String page)
Set the page (this will be the AWPage.perfPageName by default) |
static java.lang.String |
tagCollectionToCSV(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> domainTagsAndVals)
Given a map from domain -> Set |
static java.lang.String |
tagCollectionToCSV(java.util.Set<AWCommunityContext.DomainAndValue> tags)
Given a set of pairs |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DomainDomainObject
public static final java.lang.String DomainApplication
public static final java.lang.String DomainPage
public static final java.lang.String DomainActivity
Constructor Detail |
---|
public AWCommunityContext()
Method Detail |
---|
public void addTags(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> tags)
tags
- map from domain to a set of stringspublic void addTags(java.lang.String domain, java.util.Set<java.lang.String> vals)
domain
- the type of tag (say activity, domainObject, page)vals
- set of values for that domainpublic void setPage(java.lang.String page)
page
- public java.lang.String getPage()
public void setApplication(java.lang.String application)
application
- public java.lang.String getApplication()
public void setActivity(java.lang.String activity)
activity
- -- should be from among ActionCreate, ActionEdit, etc.public java.lang.String getActivity()
public java.lang.String getContextAsTagsCSV()
public java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getContextAsMap()
public static void registerTag(java.lang.String domain, java.lang.String tag)
domain
- tag
- public static java.util.Set<java.lang.String> getRegisteredTags(java.lang.String domain)
domain
-
public static java.lang.String tagCollectionToCSV(java.util.Set<AWCommunityContext.DomainAndValue> tags)
tags
-
public static java.lang.String tagCollectionToCSV(java.util.Map<java.lang.String,java.util.Set<java.lang.String>> domainTagsAndVals)
domainTagsAndVals
-
public static java.util.Map<java.lang.String,java.util.Set<java.lang.String>> parseCommunityContext(java.lang.String inStr, char seperator, boolean ensureValid) throws AWGenericException
inStr
- inputseperator
- probably , or ;ensureValid
- if true then check that for registered domains that the values in that domain are indeed
registered and throw an exception if not
AWGenericException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |