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(String portalLogin)
          Create a new user.
 boolean existUser(String portalLogin)
          Check if the specified user exists.
 Home getHome(String portalLogin, org.gcube.common.core.scope.GCUBEScope scope)
          Retrieve the user's home.
 Home getHome(User user, org.gcube.common.core.scope.GCUBEScope scope)
          Retrieve the user's home.
 HomeManagerFactory getHomeManagerFactory()
          Return this HomeManager factory.
 User getUser(String portalLogin)
          Get an user, if the user is not found a new one is created.
 List<User> getUsers()
          Retrieves all users managed by this manager.
 void removeUser(User user)
          Remove the specified user.
 

Method Detail

getHomeManagerFactory

HomeManagerFactory getHomeManagerFactory()
Return this HomeManager factory.

Returns:
the factory.

getUsers

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

Returns:
all users.

getUser

User getUser(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(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(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,
             org.gcube.common.core.scope.GCUBEScope scope)
             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.

getHome

Home getHome(String portalLogin,
             org.gcube.common.core.scope.GCUBEScope scope)
             throws InternalErrorException,
                    HomeNotFoundException,
                    UserNotFoundException
Retrieve the user's home.

Parameters:
portalLogin - the user portal login.
Returns:
the home.
Throws:
InternalErrorException - if an internal error occurs.
HomeNotFoundException - if no home is found for the given user.
UserNotFoundException - if no user is found for the specified portalLogin.

removeUser

void removeUser(User user)
                throws InternalErrorException
Remove the specified user.

Parameters:
user - the user to remove.
Throws:
InternalErrorException - if an internal error occurs.


Copyright © 2013. All Rights Reserved.