Class SoapServiceHelperImpl
- java.lang.Object
-
- com.atlassian.confluence.rpc.soap.services.SoapServiceHelperImpl
-
- All Implemented Interfaces:
SoapServiceHelper
public class SoapServiceHelperImpl extends Object implements SoapServiceHelper
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentEntityManagercontentEntityManagerprotected PageManagerpageManagerprotected PermissionManagerpermissionManagerprotected SpaceManagerspaceManagerprotected UserAccessoruserAccessorprotected WebSudoManagerwebSudoManager
-
Constructor Summary
Constructors Constructor Description SoapServiceHelperImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertCanAdminister()voidassertCanAdminister(Space space)voidassertCanCreateBlogPost(Space space)voidassertCanCreatePage(Space space)voidassertCanExport(Space space)voidassertCanModify(AbstractPage page)voidassertCanModifyObject(Object obj, String typeDescription)Determines if the current user can modify/edit the given objectvoidassertCanRemove(AbstractPage page)Throw an exception if the user can't remove the given page.voidassertCanView(AbstractPage page)voidassertCanView(Space space)voidassertHasValidWebSudoSession()AbstractPageretrieveAbstractPage(long abstractPageId)Retrieves a given page, and throws RemoteException if the page is not found or the user has no view perm.ContentEntityObjectretrieveContent(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.PageretrievePage(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.SpaceretrieveSpace(String spaceKey)Retrieves a given space, and throws RemoteException if the space is not found or the user has no view perm.ConfluenceUserretrieveUser(String username)Retrieves the user with the given usernamevoidsetContentEntityManager(ContentEntityManager contentEntityManager)voidsetPageManager(PageManager pageManager)voidsetPermissionManager(PermissionManager permissionManager)voidsetSpaceManager(SpaceManager spaceManager)voidsetUserAccessor(UserAccessor userAccessor)voidsetWebSudoManager(WebSudoManager webSudoManager)
-
-
-
Field Detail
-
spaceManager
protected SpaceManager spaceManager
-
permissionManager
protected PermissionManager permissionManager
-
pageManager
protected PageManager pageManager
-
userAccessor
protected UserAccessor userAccessor
-
contentEntityManager
protected ContentEntityManager contentEntityManager
-
webSudoManager
protected WebSudoManager webSudoManager
-
-
Method Detail
-
setWebSudoManager
public void setWebSudoManager(WebSudoManager webSudoManager)
-
setUserAccessor
public void setUserAccessor(UserAccessor userAccessor)
-
setSpaceManager
public void setSpaceManager(SpaceManager spaceManager)
-
setPageManager
public void setPageManager(PageManager pageManager)
-
setPermissionManager
public void setPermissionManager(PermissionManager permissionManager)
-
setContentEntityManager
public void setContentEntityManager(ContentEntityManager contentEntityManager)
-
retrieveContent
public ContentEntityObject retrieveContent(long contentId) throws RemoteException
Description copied from interface:SoapServiceHelperRetrieves 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.- Specified by:
retrieveContentin interfaceSoapServiceHelper- Parameters:
contentId- the ID of the content to retrieve- Returns:
- the associated content object
- Throws:
RemoteException- if the user lacks VIEW permission or the content does not exist
-
retrieveSpace
public Space retrieveSpace(String spaceKey) throws RemoteException
Retrieves a given space, and throws RemoteException if the space is not found or the user has no view perm.- Specified by:
retrieveSpacein interfaceSoapServiceHelper- Throws:
RemoteException
-
retrieveAbstractPage
public AbstractPage retrieveAbstractPage(long abstractPageId) throws RemoteException
Retrieves a given page, and throws RemoteException if the page is not found or the user has no view perm.- Specified by:
retrieveAbstractPagein interfaceSoapServiceHelper- Throws:
RemoteException
-
retrievePage
public Page retrievePage(String spaceKey, String pageTitle) throws RemoteException
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.- Specified by:
retrievePagein interfaceSoapServiceHelper- Throws:
RemoteException
-
retrieveUser
public ConfluenceUser retrieveUser(String username) throws RemoteException
Description copied from interface:SoapServiceHelperRetrieves the user with the given username- Specified by:
retrieveUserin interfaceSoapServiceHelper- Parameters:
username- the username of the user- Returns:
- The User instance corresponding to the user
- Throws:
RemoteException- if the username is empty or null
-
assertCanView
public void assertCanView(AbstractPage page) throws RemoteException
- Specified by:
assertCanViewin interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanView
public void assertCanView(Space space) throws RemoteException
- Specified by:
assertCanViewin interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanModifyObject
public void assertCanModifyObject(Object obj, String typeDescription) throws NotPermittedException
Description copied from interface:SoapServiceHelperDetermines if the current user can modify/edit the given objectIf the current user is a super-user, they will automatically pass this test
- Specified by:
assertCanModifyObjectin interfaceSoapServiceHelper- Parameters:
obj- the target objecttypeDescription- the type of object (e.g. "labels")- Throws:
NotPermittedException- if the user lacks EDIT permission
-
assertCanCreatePage
public void assertCanCreatePage(Space space) throws RemoteException
- Specified by:
assertCanCreatePagein interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanCreateBlogPost
public void assertCanCreateBlogPost(Space space) throws RemoteException
- Specified by:
assertCanCreateBlogPostin interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanModify
public void assertCanModify(AbstractPage page) throws RemoteException
- Specified by:
assertCanModifyin interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanRemove
public void assertCanRemove(AbstractPage page) throws RemoteException
Throw an exception if the user can't remove the given page.- Specified by:
assertCanRemovein interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanAdminister
public void assertCanAdminister() throws RemoteException- Specified by:
assertCanAdministerin interfaceSoapServiceHelper- Throws:
RemoteException
-
assertHasValidWebSudoSession
public void assertHasValidWebSudoSession() throws RemoteException- Specified by:
assertHasValidWebSudoSessionin interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanExport
public void assertCanExport(Space space) throws RemoteException
- Specified by:
assertCanExportin interfaceSoapServiceHelper- Throws:
RemoteException
-
assertCanAdminister
public void assertCanAdminister(Space space) throws RemoteException
- Specified by:
assertCanAdministerin interfaceSoapServiceHelper- Throws:
RemoteException
-
-