|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.opensymphony.xwork.ActionSupport
com.jivesoftware.base.action.JiveActionSupport
public abstract class JiveActionSupport
A base action class that handles a set of common Jive code. This class extends the WebWork ActionSupport class which provides a lot of handy WebWork utilities.
This method has been declared abstract so it cannot be used directly. Action writers should extend the product-specific extension of this class, ie: ForumActionSupport (for Jive Forums) or KbActionSupport (for Jive Knowledge Base).
Field Summary | |
---|---|
static java.lang.String |
CANCEL
An action return type that indicates the user wants to cancel the current process. |
static java.lang.String |
DISABLED
An action return type that indicates the requested resource is disabled |
static java.lang.String |
FATAL
An action return type that indicates execution of the action suffered a fatal exception. |
static java.lang.String |
NOTFOUND
An action return type that indicates the requested resource was not found. |
protected User |
pageUser
|
protected javax.servlet.http.HttpServletRequest |
request
|
protected javax.servlet.http.HttpServletResponse |
response
|
static java.lang.String |
UNAUTHORIZED
An action return type that indicates the user is not authorized to what they requested. |
Fields inherited from class com.opensymphony.xwork.ActionSupport |
---|
LOG |
Fields inherited from interface com.opensymphony.xwork.Action |
---|
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Constructor Summary | |
---|---|
JiveActionSupport()
|
Method Summary | |
---|---|
java.lang.String |
execute()
|
AuthToken |
getAuthToken()
|
protected java.lang.String |
getGuestProperty(java.lang.String name)
Returns a guest property. |
java.lang.String |
getJiveProperty(java.lang.String propName)
Convenience method for looking up a jive property. |
java.util.List |
getLocales()
Returns a list of available locales as a sorted list of Locale objects. |
java.lang.String |
getPageURL()
Returns the URL of the current page as a string. |
abstract User |
getPageUser()
Returns the current page user's User object, or null if the user is a guest. |
java.util.Map |
getSession()
Convenience method to gain access to the session object |
java.lang.String |
getText(java.lang.String key)
Override the ActionSupport getText(..) so that MessageFormat class is not used when i18n entries do not have parameters, e.g. |
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List args,
com.opensymphony.xwork.util.OgnlValueStack stack)
Override the ActionSupport getText(..) so that MessageFormat is not used when i18n entries do not have parameters, e.g. |
java.util.TimeZone |
getTimeZone()
Returns the page user's time zone. |
java.lang.String[][] |
getTimeZones()
Returns a list of time zones as a double String array. |
protected boolean |
isFailedLookup(java.lang.String name)
Lookup cache - this should be used if you want to note and remember a lookup on a field. |
boolean |
isGuest()
Returns true if the page user is a guest or false if they're logged in. |
void |
setAuthToken(AuthToken authToken)
|
protected void |
setGuestProperty(java.lang.String name,
java.lang.String value)
Sets a guest cookie. |
void |
setLoginAttributes()
Sets the attributes required for login. |
protected void |
setPageUser(User pageUser)
Sets the page user to be used. |
void |
setServletRequest(javax.servlet.http.HttpServletRequest request)
|
void |
setServletResponse(javax.servlet.http.HttpServletResponse response)
|
void |
setUser(User user)
|
Methods inherited from class com.opensymphony.xwork.ActionSupport |
---|
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doDefault, doInput, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors, validate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FATAL
public static final java.lang.String CANCEL
public static final java.lang.String UNAUTHORIZED
Action.LOGIN
since the workflow in this
case can be more specific to the error (ie, the user is presented with "Sorry, you
don't have access to ..." instead of just pushing them to the login screen.
public static final java.lang.String NOTFOUND
public static final java.lang.String DISABLED
protected User pageUser
protected javax.servlet.http.HttpServletRequest request
protected javax.servlet.http.HttpServletResponse response
Constructor Detail |
---|
public JiveActionSupport()
Method Detail |
---|
public abstract User getPageUser()
This method has been declared abstract because subclasses will need to load the page user from a product-specific factory (ie, ForumFactory or KbFactory) in order to get the correct permissions set on it.
User
protected void setPageUser(User pageUser)
pageUser
- sets the page user to use.public void setUser(User user)
setUser
in interface UserAware
public void setAuthToken(AuthToken authToken)
setAuthToken
in interface AuthTokenAware
public AuthToken getAuthToken()
public boolean isGuest()
public java.util.Map getSession()
public java.lang.String getJiveProperty(java.lang.String propName)
propName
- the property to lookup
public java.util.List getLocales()
public java.util.TimeZone getTimeZone()
LocaleUtils.getTimeZone(javax.servlet.http.HttpServletRequest, User)
public java.lang.String[][] getTimeZones()
protected boolean isFailedLookup(java.lang.String name)
name
- The name to check for in the failed lookup cache
protected java.lang.String getGuestProperty(java.lang.String name)
name
- the name of the property to retieve.
protected void setGuestProperty(java.lang.String name, java.lang.String value)
name
- the name of the property to set.value
- the property value.public java.lang.String getPageURL()
public void setLoginAttributes()
public java.lang.String execute() throws java.lang.Exception
execute
in interface com.opensymphony.xwork.Action
execute
in class com.opensymphony.xwork.ActionSupport
java.lang.Exception
public void setServletRequest(javax.servlet.http.HttpServletRequest request)
setServletRequest
in interface com.opensymphony.webwork.interceptor.ServletRequestAware
public void setServletResponse(javax.servlet.http.HttpServletResponse response)
setServletResponse
in interface com.opensymphony.webwork.interceptor.ServletResponseAware
public java.lang.String getText(java.lang.String key)
ActionSupport.getText(String)
.
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue, java.util.List args, com.opensymphony.xwork.util.OgnlValueStack stack)
ActionSupport.getText(String, String, java.util.List, com.opensymphony.xwork.util.OgnlValueStack)
.
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |