|
Jive API (3.0.13) Core Javadocs | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jivesoftware.community.widget.BaseWidgetContext
public class BaseWidgetContext
The widget context is passed to all Widgets when the render method is invoked. The
context contains key information about the container of the widget, providing widget authors
access the the information required to render the widget appropriately. By default the
BaseWidgetContext is used, widgets may also use subclasses BlogWidgetContext, UserProfileWidgetContext,
and ProjectWidgetContext.
| Constructor Summary | |
|---|---|
BaseWidgetContext(User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response)
Creates a BaseWidgetContext whose type is WidgetType.COMMUNITY with all the necessary
information for a widget author to render their widget. |
|
BaseWidgetContext(WidgetTypeDescriptor type,
User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response,
boolean edit)
Creates a BaseWidgetContext of a given type with all the necessary
information for a widget author to render their widget. |
|
BaseWidgetContext(WidgetTypeDescriptor type,
User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response,
boolean edit,
boolean remote)
Creates a BaseWidgetContext of a given type with all the necessary
information for a widget author to render their widget. |
|
BaseWidgetContext(WidgetTypeDescriptor type,
User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response,
boolean edit,
boolean remote,
Locale locale)
Creates a BaseWidgetContext of a given type with all the necessary
information for a widget author to render their widget. |
|
| Method Summary | |
|---|---|
AuthToken |
getAuthToken()
Gets the current page user's auth token |
JiveContainer |
getContainer()
Subclasses should override this method to provide their container. |
Locale |
getLocale()
Returns the locale if this context requires special logic for locale, otherwise null. |
HttpServletRequest |
getRequest()
Gets the http servlet request object |
HttpServletResponse |
getResponse()
Gets the http servlet response object |
User |
getUser()
Gets the current page user, or null if annonymous |
WidgetTypeDescriptor |
getWidgetType()
Gets the widget type for the current context. |
boolean |
isEdit()
Returns true if the parent container is currently in edit mode and false if it is not. |
boolean |
isRemote()
Returns true if the context is remote, otherwise false if local. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseWidgetContext(WidgetTypeDescriptor type,
User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response,
boolean edit,
boolean remote,
Locale locale)
BaseWidgetContext of a given type with all the necessary
information for a widget author to render their widget.
type - the type of widgetuser - the page userauthToken - the auth token of the page userrequest - the http servlet request objectresponse - the http servlet response objectedit - specifies wether the parent container is currently in edit mode.remote - specifies whether the context is remote
public BaseWidgetContext(WidgetTypeDescriptor type,
User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response,
boolean edit,
boolean remote)
BaseWidgetContext of a given type with all the necessary
information for a widget author to render their widget.
type - the type of widgetuser - the page userauthToken - the auth token of the page userrequest - the http servlet request objectresponse - the http servlet response objectedit - specifies wether the parent container is currently in edit mode.remote - specifies whether the context is remote
public BaseWidgetContext(WidgetTypeDescriptor type,
User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response,
boolean edit)
BaseWidgetContext of a given type with all the necessary
information for a widget author to render their widget.
type - the type of widgetuser - the page userauthToken - the auth token of the page userrequest - the http servlet request objectresponse - the http servlet response objectedit - specifies wether the parent container is currently in edit mode.
public BaseWidgetContext(User user,
AuthToken authToken,
HttpServletRequest request,
HttpServletResponse response)
BaseWidgetContext whose type is WidgetType.COMMUNITY with all the necessary
information for a widget author to render their widget.
user - the page userauthToken - the auth token of the page userrequest - the http servlet request objectresponse - the http servlet response object| Method Detail |
|---|
public WidgetTypeDescriptor getWidgetType()
public User getUser()
public AuthToken getAuthToken()
public HttpServletRequest getRequest()
public HttpServletResponse getResponse()
public boolean isEdit()
public boolean isRemote()
public Locale getLocale()
public JiveContainer getContainer()
|
Jive Product Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||