LaColla.Api
Class ApplicationsSideApiWrapper

java.lang.Object
  extended by LaColla.Api.ApplicationsSideApiWrapper
All Implemented Interfaces:
java.rmi.Remote, Api

public class ApplicationsSideApiWrapper
extends java.lang.Object
implements Api


Constructor Summary
ApplicationsSideApiWrapper(Api api)
           
 
Method Summary
 java.lang.String addGroup(java.lang.String userId, java.lang.String groupId, GroupInfo groupInfo)
           
 java.lang.String addMember(java.lang.String memberId, java.lang.String groupId, ObjectLaCOLLA memberInfo, java.lang.String role, java.lang.String username, java.lang.String password, java.lang.String emailAddress)
           
 void disseminateEvent(java.lang.String groupId, Event evt)
           
 void disseminateEvent(java.lang.String groupId, Event evt)
           
 java.util.ArrayList eventsRelatedTo(java.lang.String groupId, java.lang.String objectId)
           
 GroupInfo getInfoGroup(java.lang.String userId, java.lang.String groupId, java.lang.String aplicId)
           
 void getInfoMember(ObjectLaCOLLA obj, java.lang.String localPath)
           
 ObjectLaCOLLA getInfoMember(java.lang.String memberId, java.lang.String groupId, java.lang.String localPath)
           
 void getInfoObject(java.lang.String groupId, java.lang.String objectId)
           
 void getObject(ObjectLaCOLLA obj, java.lang.String localPath)
           
 void getObject(ObjectLaCOLLA obj, java.lang.String localPath)
           
 void getTaskState(java.lang.String idTask, java.lang.String groupId)
           
 java.lang.String login(java.lang.String groupId, java.lang.String userId, java.lang.String pswd)
           
 java.lang.String login(java.lang.String groupId, java.lang.String username, java.lang.String pswd, java.lang.String GapaHost, int GapaPort, java.lang.String appHost, int appPort)
           
 java.lang.String login(java.lang.String groupId, java.lang.String username, java.lang.String pswd, java.lang.String GapaHost, int GapaPort, java.lang.String appHost, int appPort, TimestampSummary eventSummary)
           
 void logout(java.lang.String groupId, java.lang.String userId, java.lang.String aplicName)
           
 ObjectLaCOLLA putObject(ObjectLaCOLLA obj)
           
 ObjectLaCOLLA putObject(ObjectLaCOLLA obj)
           
 void removeGroup(java.lang.String userId, java.lang.String groupId)
           
 void removeObject(java.lang.String groupId, java.lang.String objectId)
           
 void sendInstantMessage(java.lang.String memberId, java.lang.String groupId, java.lang.Object message, java.util.ArrayList targetList)
           
 void stopTask(java.lang.String idTask, java.lang.String groupId)
           
 java.lang.String submitTask(byte[] xml, java.lang.String groupId)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationsSideApiWrapper

public ApplicationsSideApiWrapper(Api api)
Method Detail

login

public java.lang.String login(java.lang.String groupId,
                              java.lang.String userId,
                              java.lang.String pswd)
                       throws java.rmi.RemoteException
Specified by:
login in interface Api
Parameters:
groupId - - the groupId
userId - - Username
pswd - - Password
Returns:
String appId - the application id provided by LaCOLLA
Throws:
java.rmi.RemoteException

login

public java.lang.String login(java.lang.String groupId,
                              java.lang.String username,
                              java.lang.String pswd,
                              java.lang.String GapaHost,
                              int GapaPort,
                              java.lang.String appHost,
                              int appPort)
                       throws java.rmi.RemoteException
Specified by:
login in interface Api
Parameters:
groupId - the group name (can be an string or the ID generated by tyrex)
username - User name (the nick, not the tyrex ID)
pswd - Password
GapaHost - the GAPA host
GapaPort - the GAPA port
appHost - the Application host
appPort - the Application port
Returns:
applicationID
Throws:
java.rmi.RemoteException

login

public java.lang.String login(java.lang.String groupId,
                              java.lang.String username,
                              java.lang.String pswd,
                              java.lang.String GapaHost,
                              int GapaPort,
                              java.lang.String appHost,
                              int appPort,
                              TimestampSummary eventSummary)
                       throws java.rmi.RemoteException
Specified by:
login in interface Api
Parameters:
groupId - the group name (can be an string or the ID generated by tyrex)
username - User name (the nick, not the tyrex ID)
pswd - Password
GapaHost - the GAPA host
GapaPort - the GAPA port
appHost - the Application host
appPort - the Application port
eventSummary - the summary of events received
Returns:
applicationID
Throws:
java.rmi.RemoteException

logout

public void logout(java.lang.String groupId,
                   java.lang.String userId,
                   java.lang.String aplicName)
            throws java.rmi.RemoteException
Specified by:
logout in interface Api
Parameters:
groupId - - the groupId
userId - - Username
aplicName - - the application id provided by LaCOLLA
Throws:
java.rmi.RemoteException

disseminateEvent

public void disseminateEvent(java.lang.String groupId,
                             Event evt)
                      throws java.rmi.RemoteException
Specified by:
disseminateEvent in interface Api
Parameters:
groupId - - the groupId
evt - - the event to disseminate
Throws:
java.rmi.RemoteException

disseminateEvent

public void disseminateEvent(java.lang.String groupId,
                             Event evt)
                      throws java.rmi.RemoteException
Specified by:
disseminateEvent in interface Api
Parameters:
groupId - - the groupId
evt - - the event to disseminate
Throws:
java.rmi.RemoteException

eventsRelatedTo

public java.util.ArrayList eventsRelatedTo(java.lang.String groupId,
                                           java.lang.String objectId)
                                    throws java.rmi.RemoteException
Specified by:
eventsRelatedTo in interface Api
Parameters:
groupId - - the groupId
objectId - - the objectId
Returns:
ArrayList - list of events related to the objectId
Throws:
java.rmi.RemoteException

putObject

public ObjectLaCOLLA putObject(ObjectLaCOLLA obj)
                        throws java.rmi.RemoteException
Specified by:
putObject in interface Api
Parameters:
obj - - the ObjectLaCOLLA to be stored
Returns:
ObjectLaCOLLA - the obj descriptor. Includes the objectId
Throws:
java.rmi.RemoteException

putObject

public ObjectLaCOLLA putObject(ObjectLaCOLLA obj)
                        throws java.rmi.RemoteException
Specified by:
putObject in interface Api
Parameters:
obj - - the ObjectLaCOLLA to be stored
Returns:
ObjectLaCOLLA - the obj descriptor. Includes the objectId
Throws:
java.rmi.RemoteException

getObject

public void getObject(ObjectLaCOLLA obj,
                      java.lang.String localPath)
               throws java.rmi.RemoteException
Specified by:
getObject in interface Api
Parameters:
obj - - the ObjectLaCOLLA to obtain
Throws:
java.rmi.RemoteException

getObject

public void getObject(ObjectLaCOLLA obj,
                      java.lang.String localPath)
               throws java.rmi.RemoteException
Specified by:
getObject in interface Api
Parameters:
obj - - the ObjectLaCOLLA to obtain. This object must be filled with the objectId and group Id.
localPath - - the qualified filename where LaCOLLA will store the file bytes
Throws:
java.rmi.RemoteException - Status: working

getInfoObject

public void getInfoObject(java.lang.String groupId,
                          java.lang.String objectId)
                   throws java.rmi.RemoteException
Specified by:
getInfoObject in interface Api
Parameters:
groupId - - the groupId
objectId - - the objectId
Throws:
java.rmi.RemoteException

removeObject

public void removeObject(java.lang.String groupId,
                         java.lang.String objectId)
                  throws java.rmi.RemoteException
Specified by:
removeObject in interface Api
Parameters:
groupId - - the groupId
objectId - - the objectId
Throws:
java.rmi.RemoteException

addGroup

public java.lang.String addGroup(java.lang.String userId,
                                 java.lang.String groupId,
                                 GroupInfo groupInfo)
                          throws java.rmi.RemoteException
Specified by:
addGroup in interface Api
Parameters:
userId - - the userID provided by LaCOLLA.
groupId - - the new groupId (short version)
groupInfo - - the new groupInfo
Returns:
String - the new groupId (tyrex id + groupId)
Throws:
java.rmi.RemoteException

removeGroup

public void removeGroup(java.lang.String userId,
                        java.lang.String groupId)
                 throws java.rmi.RemoteException
Specified by:
removeGroup in interface Api
Parameters:
userId - - the userID provided by LaCOLLA.
groupId - - the groupId
Throws:
java.rmi.RemoteException

getInfoGroup

public GroupInfo getInfoGroup(java.lang.String userId,
                              java.lang.String groupId,
                              java.lang.String aplicId)
                       throws java.rmi.RemoteException
Specified by:
getInfoGroup in interface Api
Parameters:
userId - - the userID provided by LaCOLLA.
groupId - - the groupId
aplicId - - the application ID
Returns:
GroupInfo
Throws:
java.rmi.RemoteException

addMember

public java.lang.String addMember(java.lang.String memberId,
                                  java.lang.String groupId,
                                  ObjectLaCOLLA memberInfo,
                                  java.lang.String role,
                                  java.lang.String username,
                                  java.lang.String password,
                                  java.lang.String emailAddress)
                           throws java.rmi.RemoteException
Specified by:
addMember in interface Api
Parameters:
memberId - - the userID provided by LaCOLLA.
groupId - - the groupId
memberInfo - - an ObjectLaCOLLA associated with a member information file. This file will not be read by LaCOLLA; it contains information useful for the application only.
role - - the role of the member in the group {ROOT,USER,...}
username - - the username
password - - the password
emailAddress - - the email address of the new member
Returns:
String - the new memberID
Throws:
java.rmi.RemoteException

getInfoMember

public void getInfoMember(ObjectLaCOLLA obj,
                          java.lang.String localPath)
                   throws java.rmi.RemoteException
Specified by:
getInfoMember in interface Api
Throws:
java.rmi.RemoteException

getInfoMember

public ObjectLaCOLLA getInfoMember(java.lang.String memberId,
                                   java.lang.String groupId,
                                   java.lang.String localPath)
                            throws java.rmi.RemoteException
Specified by:
getInfoMember in interface Api
Returns:
LaColla.core.data.app.ObjectLaCOLLA
Throws:
java.rmi.RemoteException

sendInstantMessage

public void sendInstantMessage(java.lang.String memberId,
                               java.lang.String groupId,
                               java.lang.Object message,
                               java.util.ArrayList targetList)
                        throws java.rmi.RemoteException
Specified by:
sendInstantMessage in interface Api
Parameters:
memberId - - the member identifier
groupId - - the groupId
message - - the message to be send
targetList - - the list of members to send the message to.
Throws:
java.rmi.RemoteException

submitTask

public java.lang.String submitTask(byte[] xml,
                                   java.lang.String groupId)
                            throws java.rmi.RemoteException
Specified by:
submitTask in interface Api
Parameters:
xml - - the task information
groupId - - the groupId
Returns:
String - the taskId
Throws:
java.rmi.RemoteException

stopTask

public void stopTask(java.lang.String idTask,
                     java.lang.String groupId)
              throws java.rmi.RemoteException
Specified by:
stopTask in interface Api
Parameters:
idTask - - the task identifier
groupId - - the groupId
Throws:
java.rmi.RemoteException

getTaskState

public void getTaskState(java.lang.String idTask,
                         java.lang.String groupId)
                  throws java.rmi.RemoteException
Specified by:
getTaskState in interface Api
Parameters:
idTask - - the task identifier
groupId - - the groupId
Throws:
java.rmi.RemoteException