|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.upv.dsic.gti_ia.organization.THOMASProxy
es.upv.dsic.gti_ia.organization.OMSProxy
public class OMSProxy
This class gives us the support to accede to the services of the OMS. The OMS provides a group of services for registering or deregistering structural components, specific roles, norms and units. It also offers services for reporting on these components.
| Constructor Summary | |
|---|---|
OMSProxy(BaseAgent agent)
This class gives us the support to accede to the services of the OMS, Checked that the data contained in the file configuration/Settings.xml, the URL ServiceDescriptionLocation is not empty and is the correct path. |
|
OMSProxy(BaseAgent agent,
String OMSServiceDescriptionLocation)
This class gives us the support to access to the services of the OMS |
|
OMSProxy(CProcessor myProcessor)
|
|
OMSProxy(CProcessor agent,
String OMSServiceDescriptionLocation)
|
|
| Method Summary | |
|---|---|
String |
acquireRole(String RoleID,
String UnitID)
Service used for acquiring a role inside a specific unit. |
String |
allocateRole(String RoleID,
String UnitID,
String TargetAgentID)
Forces an agent to acquire a specific role |
ACLMessage |
buildOrganizationalMessage(String OrganizationID)
Builds a new organizational message with the appropriate receivers according to the type of unit and position of the role that the agent is performing |
String |
deallocateRole(String RoleID,
String UnitID,
String TargetAgentID)
Forces an agent to leave a specific role |
String |
deregisterRole(String RoleID,
String UnitID)
Removes a specific role from a unit. |
String |
deregisterUnit(String UnitID)
Removes a unit from an organization |
ArrayList<ArrayList<String>> |
informAgentRole(String RequestedAgentID)
Requesting the list of roles and units in which an agent is in a specific moment. |
ArrayList<ArrayList<String>> |
informMembers(String UnitID,
String RoleID,
String PositionID)
Indicates entities that are members of a specific unit. |
ArrayList<String> |
informRole(String RoleID,
String UnitID)
Provides a role description of a specific unit. |
ArrayList<String> |
informUnit(String UnitID)
Provides unit description. |
ArrayList<ArrayList<String>> |
informUnitRoles(String UnitID)
Used for requesting the list of roles that have been registered inside a unit. |
String |
jointUnit(String UnitID,
String ParentUnitID)
Update the parent unit |
String |
leaveRole(String RoleID,
String UnitID)
Service used for leaving a role inside a specific unit. |
int |
quantityMembers(String UnitID,
String RoleID,
String PositionID)
Provides the number of current members of a specific unit. |
String |
registerRole(String RoleID,
String UnitID,
String AccessibilityID,
String VisibilityID,
String PositionID)
Creates a new role inside a unit |
String |
registerUnit(String UnitID,
String TypeID,
String ParentUnitID,
String CreatorID)
Creates a new empty unit in the organization, with a specific structure, creatorName and parent unit. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OMSProxy(BaseAgent agent,
String OMSServiceDescriptionLocation)
agent - is a Magentix2 agent, this agent implemented the communication
protocol.OMSServiceDesciptionLocation - The URL where the owl's document is located.
public OMSProxy(CProcessor agent,
String OMSServiceDescriptionLocation)
public OMSProxy(BaseAgent agent)
agent - is a Magentix2 Agent, this agent implemented the communication
protocolpublic OMSProxy(CProcessor myProcessor)
| Method Detail |
|---|
public ACLMessage buildOrganizationalMessage(String OrganizationID)
throws THOMASException
OrganizationID - represents the ID of the organization to which the agent wants to send a message
THOMASException - If unit not found, the agent is not inside the unit, the agent not play any role or
the agent only play the role creator.
public String leaveRole(String RoleID,
String UnitID)
throws THOMASException
RoleID - Identifier of the roleUnitID - Identifier of the organization unit
THOMASException - If the role or unit not exists,
the agent not play the role or some parameter is empty or is invalid
public ArrayList<ArrayList<String>> informAgentRole(String RequestedAgentID)
throws THOMASException
RequestedAgentID - Identifier of the agent requested
THOMASException - If the agent not exists or some parameter is empty or is invalid
public ArrayList<ArrayList<String>> informMembers(String UnitID,
String RoleID,
String PositionID)
throws THOMASException
UnitID - Identifier of the unitRoleID - Identifier of the rolePositionID - Identifier of the position inside the unit, such as member, supervisor or subordinate
THOMASException - If unit not found, the role is not inside the unit, the agent is not allowed or some parameter is invalid
public ArrayList<String> informRole(String RoleID,
String UnitID)
throws THOMASException
RoleID - Identifier of the roleUnitID - Identifier of the unit
THOMASException - If unit not found, the role is not is not registered in the unit, the agent is not allowed, or some parameter is empty or is invalid
public ArrayList<String> informUnit(String UnitID)
throws THOMASException
UnitID - Identifier of the unit
THOMASException - If unit not found, the agent not play any role in unit or parent unit or some parameter is empty or is invalid
public ArrayList<ArrayList<String>> informUnitRoles(String UnitID)
throws THOMASException
UnitID - Identifier of the unit
THOMASException - If unit not found
public int quantityMembers(String UnitID,
String RoleID,
String PositionID)
throws THOMASException
UnitID - Identifier of the unitRoleID - Identifier of the rolePositionID - Identifier of the position inside the unit, such as member, supervisor or subordinate
THOMASException - If unit not found, the role is not inside the unit, the agent is not allowed or some parameter is invalid
public String registerRole(String RoleID,
String UnitID,
String AccessibilityID,
String VisibilityID,
String PositionID)
throws THOMASException
RoleID - Identifier of the roleUnitID - Identifier of the unitAccessibilityID - considers two types of roles: (internal) internal roles, which are
assigned to internal agents of the system platform; and (external)
external roles, which can be enacted by any agent.VisibilityID - indicates whether agents can obtain information of this role
from outside the unit in which this role is defined (public)
or from inside (private).PositionID - determines its structural position inside the unit, such as
member, supervisor or subordinate.
THOMASException - If unit not found, the role is already registered in the unit, the agent is not allowed or some parameter is empty or is invalid
public String registerUnit(String UnitID,
String TypeID,
String ParentUnitID,
String CreatorID)
throws THOMASException
UnitID - Identifier of the unitTypeID - indicates the topology of the new unit: (i) Hierarchy, in
which a supervisor agent has control over other members; (ii)
Team, which are groups of agents that share a common goal,
collaborating and cooperating between them; and (iii) Flat, in
which there is none agent with control over other members.ParentUnitID - Identifier of the parent unitCreatorID - The name of the new creator role
THOMASException - If unit already exists, if the parent unit not exists, the agent is not allowed or some parameter is empty or is invalid
public String jointUnit(String UnitID,
String ParentUnitID)
throws THOMASException
UnitID - Identifier of the unitParentUnitID - Identifier of the new parent unit
THOMASException - If unit or parent unit not found, the unit and parent unit are the same, the agent is not allowed or some parameter is empty or is invalid
public String deregisterRole(String RoleID,
String UnitID)
throws THOMASException
RoleID - Identifier of the roleUnitID - Identifier of the unit
THOMASException - If unit not found, the role is not registered in the unit, if not allowed or some parameter is empty or is invalid
public String deregisterUnit(String UnitID)
throws THOMASException
UnitID - Identifier of the unit
THOMASException - If unit not found, if not allowed or some parameter is empty or is invalid
public String deallocateRole(String RoleID,
String UnitID,
String TargetAgentID)
throws THOMASException
RoleID - Identifier of the roleUnitID - Identifier of the unitTargetAgentID - Identifier of the agent
THOMASException - If unit or role not found, if target agent not play the role, the agent is not allowed or some parameter is empty or is invalid
public String allocateRole(String RoleID,
String UnitID,
String TargetAgentID)
throws THOMASException
RoleID - Identifier of the roleUnitID - Identifier of the unitTargetAgentID - Identifier of the agent
THOMASException - If unit or role not found, if target agent already play the role, the agent is not allowed or some parameter is empty or is invalid
public String acquireRole(String RoleID,
String UnitID)
throws THOMASException
RoleID - Identifier of the roleUnitID - Identifier of the organization unit
THOMASException - If the role or unit not exists,
the agent play the role or some parameter is empty or is invalid
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||