edu.indiana.dde.mylead.agent
Interface MyLeadAgentInterface

All Known Implementing Classes:
MyLeadAgent

public interface MyLeadAgentInterface


Method Summary
 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 addWorkflowTemplate(String uid, String proj, edu.indiana.extreme.lead.types.LeadEntryDocument workflowTemplate)
          adds a new workflow template (name, desc, template xml content) to a user's project.
 void closeExperiment(String uID, String proj, String exp)
          Close this session.
 void closeMyLeadConnections()
          close all of the connection to mylead server.
 void createCollection(String uID, String proj, String exp, String parent, String parentType, String collectionName, String collectionDesc)
          create a file collection.
 String createExperiment(String uID, String proj, edu.indiana.extreme.lead.types.MyLeadExperimentDocument exp)
          Create mylead Experiment for generating collection (with userid) This method creates an active experiment under the specified userID.
 void createProject(String uID, String proj, String projdesc)
          create a project
 String doesUserHaveMyLeadAccount(String uid)
          check if mylead server has user account under a user id
 edu.indiana.extreme.lead.types.StringArrayDocument getActiveExperiment(String uID, String proj)
          return all active experiment name running under the username and the project name.
 String getActiveNotificationTopicID(String uID, String proj, String exp)
          get notification topicID for this experiment
 edu.indiana.extreme.lead.types.StringArrayDocument getActiveProject(String uID)
          return all active project name running under the username and the project name.
 String getActiveWorkflowInstanceName(String uID, String proj, String exp)
          return the workflow instancename running on current experiment
 String getActiveWorkflowTemplateName(String uID, String proj, String exp)
          return the workflow template name running on current experiment
 edu.indiana.extreme.lead.types.MyLeadUserInfoArrayDocument getAllUserInfo()
          Retrieve mylead all user information.
 String getCurrentState(String uID, String proj, String exp)
          get current state of this session
 edu.indiana.extreme.lead.types.MyLeadExperimentArrayDocument getExperiments(String uid, String proj, int lastNDays)
          get all the expriment name and description for a user's investigation.
 edu.indiana.extreme.lead.types.LeadEntryArrayDocument getFiles(String uid, String fileName)
          [To Do] gets all files that have been used during experiment.
 edu.indiana.extreme.lead.types.MyLeadServiceInfoArrayDocument getMyLeadServiceInfo()
          Retrieve mylead service information.
 edu.indiana.extreme.lead.types.WorkflowNotificationArrayDocument getNotifications(String uid, String proj, String exp, int countFromLast)
          returns notifications stored under this experiment.
 edu.indiana.extreme.lead.types.MyLeadInvestigationArrayDocument getProjects(String uid)
          list of project names for a user (for SC04, getInvestigation())
 edu.indiana.extreme.lead.types.MyLeadUserInfoDocument getUserInfo(String userid)
          Retrieve mylead user information.
 edu.indiana.extreme.lead.types.LeadEntryArrayDocument getWorkflowInstance(String uid, String inv, String expName, String workflowName)
          gets all workflow instances (name, desc, template xml content, param xml content, script content) for a user's expriment.
 edu.indiana.extreme.lead.types.StringArrayDocument getWorkflowTemplateNames(String uid, String proj)
          get all workflow template names for a user's investigation
 edu.indiana.extreme.lead.types.LeadEntryArrayDocument getWorkflowTemplates(String uid, String proj, String wftName, String wftDesc)
          gets all workflow templates (name, desc, template xml content) for a user's project.
 String getWorkspace(String uid)
          gets all metadata belongs to the user's workspace
 String isActiveExperiment(String uID, String proj, String exp)
          return if the experiment is active in mylead now or not if it is an active experiment in mylead, this method will return the name of experiment back, otherwise return null
 void registerFile(String uID, String proj, String exp, String collectionName, String fileName, String fileDesc, edu.indiana.extreme.lead.types.LeadEntryDocument dataset)
          register a file to input collection.
 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 setWorkflowInstance(String uID, String proj, String exp, edu.indiana.extreme.lead.types.LeadEntryDocument workflowInstance)
          set an workflow inatance for this session
 void setWorkflowTemplate(String uID, String proj, String exp, edu.indiana.extreme.lead.types.LeadEntryDocument workflowTemplate)
          Set an workflow template for this experiment
 void shutdownExperiment(String uID, String proj, String exp)
          Shutdown this session.
 

Method Detail

getMyLeadServiceInfo

public edu.indiana.extreme.lead.types.MyLeadServiceInfoArrayDocument getMyLeadServiceInfo()
                                                                                   throws Exception
Retrieve mylead service information. This method returns complete set of mylead service information, including master and satellite myleads.

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

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

getActiveExperiment

public edu.indiana.extreme.lead.types.StringArrayDocument getActiveExperiment(String uID,
                                                                              String proj)
                                                                       throws Exception
return all active experiment name running under the username and the project name. This is for administrators.

Parameters:
uID - user id as a String
proj - project name as a String
Returns:
StringArrayDocument array of active experiment name
Throws:
Exception

getActiveProject

public edu.indiana.extreme.lead.types.StringArrayDocument getActiveProject(String uID)
                                                                    throws Exception
return all active project name running under the username and the project name. This is for Administrators.

Parameters:
uID - user id as a String
Returns:
StringArrayDocument array of active experiment name
Throws:
Exception

createExperiment

public String createExperiment(String uID,
                               String proj,
                               edu.indiana.extreme.lead.types.MyLeadExperimentDocument exp)
                        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
proj - project name as a String
exp - experiment info as a MyLeadExperimentDocument
Returns:
topicID for notification
Throws:
Exception

closeExperiment

public void closeExperiment(String uID,
                            String proj,
                            String exp)
                     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
proj - project name as a String
exp - experiment info as a MyLeadExperimentDocument
Returns:
void
Throws:
Exception

shutdownExperiment

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

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
Returns:
void
Throws:
Exception

setWorkflowTemplate

public void setWorkflowTemplate(String uID,
                                String proj,
                                String exp,
                                edu.indiana.extreme.lead.types.LeadEntryDocument workflowTemplate)
                         throws Exception
Set an workflow template for this experiment

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
workflowTemplate - metadata of a new workflow template
Returns:
void
Throws:
Exception

createCollection

public void createCollection(String uID,
                             String proj,
                             String exp,
                             String parent,
                             String parentType,
                             String collectionName,
                             String collectionDesc)
                      throws Exception
create a file collection. In this version, nested collection creating is also supported. The name of file collection must unique under a user account.

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
parent - if it has parent collection, the collectio name as a String if it is null or "", it will be automatically stored under exp.
parentType - It specifies type of parent. You can specify the parent of new collection as "PROJECT", "EXPERIMENT", or "COLLECTION"
collectionName - collection name as a String
collectionDesc - brief description of new collection as a String
Returns:
void
Throws:
Exception

registerFile

public void registerFile(String uID,
                         String proj,
                         String exp,
                         String collectionName,
                         String fileName,
                         String fileDesc,
                         edu.indiana.extreme.lead.types.LeadEntryDocument dataset)
                  throws Exception
register a file to input collection. The name of a file must be unique under the user account.

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
collectionName - collection name as a String. if the collection name is null, a new collection is created under the experiment with name of "experiment name:input collection" and file will be added uner the collection
fileName - file name as a String.
dataset - metadata of the file as LeadEntryDocument
Returns:
void
Throws:
Exception

setWorkflowInstance

public void setWorkflowInstance(String uID,
                                String proj,
                                String exp,
                                edu.indiana.extreme.lead.types.LeadEntryDocument workflowInstance)
                         throws Exception
set an workflow inatance for this session

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
workflowInstance - metadata of a new workflow instance
Returns:
void
Throws:
Exception

isActiveExperiment

public String isActiveExperiment(String uID,
                                 String proj,
                                 String exp)
                          throws Exception
return if the experiment is active in mylead now or not if it is an active experiment in mylead, this method will return the name of experiment back, otherwise return null

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
Returns:
String if it is an active experiment, returns the name of experiment otherwise return null
Throws:
Exception

getActiveWorkflowTemplateName

public String getActiveWorkflowTemplateName(String uID,
                                            String proj,
                                            String exp)
                                     throws Exception
return the workflow template name running on current experiment

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
Returns:
String workflow Template name under the experiment
Throws:
Exception

getActiveWorkflowInstanceName

public String getActiveWorkflowInstanceName(String uID,
                                            String proj,
                                            String exp)
                                     throws Exception
return the workflow instancename running on current experiment

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
Returns:
String workflow instance name under the experiment
Throws:
Exception

getCurrentState

public String getCurrentState(String uID,
                              String proj,
                              String exp)
                       throws Exception
get current state of this session

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
Returns:
current state as a String
Throws:
Exception

getActiveNotificationTopicID

public String getActiveNotificationTopicID(String uID,
                                           String proj,
                                           String exp)
                                    throws Exception
get notification topicID for this experiment

Parameters:
uID - user id as a String
proj - project name as a String
exp - experiment name as a String
Returns:
notification topic ID as a String
Throws:
Exception

createProject

public void createProject(String uID,
                          String proj,
                          String projdesc)
                   throws Exception
create a project

Parameters:
uID - user id as a String
proj - project name as a String
projdesc - project description as a String
Returns:
void
Throws:
Exception

getProjects

public edu.indiana.extreme.lead.types.MyLeadInvestigationArrayDocument getProjects(String uid)
                                                                            throws Exception
list of project names for a user (for SC04, getInvestigation())

Parameters:
uid - user id a String
Returns:
a MyLeadInvestigationArrayDocument that is a list of all investigations for a user
Throws:
Exception

addWorkflowTemplate

public void addWorkflowTemplate(String uid,
                                String proj,
                                edu.indiana.extreme.lead.types.LeadEntryDocument workflowTemplate)
                         throws Exception
adds a new workflow template (name, desc, template xml content) to a user's project. LeadEntryDocument contains XWFContentType

Parameters:
uid - user ID as a string
workflowTemplate - a LeadEntryDocument that contains lead content and lead reference. The lead content has a leadworkflow document. For now, the leadworkflow type is implemented by XWFContentType. For the template, the binding file content is not present. The lead reference is also not provided since the content of the template files are inserted into the content itself. Later, it may have a reference to the workflow files intead of passing it as content.
Throws:
Exception

getWorkflowTemplates

public edu.indiana.extreme.lead.types.LeadEntryArrayDocument getWorkflowTemplates(String uid,
                                                                                  String proj,
                                                                                  String wftName,
                                                                                  String wftDesc)
                                                                           throws Exception
gets all workflow templates (name, desc, template xml content) for a user's project. LeadEntryDocument contains XWFContentType

Parameters:
uid - user id as a String
wftName - workflow template name query. It can be a wildcard. If null, all workflow names are matched.
wftDesc - workflow template description query. It can be a wildcard. If null, all workflow descriptions are matched.
Returns:
a LeadEntryArrayDocument that contains a leadcontent, that has a leadworkflowdocument. For now, the lead workflow document has a XWFCOntentType that has the workflow template files embedded in the content. The binding file is not presnt. The lead reference could be absent.
Throws:
Exception

getWorkflowTemplateNames

public edu.indiana.extreme.lead.types.StringArrayDocument getWorkflowTemplateNames(String uid,
                                                                                   String proj)
                                                                            throws Exception
get all workflow template names for a user's investigation

Parameters:
uid - user id as a String
Returns:
a StringArrayDocument that is a list of names of all workflow template in a user's investigation
Throws:
Exception

getWorkflowInstance

public edu.indiana.extreme.lead.types.LeadEntryArrayDocument getWorkflowInstance(String uid,
                                                                                 String inv,
                                                                                 String expName,
                                                                                 String workflowName)
                                                                          throws Exception
gets all workflow instances (name, desc, template xml content, param xml content, script content) for a user's expriment. result array has LeadEntryDocuments containing XWFContentType

Parameters:
uid - user id as a String
inv - investigation name as a String
expName - experiment name as a String
workflowName - name of the workflow instance to retrieve. If null, all workflow instances in this investigation are returned.
Returns:
a LeadEntryArrayDocument containing all workflow instances that are availble for this user's investigation and experiment. The lead content contains a lead workflow. this for now is a XWFContentType that contains the template information and the bindings files as part of the metadata content. The reference may not be present.
Throws:
Exception

getExperiments

public edu.indiana.extreme.lead.types.MyLeadExperimentArrayDocument getExperiments(String uid,
                                                                                   String proj,
                                                                                   int lastNDays)
                                                                            throws Exception
get all the expriment name and description for a user's investigation.

Parameters:
uid - user id as a a String
proj - investigation name as a String
lastNDays - how old in days the experiment can be. 1 gives experiments created within the past 24hrs, 2 gives experiments within the past 2 days etc. 0 gives all experiments in the investigation.
Returns:
a MyLeadExperimentArrayDocument containing array of all experiments for a user's investigation that were created within the lastNDays, or all experiments for that investigation id lastNDays is 0.
Throws:
Exception

getNotifications

public edu.indiana.extreme.lead.types.WorkflowNotificationArrayDocument getNotifications(String uid,
                                                                                         String proj,
                                                                                         String exp,
                                                                                         int countFromLast)
                                                                                  throws Exception
returns notifications stored under this experiment.

Parameters:
uid - user id as a String
proj - investigation name as a String
exp - experiment name as a String
Returns:
a WorkflowNotificationArrayDocument that contains workflow notifications that have been received for this user's experiment. The number of notification returned is less than or equal to lastNCount, or all available notifications if lastNCount is 0.
Throws:
Exception

getFiles

public edu.indiana.extreme.lead.types.LeadEntryArrayDocument getFiles(String uid,
                                                                      String fileName)
                                                               throws Exception
[To Do] gets all files that have been used during experiment. result array has LeadEntryDocuments containing LeadDataSource; In SC04 demo, it was getDataSource() and getDataStore(). Those methods will be, getFiles(String uid, String fileName) getFiles(String uid, SpatialDocument area) getFiles(String uid, int lastNDays) return value will include metadata of the file from the query.

Returns:
a LeadEntryArrayDocument that contains a list of lead entries that are associated with this file
Throws:
Exception

getWorkspace

public String getWorkspace(String uid)
                    throws Exception
gets all metadata belongs to the user's workspace

Parameters:
uid - user id as a String
Returns:
OGSA-DAI perform document as a String
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