sharpster.daemon.groupmanagement
Class GroupController

java.lang.Object
  |
  +--sharpster.daemon.groupmanagement.GroupController

public class GroupController
extends java.lang.Object


Constructor Summary
GroupController()
          Initialize the groupTable and read the groups from the disk.
 
Method Summary
 java.util.LinkedList getGroups(java.lang.String user)
          Returns a list containing a given user as the first element followed by every group the user is a memeber of.
 sharpster.common.ResponseCollection groupCommand(sharpster.common.GroupCommand command)
          Recieves a groupcommand, executes the given command and returns the result.
 void initialize(sharpster.daemon.usermanagement.UserManager um)
           
 boolean saveToFile(java.lang.String name, boolean add)
          Saves the user information to a configuration file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupController

public GroupController()
Initialize the groupTable and read the groups from the disk.

Method Detail

initialize

public void initialize(sharpster.daemon.usermanagement.UserManager um)

getGroups

public java.util.LinkedList getGroups(java.lang.String user)
Returns a list containing a given user as the first element followed by every group the user is a memeber of.

Parameters:
user - A username.
Returns:
A list containing all the groups the user is a member of.

groupCommand

public sharpster.common.ResponseCollection groupCommand(sharpster.common.GroupCommand command)
Recieves a groupcommand, executes the given command and returns the result.

Parameters:
command - A groupcommand.
Returns:
A responseCollection contaning the result of the command.

saveToFile

public boolean saveToFile(java.lang.String name,
                          boolean add)
Saves the user information to a configuration file.