|
Clearspace API (2.5.18) 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. |
|
| Method Summary | |
|---|---|
AuthToken |
getAuthToken()
Gets the current page user's auth token |
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. |
| 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)
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()
|
Clearspace Project Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||