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 java.lang.Object
implements SoapServiceHelper


Field Summary
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(java.lang.Object obj, java.lang.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.
 Page retrievePage(java.lang.String spaceKey, java.lang.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(java.lang.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(java.lang.String username)
          Retrieves the user with the given username
 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
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)

retrieveSpace

public Space retrieveSpace(java.lang.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(java.lang.String spaceKey,
                         java.lang.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(java.lang.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(java.lang.Object obj,
                                  java.lang.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-2010 Atlassian. All Rights Reserved.