|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.plugin.descriptor.web.DefaultWebInterfaceContext
public class DefaultWebInterfaceContext
Implementation which stores everything in a map for easy conversion and copying, if not type safety.
Field Summary |
---|
Fields inherited from interface com.atlassian.confluence.plugin.descriptor.web.WebInterfaceContext |
---|
CONTEXT_KEY_ATTACHMENT, CONTEXT_KEY_COMMENT, CONTEXT_KEY_DRAFT, CONTEXT_KEY_EDIT_PAGE_RESTRICTED, CONTEXT_KEY_LABEL, CONTEXT_KEY_PAGE, CONTEXT_KEY_PARENT_PAGE, CONTEXT_KEY_PERSONAL_INFORMATION, CONTEXT_KEY_SPACE, CONTEXT_KEY_SPACE_KEY, CONTEXT_KEY_TARGET_USER, CONTEXT_KEY_USER |
Constructor Summary | |
---|---|
DefaultWebInterfaceContext()
|
|
DefaultWebInterfaceContext(java.util.Map<java.lang.String,java.lang.Object> context)
Creates a web interface context from a map generated by toMap() . |
|
DefaultWebInterfaceContext(WebInterfaceContext webInterfaceContext)
Copy constructor: construct a web interface context from another existing context. |
Method Summary | |
---|---|
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. |
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. |
java.lang.Object |
getParameter(java.lang.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. |
java.lang.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. |
com.atlassian.user.User |
getUser()
Deprecated. |
boolean |
hasParameter(java.lang.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. |
void |
setAttachment(Attachment attachment)
|
void |
setComment(Comment comment)
|
void |
setCurrentUser(ConfluenceUser user)
Set the current user on the context |
void |
setIsEditPageRestricted(boolean restricted)
|
void |
setLabel(DisplayableLabel label)
|
void |
setPage(AbstractPage page)
|
void |
setParameter(java.lang.String key,
java.lang.Object value)
|
void |
setPersonalInformation(PersonalInformation personalInformation)
|
void |
setSpace(Space space)
|
void |
setTargetedUser(ConfluenceUser user)
|
void |
setTargetUser(com.atlassian.user.User user)
Deprecated. since 5.2 |
void |
setUser(com.atlassian.user.User user)
Deprecated. since 5.2. See setCurrentUser(ConfluenceUser) . |
java.util.Map<java.lang.String,java.lang.Object> |
toMap()
Converts the parameters into a map using the "context keys" defined as constants in this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultWebInterfaceContext()
public DefaultWebInterfaceContext(java.util.Map<java.lang.String,java.lang.Object> context)
toMap()
.
context
- the context parameters in a mappublic DefaultWebInterfaceContext(WebInterfaceContext webInterfaceContext)
toMap()
and DefaultWebInterfaceContext(Map)
for construction.
webInterfaceContext
- the other context to copy the parameters fromMethod Detail |
---|
@Deprecated public com.atlassian.user.User getUser()
WebInterfaceContext
getUser
in interface WebInterfaceContext
public ConfluenceUser getCurrentUser()
getCurrentUser
in interface WebInterfaceContext
@Deprecated public void setUser(com.atlassian.user.User user)
setCurrentUser(ConfluenceUser)
.
user
- public void setCurrentUser(ConfluenceUser user)
user
- the current userpublic AbstractPage getPage()
WebInterfaceContext
getPage
in interface WebInterfaceContext
public Draft getDraft()
WebInterfaceContext
getDraft
in interface WebInterfaceContext
public void setPage(AbstractPage page)
public Space getSpace()
WebInterfaceContext
getSpace
in interface WebInterfaceContext
public java.lang.String getSpaceKey()
WebInterfaceContext
getSpaceKey
in interface WebInterfaceContext
public void setSpace(Space space)
public Comment getComment()
WebInterfaceContext
getComment
in interface WebInterfaceContext
public void setComment(Comment comment)
public DisplayableLabel getLabel()
WebInterfaceContext
getLabel
in interface WebInterfaceContext
public void setLabel(DisplayableLabel label)
public Attachment getAttachment()
WebInterfaceContext
getAttachment
in interface WebInterfaceContext
public void setAttachment(Attachment attachment)
public PersonalInformation getPersonalInformation()
WebInterfaceContext
getPersonalInformation
in interface WebInterfaceContext
public void setPersonalInformation(PersonalInformation personalInformation)
public java.lang.Object getParameter(java.lang.String key)
WebInterfaceContext
getParameter
in interface WebInterfaceContext
public boolean hasParameter(java.lang.String key)
WebInterfaceContext
hasParameter
in interface WebInterfaceContext
public void setParameter(java.lang.String key, java.lang.Object value)
public java.util.Map<java.lang.String,java.lang.Object> toMap()
WebInterfaceContext
toMap
in interface WebInterfaceContext
@Deprecated public com.atlassian.user.User getTargetUser()
WebInterfaceContext
getTargetUser
in interface WebInterfaceContext
public ConfluenceUser getTargetedUser()
getTargetedUser
in interface WebInterfaceContext
@Deprecated public void setTargetUser(com.atlassian.user.User user)
user
- public void setTargetedUser(ConfluenceUser user)
user
- the user targeted by the current action.public void setIsEditPageRestricted(boolean restricted)
public boolean isEditPageRestricted()
WebInterfaceContext
isEditPageRestricted
in interface WebInterfaceContext
public AbstractPage getParentPage()
WebInterfaceContext
getParentPage
in interface WebInterfaceContext
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |