blueme.messenger.kernel
Interface iDB

All Known Implementing Classes:
DB

public interface iDB


Method Summary
 boolean addMessages(iMSG message, java.lang.String uid)
          Adds one message to specified UID.
 void close()
          Used to notify the DB object that it is no longer of any use.
 boolean deleteProfile(java.lang.String uid)
          Deletes the profile saved on specified UID.
 iConfig getConfig()
          Get stored configuration, or "null" if there is no configuration saved.
 iMSG[] getMessages(java.lang.String uid)
          Get all messages stored on specified UID.
 iProfile getProfile(java.lang.String uid)
          Get profile for specified UID.
 iUserData getUserData()
          Get stored iUserData objects, or "null" if there are no stored iUserData objects.
 iUserList[] getUserList()
          Get the saved buddy list as an array of iUserList objects.
 boolean setConfig(iConfig config)
          Save specified configuration, and replace this with any possible existing configuration.
 boolean setMessages(iMSG[] messages, java.lang.String uid)
          Set specified messages on specified UID.
 boolean setProfile(iProfile profile, java.lang.String uid)
          Save specified profile on specified UID.
 boolean setUserData(iUserData userData)
          Saved specifed iUserData object, and delete possible existing iUserData object.
 boolean setUserList(iUserList[] userList)
          Save specified iUserList objects, and delete prossible existing array of iUserList objects.
 

Method Detail

getUserData

iUserData getUserData()
Get stored iUserData objects, or "null" if there are no stored iUserData objects.


setUserData

boolean setUserData(iUserData userData)
Saved specifed iUserData object, and delete possible existing iUserData object. Returns "true" if the object could be saved, "false" otherwise.


getUserList

iUserList[] getUserList()
Get the saved buddy list as an array of iUserList objects. If there are no saved buddy list, it will return "null".


setUserList

boolean setUserList(iUserList[] userList)
Save specified iUserList objects, and delete prossible existing array of iUserList objects. Returns "true" if objects could be saved, "false" otherwise.


getProfile

iProfile getProfile(java.lang.String uid)
Get profile for specified UID. If UID is "null", we get the prifle for this applications user. If there are no profile available, we return "null".


setProfile

boolean setProfile(iProfile profile,
                   java.lang.String uid)
Save specified profile on specified UID. If UID is "null", the specifed profile are for this applications user. Returns "true" if the profile could be saved, "false" otherwise.


deleteProfile

boolean deleteProfile(java.lang.String uid)
Deletes the profile saved on specified UID. If UID is "null", it's this applications users profile we want to delete. Returns "true" if the deletion could be completed, "false" otherwise. Method will also return "true" when there are no profile available on specified UID.


getConfig

iConfig getConfig()
Get stored configuration, or "null" if there is no configuration saved.


setConfig

boolean setConfig(iConfig config)
Save specified configuration, and replace this with any possible existing configuration. Returns "true" if the configuration could be saved, "false" otherwise.


getMessages

iMSG[] getMessages(java.lang.String uid)
Get all messages stored on specified UID. If there are no messages stored on this UID, method will return "null". Messages are guaranteed to be sorted by oldest first.


setMessages

boolean setMessages(iMSG[] messages,
                    java.lang.String uid)
Set specified messages on specified UID. If specified messages is "null" or an empty array, all previously messages on specified UID are deleted. Message to not need to be sorted in any particular order. Returns "true" if the task could be completed, "false" otherwise.


addMessages

boolean addMessages(iMSG message,
                    java.lang.String uid)
Adds one message to specified UID. Returns "true" if the task could be completed, "false" otherwise.


close

void close()
Used to notify the DB object that it is no longer of any use. After this method have been utilized, no other DB access methodes will work.