|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.Observable base.InternetCafeManager
public class InternetCafeManager
Constructor Summary | |
---|---|
protected |
InternetCafeManager()
|
Method Summary | |
---|---|
void |
addBackup(Backup backup)
This method simply adds a backup. |
void |
addService(Service service)
This method simply adds a service. |
void |
addSession(Session session)
This method simply adds a session. |
void |
addSessionSet(Session[] sessionSet)
This method simply adds a set of sessions. |
void |
addUser(User user)
This method simply adds a user. |
protected static java.lang.String |
backupKey(Backup backup)
This method simply builds a key string for an instance of Backup. |
void |
clear()
This method clears all the InternetCafe's data. |
static boolean |
contains(java.lang.String[] list,
java.lang.String text)
|
void |
deleteBackup(Backup backup)
This method deletes a backup from the system. |
void |
deleteService(Service service)
This method deletes the service. |
void |
deleteSession(Session session)
This method deletes a session. |
void |
deleteUser(User user)
This method deletes the user. |
Backup[] |
getBackup()
|
Backup |
getBackupById(int backupId)
This method retrieves a backup specifying his id. |
static InternetCafeManager |
getInstance()
|
Service[] |
getService()
|
Service |
getServiceById(int serviceId)
This method retrieves a service specifying his id. |
Session[] |
getSession()
|
Session |
getSessionById(int sessionId)
This method retrieves a session specifying his id. |
User[] |
getUser()
|
User |
getUserById(int userId)
This method retrieves a user specifying his id. |
User |
getUserByNickname(java.lang.String userNickname)
This method retrieves a user specifying his nickname. |
void |
retrieve()
|
protected static java.lang.String |
serviceKey(Service service)
This method simply builds a key string for an instance of Service. |
protected static java.lang.String |
sessionKey(Session session)
This method simply builds a key string for an instance of Session. |
void |
store()
|
protected static java.lang.String |
userKey(User user)
This method simply builds a key string for an instance of User. |
Methods inherited from class java.util.Observable |
---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected InternetCafeManager()
Method Detail |
---|
public static InternetCafeManager getInstance()
public void store()
public static boolean contains(java.lang.String[] list, java.lang.String text)
public void retrieve()
public void addUser(User user)
user
- The user to add.public void addBackup(Backup backup)
backup
- The backup to add.public void addService(Service service)
service
- The service to add.public User[] getUser()
public Backup[] getBackup()
public Service[] getService()
public Session[] getSession()
public void addSession(Session session)
session
- The session to add.public void addSessionSet(Session[] sessionSet)
sessionSet
- The session set to add.public void deleteUser(User user)
user
- The user to be deleted.public void deleteService(Service service)
service
- The user to be deleted.protected static java.lang.String userKey(User user)
user
- The user from wich build the key.
protected static java.lang.String backupKey(Backup backup)
backup
- The backup from wich build the key.
protected static java.lang.String serviceKey(Service service)
service
- The service from wich build the key.
protected static java.lang.String sessionKey(Session session)
session
- The session from wich build the key.
public void deleteSession(Session session)
session
- The session to delete.public User getUserById(int userId)
userId
- An id associated to the user to retrieve.
public Session getSessionById(int sessionId)
sessionId
- An id associated to the session to retrieve.
public Service getServiceById(int serviceId)
serviceId
- An id associated to the service to retrieve.
public Backup getBackupById(int backupId)
backupId
- An id associated to the backup to retrieve.
public void deleteBackup(Backup backup)
backup
- The backup to delete.public void clear()
public User getUserByNickname(java.lang.String userNickname)
userNickname
- A nickname associated to the user to retrieve.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |