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
Deprecated.
since 5.9
|
static String |
CONTEXT_KEY_DRAFT
Deprecated.
since 5.9
|
static String |
CONTEXT_KEY_EDIT_PAGE_RESTRICTED
Deprecated.
since 5.9
|
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_ID |
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()
Deprecated.
since 5.9. Use
getPage() |
ConfluenceUser |
getCurrentUser() |
Draft |
getDraft()
Deprecated.
since 5.9. Use only if you still need access to legacy drafts, otherwise use
getPage() |
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.
|
Optional<Long> |
getSpaceId()
Returns the space-id of the space related to the web interface state, if such space exists.
|
String |
getSpaceKey()
Returns the space-key related to the web interface state, or null if there is no space-key.
|
ConfluenceUser |
getTargetedUser() |
boolean |
hasParameter(String key)
Returns true if the parameter has been set (even if it is set to null).
|
boolean |
isEditPageRestricted()
Deprecated.
since 5.9. Use proper permissions checks on the content
|
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_SPACE
static final String CONTEXT_KEY_SPACE_ID
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_PARENT_PAGE
@Deprecated static final String CONTEXT_KEY_DRAFT
@Deprecated static final String CONTEXT_KEY_CONTENT_DRAFT
@Deprecated static final String CONTEXT_KEY_EDIT_PAGE_RESTRICTED
ConfluenceUser getCurrentUser()
ConfluenceUser getTargetedUser()
AbstractPage getPage()
@Deprecated Draft getDraft()
getPage()
@Deprecated ContentEntityObject getContentDraft()
getPage()
Space getSpace()
Optional<Long> getSpaceId()
String getSpaceKey()
Comment getComment()
DisplayableLabel getLabel()
Attachment getAttachment()
PersonalInformation getPersonalInformation()
Object getParameter(String key)
boolean hasParameter(String key)
Map<String,Object> toMap()
@Deprecated boolean isEditPageRestricted()
AbstractPage getParentPage()
Copyright © 2003–2020 Atlassian. All rights reserved.