org.gcube.portlets.user.homelibrary.home.manager
Interface HomeLibraryManager


public interface HomeLibraryManager

This class define a list of methods to manage users homes.

Author:
Federico De Faveri defaveri@isti.cnr.it

Method Summary
 void copyScopeHomes(java.lang.String sourceScope, java.lang.String destinationScope, ContentCopyMode mode)
          Copy the specified vre homes to destination vre.
 boolean copyWorkspaceContent(java.lang.String sourceScope, java.lang.String sourceUser, java.lang.String destinationScope, java.lang.String destinationUser, ContentCopyMode mode)
          Copy the a user workspace content to another user workspace.
 

Method Detail

copyScopeHomes

void copyScopeHomes(java.lang.String sourceScope,
                    java.lang.String destinationScope,
                    ContentCopyMode mode)
                    throws InternalErrorException,
                           ScopeNotFoundException,
                           HomeNotFoundException,
                           WorkspaceNotFoundException
Copy the specified vre homes to destination vre. If the copied home already exists on destination vre the content is copied inside.

Parameters:
sourceScope - the source vre.
destinationScope - the destination vre.
mode - the copy mode.
Throws:
InternalErrorException - if an error occurs.
ScopeNotFoundException - if a specified scope don't exists.
WorkspaceNotFoundException - if a specified user workspace is not found.
HomeNotFoundException - if a specified user home is not found.

copyWorkspaceContent

boolean copyWorkspaceContent(java.lang.String sourceScope,
                             java.lang.String sourceUser,
                             java.lang.String destinationScope,
                             java.lang.String destinationUser,
                             ContentCopyMode mode)
                             throws InternalErrorException,
                                    ScopeNotFoundException,
                                    UserNotFoundException,
                                    HomeNotFoundException,
                                    WorkspaceNotFoundException
Copy the a user workspace content to another user workspace.

Parameters:
sourceScope - the source scope.
sourceUser - the source user.
destinationScope - the destination scope.
destinationUser - the destination user.
mode - the copy mode.
Returns:
true if the copy have terminated successfully.
Throws:
InternalErrorException - if an error occurs.
ScopeNotFoundException - if a specified scope don't exists.
UserNotFoundException - if a specified user don't exists.
HomeNotFoundException - if a specified user home is not found.
WorkspaceNotFoundException - if a specified user workspace is not found.