com.atlassian.confluence.rpc.soap.services
Class SoapServiceHelperImpl

java.lang.Object
  extended by com.atlassian.confluence.rpc.soap.services.SoapServiceHelperImpl
All Implemented Interfaces:
SoapServiceHelper

public class SoapServiceHelperImpl
extends Object
implements SoapServiceHelper


Field Summary
protected  ContentEntityManager contentEntityManager
           
protected  LinkManager linkManager
           
protected  PageManager pageManager
           
protected  PermissionManager permissionManager
           
protected  SpaceManager spaceManager
           
protected  UserAccessor userAccessor
           
 
Constructor Summary
SoapServiceHelperImpl()
           
 
Method Summary
 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.
 com.atlassian.user.User 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spaceManager

protected SpaceManager spaceManager

permissionManager

protected PermissionManager permissionManager

pageManager

protected PageManager pageManager

linkManager

protected LinkManager linkManager

userAccessor

protected UserAccessor userAccessor

contentEntityManager

protected ContentEntityManager contentEntityManager
Constructor Detail

SoapServiceHelperImpl

public SoapServiceHelperImpl()
Method Detail

setUserAccessor

public void setUserAccessor(UserAccessor userAccessor)

setSpaceManager

public void setSpaceManager(SpaceManager spaceManager)

setPageManager

public void setPageManager(PageManager pageManager)

setLinkManager

public void setLinkManager(LinkManager linkManager)

setPermissionManager

public void setPermissionManager(PermissionManager permissionManager)

setContentEntityManager

public void setContentEntityManager(ContentEntityManager contentEntityManager)

retrieveContent

public ContentEntityObject retrieveContent(long contentId)
                                    throws RemoteException
Description copied from interface: SoapServiceHelper
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.

Specified by:
retrieveContent in interface SoapServiceHelper
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:
retrieveSpace in interface SoapServiceHelper
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:
retrieveAbstractPage in interface SoapServiceHelper
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:
retrievePage in interface SoapServiceHelper
Throws:
RemoteException

retrieveUser

public com.atlassian.user.User retrieveUser(String username)
                                     throws RemoteException
Description copied from interface: SoapServiceHelper
Retrieves the user with the given username

Specified by:
retrieveUser in interface SoapServiceHelper
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:
assertCanView in interface SoapServiceHelper
Throws:
RemoteException

assertCanView

public void assertCanView(Space space)
                   throws RemoteException
Specified by:
assertCanView in interface SoapServiceHelper
Throws:
RemoteException

assertCanModifyObject

public void assertCanModifyObject(Object obj,
                                  String typeDescription)
                           throws NotPermittedException
Description copied from interface: SoapServiceHelper
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

Specified by:
assertCanModifyObject in interface SoapServiceHelper
Parameters:
obj - the target object
typeDescription - 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:
assertCanCreatePage in interface SoapServiceHelper
Throws:
RemoteException

assertCanCreateBlogPost

public void assertCanCreateBlogPost(Space space)
                             throws RemoteException
Specified by:
assertCanCreateBlogPost in interface SoapServiceHelper
Throws:
RemoteException

assertCanModify

public void assertCanModify(AbstractPage page)
                     throws RemoteException
Specified by:
assertCanModify in interface SoapServiceHelper
Throws:
RemoteException

assertCanRemove

public void assertCanRemove(AbstractPage page)
                     throws RemoteException
Throw an exception if the user can't remove the given page.

Specified by:
assertCanRemove in interface SoapServiceHelper
Throws:
RemoteException

assertCanAdminister

public void assertCanAdminister()
                         throws RemoteException
Specified by:
assertCanAdminister in interface SoapServiceHelper
Throws:
RemoteException

assertCanExport

public void assertCanExport(Space space)
                     throws RemoteException
Specified by:
assertCanExport in interface SoapServiceHelper
Throws:
RemoteException

assertCanAdminister

public void assertCanAdminister(Space space)
                         throws RemoteException
Specified by:
assertCanAdminister in interface SoapServiceHelper
Throws:
RemoteException


Copyright © 2003-2012 Atlassian. All Rights Reserved.