edu.indiana.dde.mylead.agent
Interface MyLeadAgentInterface

All Known Implementing Classes:
MyLeadAgent

public interface MyLeadAgentInterface


Method Summary
 String addAttribute(String uID, String attribute, String resourceID)
          [To Do] add a attribute to the object specified with the resourceID
 String addAttributes(String uID, edu.indiana.extreme.lead.types.StringArrayDocument attributes, String resourceID)
          [To Do] bulk adding of the attributes add multiple attributes to the object specified with the resourceID.
 void addMyLeadServiceInfo(edu.indiana.extreme.lead.types.MyLeadServiceInfoDocument myleadsrvinfo)
          Add a new service information.
 void addUserInfo(edu.indiana.extreme.lead.types.MyLeadUserInfoDocument userinfo)
          Add a new user information.
 void closeExperiment(String uID, String resourceID)
          Close this session.
 void closeMyLeadConnections()
          close all of the connection to mylead server.
 String createCollection(String uID, String leadResource, String parentResourceID, boolean assignNewResourceID)
          create a file collection.
 String createExperiment(String uID, String leadResource, String parentProjectResourceID, boolean assignNewResourceID)
          Create mylead Experiment for generating collection (with userid) This method creates an active experiment under the specified userID.
 String createProject(String uID, String leadResource, boolean assignNewResourceID)
          create a project
 String doesUserHaveMyLeadAccount(String uid)
          check if mylead server has user account under a user id
 edu.indiana.extreme.lead.types.MyLeadUserInfoArrayDocument getAllUserInfo()
          Retrieve mylead all user information.
 edu.indiana.extreme.lead.types.MyLeadServiceInfoArrayDocument getMyLeadServiceInfo(String userId)
          Retrieve mylead service information.
 edu.indiana.extreme.lead.types.MyLeadUserInfoDocument getUserInfo(String userid)
          Retrieve mylead user information.
 String queryLEADMetadata(String uid, String resourceID)
           
 String registerFile(String uid, String leadResource, String datasourcelocation, String parentResourceID, boolean assignNewResourceID)
          This interface is for registering a file from the workflow engine, Emulator, and Geo-GUI.
 String registerFiles(String uid, edu.indiana.extreme.lead.types.StringArrayDocument leadResource, edu.indiana.extreme.lead.types.StringArrayDocument datasourcelocation, String parentResourceID, boolean assignNewResourceID)
          [To Do] bulk load of files This interface is for registering a file from the workflow engine, emulator and Geo-GUI.
 String retrieveFile(String uid, String resourceID, String targetLocation)
           
 void retrieveFiles(String uid, edu.indiana.extreme.lead.types.StringArrayDocument resourceID, edu.indiana.extreme.lead.types.StringArrayDocument targetLocation)
           
 void setMyLeadServiceInfo(edu.indiana.extreme.lead.types.MyLeadServiceInfoDocument myleadsrvinfo)
          Modify service information.
 void setUserInfo(edu.indiana.extreme.lead.types.MyLeadUserInfoDocument userinfo)
          Modify user information.
 void shutdownExperiment(String uID, String resourceID)
          Shutdown this experiment.
 String updateAttribute(String uID, String attribute, String resourceID)
          [To Do] update an attribute to the object specified with the resourceID
 

Method Detail

getMyLeadServiceInfo

public edu.indiana.extreme.lead.types.MyLeadServiceInfoArrayDocument getMyLeadServiceInfo(String userId)
                                                                                   throws Exception
Retrieve mylead service information. This method returns the mylead service information associated to the specified user, This method can process wildcard charactor also. To retrieve all information available mylead service, please fill the userId as "*".

It returns MyLeadServiceInfoArrayDocument defined in AHM Demo version Schema. The return document includes,

Parameters:
userId - user's DN associating the service information. "*" will return whole list of the service information
Returns:
MyLeadServiceInfoArrayDocument
Throws:
Exception

setMyLeadServiceInfo

public void setMyLeadServiceInfo(edu.indiana.extreme.lead.types.MyLeadServiceInfoDocument myleadsrvinfo)
                          throws Exception
Modify service information. This method modifies already existing service information.

Parameters:
myleadsrvinfo - MyLeadServiceInfoDocument
Throws:
Exception

addMyLeadServiceInfo

public void addMyLeadServiceInfo(edu.indiana.extreme.lead.types.MyLeadServiceInfoDocument myleadsrvinfo)
                          throws Exception
Add a new service information. This method creates a new service information.

Parameters:
myleadsrvinfo - MyLeadServiceInfoDocument
Throws:
Exception

getAllUserInfo

public edu.indiana.extreme.lead.types.MyLeadUserInfoArrayDocument getAllUserInfo()
                                                                          throws Exception
Retrieve mylead all user information. This method returns information of the all users existing over all distributed mylead server. Each MyLead keeps complete user information accessing any of mylead service. From the return document, requesters can retrieve the user's mylead location.

Return docuement is structured as MyLeadUserInfoArrayDocuement which includes items defined in the FGDC section 10 contact information.

Returns:
MyLeadUserInfoArrayDocument
Throws:
Exception

getUserInfo

public edu.indiana.extreme.lead.types.MyLeadUserInfoDocument getUserInfo(String userid)
                                                                  throws Exception
Retrieve mylead user information. This method returns information of specified user. The userID argument must specify existing user's user id.

Returns:
MyLeadServiceInfoDocument
Throws:
Exception

setUserInfo

public void setUserInfo(edu.indiana.extreme.lead.types.MyLeadUserInfoDocument userinfo)
                 throws Exception
Modify user information. This method modifies existing user's information. userinfo argument must specify an existing user's information in MyLeadUserInfoDocuement.

Parameters:
userinfo - MyLeadUserInfoDocument
Throws:
Exception

addUserInfo

public void addUserInfo(edu.indiana.extreme.lead.types.MyLeadUserInfoDocument userinfo)
                 throws Exception
Add a new user information. This method creates a user account in mylead. Athentication of administrator will be required in the next version of mylead.

Parameters:
userinfo - MyLeadUserInfoDocument
Throws:
Exception

createExperiment

public String createExperiment(String uID,
                               String leadResource,
                               String parentProjectResourceID,
                               boolean assignNewResourceID)
                        throws Exception
Create mylead Experiment for generating collection (with userid) This method creates an active experiment under the specified userID.

Parameters:
uID - user id as a String
leadResource - LEAD metadata for new experiment
parentProjectResourceID - ResourceID of the project
assignNewResourceID - If it is true, mylead agent will assign new resource ID
Returns:
String ResourceID of new experiment
Throws:
Exception

registerFile

public String registerFile(String uid,
                           String leadResource,
                           String datasourcelocation,
                           String parentResourceID,
                           boolean assignNewResourceID)
                    throws Exception
This interface is for registering a file from the workflow engine, Emulator, and Geo-GUI. The metadata of the file product is stored in the mylead, and the actual data product is stored in a mass storage service.

Parameters:
uid - user's id that will be used for storing the metadata
leadResource - metadata of the object to import
datasourcelocation - actual location of the data
parentResourceID - the ResourceID of the direct parent node if it is "", the file is registered in the whiteboard space.
assignNewResourceID - if it is true, myleadagent will assign a new resourceID.
Returns:
String mylead returns a GUID of new file.
Throws:
Exception

registerFiles

public String registerFiles(String uid,
                            edu.indiana.extreme.lead.types.StringArrayDocument leadResource,
                            edu.indiana.extreme.lead.types.StringArrayDocument datasourcelocation,
                            String parentResourceID,
                            boolean assignNewResourceID)
                     throws Exception
[To Do] bulk load of files This interface is for registering a file from the workflow engine, emulator and Geo-GUI. The metadata of the file product is stored in the mylead, and the actual data product is stored in a mass storage service.

Parameters:
uid - user's id that will be used for storing the metadata
leadResource - metadata of the object to import
datasourcelocation - actual location of the data
parentResourceID - the ResourceID of the direct parent node if it is "", the file is registered in the whiteboard space.
assignNewResourceID - if it is true, myleadagent will assign a new resourceID.
Returns:
String mylead returns a GUID of new file.
Throws:
Exception

closeExperiment

public void closeExperiment(String uID,
                            String resourceID)
                     throws Exception
Close this session. This will remove the session after performing all of the request delivered so far. For more request, it throws exception.

Parameters:
uID - user id as a String
resourceID - resourceID of the experiment being closed
Returns:
void
Throws:
Exception

shutdownExperiment

public void shutdownExperiment(String uID,
                               String resourceID)
                        throws Exception
Shutdown this experiment. This will force the session to close immediatly and the requests in the queue will be removed.

Parameters:
uID - user id as a String
resourceID - resourceID of the experiment being shutdown
Returns:
void
Throws:
Exception

createCollection

public String createCollection(String uID,
                               String leadResource,
                               String parentResourceID,
                               boolean assignNewResourceID)
                        throws Exception
create a file collection.

Parameters:
uID - user id as a String
leadResource - LEAD metadata for new collection
assignNewResourceID - if it is true mylead agent will assign new resource ID for this collection
Returns:
String resourceID of new collection
Throws:
Exception

addAttribute

public String addAttribute(String uID,
                           String attribute,
                           String resourceID)
                    throws Exception
[To Do] add a attribute to the object specified with the resourceID

Parameters:
uID - user ID as a String
attribute - dynamic attribute that user wants to add it MUST satisfy the partial schema of LEAD metadata Otherwise, mylead server throws an exception
resourceID - the resourceID of the object that an attribute will be added to
Returns:
String status of the adding dynamic attribute
Throws:
Exception

addAttributes

public String addAttributes(String uID,
                            edu.indiana.extreme.lead.types.StringArrayDocument attributes,
                            String resourceID)
                     throws Exception
[To Do] bulk adding of the attributes add multiple attributes to the object specified with the resourceID. This bulk attribute load provides more optimized performance

Parameters:
uID - user ID as a String
attributes - An array of string which contains dynamic attributes that user wants to add Each of string MUST satisfy the partial schema of LEAD metadata Otherwise, mylead server throws an exception
resourceID - the resourceID of the object that an attribute will be added to
Returns:
String status of the adding dynamic attribute
Throws:
Exception

updateAttribute

public String updateAttribute(String uID,
                              String attribute,
                              String resourceID)
                       throws Exception
[To Do] update an attribute to the object specified with the resourceID

Parameters:
uID - user ID as a String
attribute - dynamic attribute that user wants to add it MUST satisfy the partial schema of LEAD metadata Otherwise, mylead server throws an exception
resourceID - the resourceID of the object that an attribute will be added to
Returns:
String status of the adding dynamic attribute
Throws:
Exception

createProject

public String createProject(String uID,
                            String leadResource,
                            boolean assignNewResourceID)
                     throws Exception
create a project

Parameters:
uID - user id as a String
assignNewResourceID - if it is true mylead agent will assign new resource ID for this collection
Returns:
String resource ID of the new project
Throws:
Exception

queryLEADMetadata

public String queryLEADMetadata(String uid,
                                String resourceID)
                         throws Exception
Throws:
Exception

retrieveFile

public String retrieveFile(String uid,
                           String resourceID,
                           String targetLocation)
                    throws Exception
Throws:
Exception

retrieveFiles

public void retrieveFiles(String uid,
                          edu.indiana.extreme.lead.types.StringArrayDocument resourceID,
                          edu.indiana.extreme.lead.types.StringArrayDocument targetLocation)
                   throws Exception
Throws:
Exception

doesUserHaveMyLeadAccount

public String doesUserHaveMyLeadAccount(String uid)
                                 throws Exception
check if mylead server has user account under a user id

Parameters:
uid - user id as a String
Returns:
String (if the user has account returns "true" otherwise "false")
Throws:
Exception

closeMyLeadConnections

public void closeMyLeadConnections()
                            throws Exception
close all of the connection to mylead server. This API is for administrator only. If the mylead administror wants to stop mylead agent, please call this API first. Otherwise, life-spans in the OGSA-DAI can cause performance problem.

Throws:
Exception