LaColla.Api
Class ApiImpl
java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
LaColla.Api.ApiImpl
- All Implemented Interfaces:
- java.io.Serializable, java.rmi.Remote, Api
public class ApiImpl
- extends java.rmi.server.UnicastRemoteObject
- implements Api
- Author:
- Xavier
Created on 23-feb-2005 by Xavier into LaColla.Api
- See Also:
- Serialized Form
Method Summary |
void |
acquire(int type)
|
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)
|
java.util.ArrayList |
getEventsRelatedTo()
|
GroupInfo |
getInfoGroup()
|
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)
|
java.lang.String |
getObjectLaCOLLAInfoMemeberId()
|
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 GapaAdress,
int GapaPort,
java.lang.String aplicHost_,
int aplicPort_)
|
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 |
release(int type)
|
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 userId,
java.lang.String groupId,
java.lang.Object message,
java.util.ArrayList targetList)
|
void |
setAplicationId(java.lang.String aid_)
|
void |
setEventsRelatedTo(java.util.ArrayList list)
|
void |
setInfoGroup(GroupInfo infoGroup)
|
void |
setNewGroupId(java.lang.String newGroupId)
|
void |
setObjectLaCOLLA(ObjectLaCOLLA obj)
|
void |
setObjectLaCOLLAInfoMemeberId(java.lang.String objectLaCOLLAInfoMemeberId)
|
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.rmi.server.UnicastRemoteObject |
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
ApiImpl
public ApiImpl(UA UA_)
throws java.rmi.RemoteException
- Throws:
java.rmi.RemoteException
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 groupIduserId
- - Usernamepswd
- - 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 GapaAdress,
int GapaPort,
java.lang.String aplicHost_,
int aplicPort_)
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
- PasswordGapaAdress
- the GAPA hostGapaPort
- the GAPA portaplicHost_
- the Application hostaplicPort_
- 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
- PasswordGapaHost
- the GAPA hostGapaPort
- the GAPA portappHost
- the Application hostappPort
- the Application porteventSummary
- the summary of events received
- Returns:
- applicationID
- 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 groupIdobjectId
- - 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 groupIdobjectId
- - the objectId
- 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 groupIduserId
- - UsernameaplicName
- - 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 groupIdevt
- - 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 groupIdevt
- - 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 groupIdobjectId
- - the objectId
- Returns:
- ArrayList - list of events related to 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
getInfoGroup
public GroupInfo getInfoGroup(java.lang.String userId,
java.lang.String groupId,
java.lang.String aplicId)
- Specified by:
getInfoGroup
in interface Api
- Parameters:
userId
- - the userID provided by LaCOLLA.groupId
- - the groupIdaplicId
- - the application ID
- Returns:
- GroupInfo
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 groupIdmemberInfo
- - 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 usernamepassword
- - the passwordemailAddress
- - the email address of the new member
- Returns:
- String - the new memberID
- 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
- Parameters:
localpath:
- Path where LaColla will store the obtained file.
- Returns:
- an ObjectLaCOLLA
- Throws:
java.rmi.RemoteException
- See Also:
Api.getInfoMember(java.lang.String, java.lang.String, java.lang.String)
getInfoMember
public void getInfoMember(ObjectLaCOLLA obj,
java.lang.String localPath)
throws java.rmi.RemoteException
- Specified by:
getInfoMember
in interface Api
- Throws:
java.rmi.RemoteException
sendInstantMessage
public void sendInstantMessage(java.lang.String userId,
java.lang.String groupId,
java.lang.Object message,
java.util.ArrayList targetList)
throws java.rmi.RemoteException
- Specified by:
sendInstantMessage
in interface Api
- Parameters:
userId
- - the member identifiergroupId
- - the groupIdmessage
- - the message to be sendtargetList
- - the list of members to send the message to.
- Throws:
java.rmi.RemoteException
acquire
public void acquire(int type)
release
public void release(int type)
setAplicationId
public void setAplicationId(java.lang.String aid_)
getObjectLaCOLLAInfoMemeberId
public java.lang.String getObjectLaCOLLAInfoMemeberId()
setObjectLaCOLLAInfoMemeberId
public void setObjectLaCOLLAInfoMemeberId(java.lang.String objectLaCOLLAInfoMemeberId)
removeGroup
public void removeGroup(java.lang.String userId,
java.lang.String groupId)
- Specified by:
removeGroup
in interface Api
- Parameters:
userId
- - the userID provided by LaCOLLA.groupId
- - the groupId
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 informationgroupId
- - 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 identifiergroupId
- - 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 identifiergroupId
- - the groupId
- Throws:
java.rmi.RemoteException
setObjectLaCOLLA
public void setObjectLaCOLLA(ObjectLaCOLLA obj)
- Parameters:
obj
-
setNewGroupId
public void setNewGroupId(java.lang.String newGroupId)
setEventsRelatedTo
public void setEventsRelatedTo(java.util.ArrayList list)
getEventsRelatedTo
public java.util.ArrayList getEventsRelatedTo()
setInfoGroup
public void setInfoGroup(GroupInfo infoGroup)
getInfoGroup
public GroupInfo getInfoGroup()