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 |
---|---|
@Nullable Attachment |
getAttachment()
Returns the attachment related to the web interface state, or null if there is no attachment.
|
@Nullable Comment |
getComment()
Returns the comment related to the web interface state, or null if there is no comment.
|
@Nullable ContentEntityObject |
getContentDraft()
Deprecated.
since 5.9. Use
getPage() |
@Nullable ConfluenceUser |
getCurrentUser() |
@Nullable Draft |
getDraft()
Deprecated.
since 5.9. Use only if you still need access to legacy drafts, otherwise use
getPage() |
@Nullable DisplayableLabel |
getLabel()
Returns the label related to the web interface state, or null if there is no label.
|
@Nullable AbstractPage |
getPage()
Returns the page related to the web interface state, or null if there is no page.
|
@Nullable Object |
getParameter(String key)
Returns a custom parameter, or null if the parameter has not been set.
|
@Nullable AbstractPage |
getParentPage()
Returns the parent page related to the web interface state, or null if there is no parent page.
|
@Nullable PersonalInformation |
getPersonalInformation()
Returns the personal information (i.e.
|
@Nullable 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.
|
@Nullable String |
getSpaceKey()
Returns the space-key related to the web interface state, or null if there is no space-key.
|
@Nullable 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
@Nullable ConfluenceUser getCurrentUser()
@Nullable ConfluenceUser getTargetedUser()
@Nullable AbstractPage getPage()
@Deprecated @Nullable Draft getDraft()
getPage()
@Deprecated @Nullable ContentEntityObject getContentDraft()
getPage()
@Nullable Space getSpace()
Optional<Long> getSpaceId()
@Nullable String getSpaceKey()
@Nullable Comment getComment()
@Nullable DisplayableLabel getLabel()
@Nullable Attachment getAttachment()
@Nullable PersonalInformation getPersonalInformation()
@Nullable Object getParameter(String key)
boolean hasParameter(String key)
Map<String,Object> toMap()
@Deprecated boolean isEditPageRestricted()
@Nullable AbstractPage getParentPage()
Copyright © 2003–2021 Atlassian. All rights reserved.