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(String sourceScope, String destinationScope, ContentCopyMode mode)
          Copy the specified scope homes to destination scope.
 boolean copyWorkspaceContent(String sourceScope, String sourceUser, String destinationScope, String destinationUser, ContentCopyMode mode)
          Copy the a user workspace content to another user workspace.
 void removeScope(String scope)
          Remove the specified scope with all contained homes.
 

Method Detail

copyScopeHomes

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

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

removeScope

void removeScope(String scope)
                 throws InternalErrorException
Remove the specified scope with all contained homes.

Parameters:
scope - the scope to remove.
Throws:
InternalErrorException - if an error occurs removing the specified scope.

copyWorkspaceContent

boolean copyWorkspaceContent(String sourceScope,
                             String sourceUser,
                             String destinationScope,
                             String destinationUser,
                             ContentCopyMode mode)
                             throws InternalErrorException,
                                    ScopeNotFoundException,
                                    UserNotFoundException,
                                    HomeNotFoundException,
                                    WorkspaceFolderNotFoundException
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.
WorkspaceFolderNotFoundException - if a specified user workspace is not found.


Copyright © 2013. All Rights Reserved.