org.gcube.portlets.user.homelibrary.home
Interface HomeManager


public interface HomeManager

Homes manager for a single scope. Manage users and user's home presents in a scope.

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

Method Summary
 User createUser(java.lang.String portalLogin)
          Create a new user.
 boolean existUser(java.lang.String portalLogin)
          Check if the specified user exists.
 Home getHome(User user)
          Retrieve the user's home.
 GCUBEScope getScope()
          Returns the scope managed by this manager.
 User getUser(java.lang.String portalLogin)
          Get an user, if the user is not found a new one is created.
 java.util.List<User> getUsers()
          Retrieves all users managed by this manager.
 

Method Detail

getScope

GCUBEScope getScope()
                    throws InternalErrorException
Returns the scope managed by this manager.

Returns:
the scope managed.
Throws:
InternalErrorException - if an internal error occurs.

getUsers

java.util.List<User> getUsers()
Retrieves all users managed by this manager.

Returns:
all users.

getUser

User getUser(java.lang.String portalLogin)
             throws InternalErrorException
Get an user, if the user is not found a new one is created.

Parameters:
portalLogin - the user's portal login.
Returns:
the user.
Throws:
InternalErrorException - if an internal error occurs.

existUser

boolean existUser(java.lang.String portalLogin)
                  throws InternalErrorException
Check if the specified user exists.

Parameters:
portalLogin - the user's portal login.
Returns:
true if the user has been found, false otherwise.
Throws:
InternalErrorException - if an internal error occurs.

createUser

User createUser(java.lang.String portalLogin)
                throws InternalErrorException
Create a new user.

Parameters:
portalLogin - the user's portal login.
Returns:
the new user.
Throws:
InternalErrorException - if an internal error occurs.

getHome

Home getHome(User user)
             throws InternalErrorException,
                    HomeNotFoundException
Retrieve the user's home.

Parameters:
user - the owner's home.
Returns:
the home.
Throws:
InternalErrorException - if an internal error occurs.
HomeNotFoundException - if no home is found for the given user.