public class SoapServiceHelperImpl extends Object implements SoapServiceHelper
Modifier and Type | Field and Description |
---|---|
protected ContentEntityManager |
contentEntityManager |
protected LinkManager |
linkManager |
protected PageManager |
pageManager |
protected PermissionManager |
permissionManager |
protected SpaceManager |
spaceManager |
protected UserAccessor |
userAccessor |
Constructor and Description |
---|
SoapServiceHelperImpl() |
Modifier and Type | Method and Description |
---|---|
void |
assertCanAdminister() |
void |
assertCanAdminister(Space space) |
void |
assertCanCreateBlogPost(Space space) |
void |
assertCanCreatePage(Space space) |
void |
assertCanExport(Space space) |
void |
assertCanModify(AbstractPage page) |
void |
assertCanModifyObject(Object obj,
String typeDescription)
Determines if the current user can modify/edit the given object
If the current user is a super-user, they will automatically pass this test
|
void |
assertCanRemove(AbstractPage page)
Throw an exception if the user can't remove the given page.
|
void |
assertCanView(AbstractPage page) |
void |
assertCanView(Space space) |
AbstractPage |
retrieveAbstractPage(long abstractPageId)
Retrieves a given page, and throws RemoteException if the page is not found or the user has no view perm.
|
ContentEntityObject |
retrieveContent(long contentId)
Retrieves the content with the given ID, throwing an exception if the content can not
be found, or the current user has not permission to view it.
|
Page |
retrievePage(String spaceKey,
String pageTitle)
Retrieves a given page by space key and page title, and throws RemoteException if the page is not found or the user has no view perm.
|
Space |
retrieveSpace(String spaceKey)
Retrieves a given space, and throws RemoteException if the space is not found or the user has no view perm.
|
ConfluenceUser |
retrieveUser(String username)
Retrieves the user with the given username
|
void |
setContentEntityManager(ContentEntityManager contentEntityManager) |
void |
setLinkManager(LinkManager linkManager) |
void |
setPageManager(PageManager pageManager) |
void |
setPermissionManager(PermissionManager permissionManager) |
void |
setSpaceManager(SpaceManager spaceManager) |
void |
setUserAccessor(UserAccessor userAccessor) |
protected SpaceManager spaceManager
protected PermissionManager permissionManager
protected PageManager pageManager
protected LinkManager linkManager
protected UserAccessor userAccessor
protected ContentEntityManager contentEntityManager
public void setUserAccessor(UserAccessor userAccessor)
public void setSpaceManager(SpaceManager spaceManager)
public void setPageManager(PageManager pageManager)
public void setLinkManager(LinkManager linkManager)
public void setPermissionManager(PermissionManager permissionManager)
public void setContentEntityManager(ContentEntityManager contentEntityManager)
public ContentEntityObject retrieveContent(long contentId) throws RemoteException
SoapServiceHelper
retrieveContent
in interface SoapServiceHelper
contentId
- the ID of the content to retrieveRemoteException
- if the user lacks VIEW permission or the content does not existpublic Space retrieveSpace(String spaceKey) throws RemoteException
retrieveSpace
in interface SoapServiceHelper
RemoteException
public AbstractPage retrieveAbstractPage(long abstractPageId) throws RemoteException
retrieveAbstractPage
in interface SoapServiceHelper
RemoteException
public Page retrievePage(String spaceKey, String pageTitle) throws RemoteException
retrievePage
in interface SoapServiceHelper
RemoteException
public ConfluenceUser retrieveUser(String username) throws RemoteException
SoapServiceHelper
retrieveUser
in interface SoapServiceHelper
username
- the username of the userRemoteException
- if the username is empty or nullpublic void assertCanView(AbstractPage page) throws RemoteException
assertCanView
in interface SoapServiceHelper
RemoteException
public void assertCanView(Space space) throws RemoteException
assertCanView
in interface SoapServiceHelper
RemoteException
public void assertCanModifyObject(Object obj, String typeDescription) throws NotPermittedException
SoapServiceHelper
assertCanModifyObject
in interface SoapServiceHelper
obj
- the target objecttypeDescription
- the type of object (e.g. "labels")NotPermittedException
- if the user lacks EDIT permissionpublic void assertCanCreatePage(Space space) throws RemoteException
assertCanCreatePage
in interface SoapServiceHelper
RemoteException
public void assertCanCreateBlogPost(Space space) throws RemoteException
assertCanCreateBlogPost
in interface SoapServiceHelper
RemoteException
public void assertCanModify(AbstractPage page) throws RemoteException
assertCanModify
in interface SoapServiceHelper
RemoteException
public void assertCanRemove(AbstractPage page) throws RemoteException
assertCanRemove
in interface SoapServiceHelper
RemoteException
public void assertCanAdminister() throws RemoteException
assertCanAdminister
in interface SoapServiceHelper
RemoteException
public void assertCanExport(Space space) throws RemoteException
assertCanExport
in interface SoapServiceHelper
RemoteException
public void assertCanAdminister(Space space) throws RemoteException
assertCanAdminister
in interface SoapServiceHelper
RemoteException
Copyright © 2003–2015 Atlassian. All rights reserved.