public interface WebInterfaceContext
toMap()
is also used as a Velocity context for rendering URLs.
Parameters that are only used in a couple of places can be retrieved without type-safe
accessors via getParameter(String)
or hasParameter(String)
.BaseConfluenceCondition
,
ConfluenceWebInterfaceManager
Modifier and Type | Field and Description |
---|---|
static String |
CONTEXT_KEY_ATTACHMENT |
static String |
CONTEXT_KEY_COMMENT |
static String |
CONTEXT_KEY_CONTENT_DRAFT |
static String |
CONTEXT_KEY_DRAFT |
static String |
CONTEXT_KEY_EDIT_PAGE_RESTRICTED |
static String |
CONTEXT_KEY_LABEL |
static String |
CONTEXT_KEY_PAGE |
static String |
CONTEXT_KEY_PARENT_PAGE |
static String |
CONTEXT_KEY_PERSONAL_INFORMATION |
static String |
CONTEXT_KEY_SPACE |
static String |
CONTEXT_KEY_SPACE_KEY |
static String |
CONTEXT_KEY_TARGET_USER |
static String |
CONTEXT_KEY_USER |
Modifier and Type | Method and Description |
---|---|
Attachment |
getAttachment()
Returns the attachment related to the web interface state, or null if there is no attachment.
|
Comment |
getComment()
Returns the comment related to the web interface state, or null if there is no comment.
|
ContentEntityObject |
getContentDraft()
Returns a draft related to the web interface state, or null if there is no draft.
|
ConfluenceUser |
getCurrentUser() |
Draft |
getDraft()
Returns a draft related to the web interface state, or null if there is no draft.
|
DisplayableLabel |
getLabel()
Returns the label related to the web interface state, or null if there is no label.
|
AbstractPage |
getPage()
Returns the page related to the web interface state, or null if there is no page.
|
Object |
getParameter(String key)
Returns a custom parameter, or null if the parameter has not been set.
|
AbstractPage |
getParentPage()
Returns the parent page related to the web interface state, or null if there is no parent page.
|
PersonalInformation |
getPersonalInformation()
Returns the personal information (i.e.
|
Space |
getSpace()
Returns the space related to the web interface state, or null if there is no space.
|
String |
getSpaceKey()
Returns the space-key related to the web interface state, or null if there is no space-key.
|
ConfluenceUser |
getTargetedUser() |
com.atlassian.user.User |
getTargetUser()
Deprecated.
since 5.2. See
getTargetedUser() . |
com.atlassian.user.User |
getUser()
Deprecated.
since 5.2. See
getCurrentUser() instead. |
boolean |
hasParameter(String key)
Returns true if the parameter has been set (even if it is set to null).
|
boolean |
isEditPageRestricted()
Indicates if the current edit page is restricted (i.e.
|
Map<String,Object> |
toMap()
Converts the parameters into a map using the "context keys" defined as constants in this class.
|
static final String CONTEXT_KEY_USER
static final String CONTEXT_KEY_TARGET_USER
static final String CONTEXT_KEY_PAGE
static final String CONTEXT_KEY_DRAFT
static final String CONTEXT_KEY_CONTENT_DRAFT
static final String CONTEXT_KEY_SPACE
static final String CONTEXT_KEY_SPACE_KEY
static final String CONTEXT_KEY_COMMENT
static final String CONTEXT_KEY_LABEL
static final String CONTEXT_KEY_ATTACHMENT
static final String CONTEXT_KEY_PERSONAL_INFORMATION
static final String CONTEXT_KEY_EDIT_PAGE_RESTRICTED
static final String CONTEXT_KEY_PARENT_PAGE
@Deprecated com.atlassian.user.User getUser()
getCurrentUser()
instead.ConfluenceUser getCurrentUser()
@Deprecated com.atlassian.user.User getTargetUser()
getTargetedUser()
.ConfluenceUser getTargetedUser()
AbstractPage getPage()
Draft getDraft()
ContentEntityObject getContentDraft()
Space getSpace()
String getSpaceKey()
Comment getComment()
DisplayableLabel getLabel()
Attachment getAttachment()
PersonalInformation getPersonalInformation()
Object getParameter(String key)
boolean hasParameter(String key)
Map<String,Object> toMap()
boolean isEditPageRestricted()
AbstractPage getParentPage()
Copyright © 2003–2015 Atlassian. All rights reserved.