teamSpace.agent
Class TeamSpaceAgent

java.lang.Object
  extended byAgent
      extended byteamSpace.agent.TeamSpaceAgent

public class TeamSpaceAgent
extends Agent

This class represents the agent that controls the Team Space

See Also:
Serialized Form

Constructor Summary
TeamSpaceAgent()
           
 
Method Summary
 java.util.ArrayList getActionsReadyToExecute(java.lang.String teamID)
          The method returns the actions that are ready to be executed.
 FileWriter getFileWriter(java.lang.String teamID)
          This method returns the FileWriter that handles printing the output of the problem solving steps to a file.
 java.lang.String getInitialInput(java.lang.String teamID)
          The method returns the initial input
 java.lang.String getInitialProblem(java.lang.String teamID)
          The method returns the initial problem
 java.lang.String getProblemSolution(java.lang.String teamID)
          The method returns the solution to the initial problem
 java.util.ArrayList getProcessingActions(java.lang.String teamID)
          The method returns the processing actions - the actions to be executed in the current state of the problem solving process
 java.util.ArrayList getProcessingPSMs(java.lang.String teamID)
          The method returns the processing PSMs - the PSMs to be composed in the current state of the problem solving process
 java.util.ArrayList getPSMsReadyToCompose(java.lang.String teamID)
          The method returns the PSMs that are ready to be composed.
 TeamSpace getTeamSpace(java.lang.String teamID)
          This method returns the TeamSpace with the specified teamID
 boolean initializeTeamSpace(TMST tmst, java.lang.String teamID, java.lang.String requester)
          The method initializes the Team Space.
 void printCurrentState(java.lang.String teamID)
          The method prints the current state of the problem solving in the Team Space.
 boolean setProcessedActions(java.util.ArrayList actions, java.lang.String teamID)
          The method adds a list of actions to the processed actions list
 boolean setProcessedPSMs(java.util.ArrayList psms, java.lang.String teamID)
          The method adds a list of psms to the processed psms list
 void setProcessingActions(java.util.ArrayList actions, java.lang.String teamID)
          This method sets the actions that are going to be processed.
 void setProcessingPSMs(java.util.ArrayList psms, java.lang.String teamID)
          This method sets the psms that are going to be composed.
 ServiceDescription setServiceDescription()
          The method returns the service description of the agent.
protected  void setup()
          The method sets up the agent's behaviours.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeamSpaceAgent

public TeamSpaceAgent()
Method Detail

setup

protected void setup()
The method sets up the agent's behaviours.


getActionsReadyToExecute

public java.util.ArrayList getActionsReadyToExecute(java.lang.String teamID)
The method returns the actions that are ready to be executed.

Parameters:
teamID - The ID of the problem solving team using the Team Space
Returns:
The actions in an ArrayList

getPSMsReadyToCompose

public java.util.ArrayList getPSMsReadyToCompose(java.lang.String teamID)
The method returns the PSMs that are ready to be composed.

Parameters:
teamID - The ID of the problem solving team using the Team Space
Returns:
The PSMs in an ArrayList

getProcessingActions

public java.util.ArrayList getProcessingActions(java.lang.String teamID)
The method returns the processing actions - the actions to be executed in the current state of the problem solving process

Parameters:
teamID - The ID of the problem solving team using the Team Space
Returns:
The actions in a list of TSAction objects

getProcessingPSMs

public java.util.ArrayList getProcessingPSMs(java.lang.String teamID)
The method returns the processing PSMs - the PSMs to be composed in the current state of the problem solving process

Parameters:
teamID - The ID of the problem solving team using the Team Space
Returns:
The PSMs in a list of TSPSM objects

initializeTeamSpace

public boolean initializeTeamSpace(TMST tmst,
                                   java.lang.String teamID,
                                   java.lang.String requester)
The method initializes the Team Space.

Parameters:
tmst - The task structure tree
requester - The name-adress of the requester of the Team Space

setProcessedActions

public boolean setProcessedActions(java.util.ArrayList actions,
                                   java.lang.String teamID)
The method adds a list of actions to the processed actions list

Parameters:
actions - - The actions that are redily processed
teamID - The ID of the problem solving team using the Team Space
Returns:
true if the processed actions are successfully added to the result-library and false if not

setProcessingActions

public void setProcessingActions(java.util.ArrayList actions,
                                 java.lang.String teamID)
This method sets the actions that are going to be processed.

Parameters:
actions - - A list of actions
teamID - The ID of the problem solving team using the Team Space

setProcessingPSMs

public void setProcessingPSMs(java.util.ArrayList psms,
                              java.lang.String teamID)
This method sets the psms that are going to be composed.

Parameters:
teamID - The ID of the problem solving team using the Team Space
psms - - A list of psms

setProcessedPSMs

public boolean setProcessedPSMs(java.util.ArrayList psms,
                                java.lang.String teamID)
The method adds a list of psms to the processed psms list

Parameters:
psms - - The list of psms that are processed
teamID - The ID of the problem solving team using the Team Space
Returns:
True if the processed actions are successfully added to the result-library and False if not

setServiceDescription

public ServiceDescription setServiceDescription()
The method returns the service description of the agent.

Returns:
The service description

printCurrentState

public void printCurrentState(java.lang.String teamID)
The method prints the current state of the problem solving in the Team Space.

Parameters:
teamID - The ID of the problem solving team using the Team Space

getProblemSolution

public java.lang.String getProblemSolution(java.lang.String teamID)
The method returns the solution to the initial problem

Parameters:
teamID - The ID of the problem solving team using the Team Space
Returns:
The solution as a String

getInitialProblem

public java.lang.String getInitialProblem(java.lang.String teamID)
The method returns the initial problem

Parameters:
teamID - The ID of the problem solving team using the Team Space
Returns:
The initial problem as a String

getInitialInput

public java.lang.String getInitialInput(java.lang.String teamID)
The method returns the initial input

Parameters:
teamID - The ID of the problem solving team using the Team Space
Returns:
The initial input as a String

getFileWriter

public FileWriter getFileWriter(java.lang.String teamID)
This method returns the FileWriter that handles printing the output of the problem solving steps to a file.

Parameters:
teamID - The ID of the problem solving team using the Team Space. Each TR has it's own FileWriter, meaning each problem has it's own filewriter, meaning each Team Space has it's own FileWriter.
Returns:
The file writer - reference

getTeamSpace

public TeamSpace getTeamSpace(java.lang.String teamID)
This method returns the TeamSpace with the specified teamID

Parameters:
teamID - The teamID
Returns:
A TeamSpace from the list of Team Spaces belonging to this agent