public class ResourceGatewayClientAdapter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected ResourceMarshaller |
_marshaller |
protected ResourceGatewayClient |
_rgclient |
protected java.lang.String |
_uri |
protected XNodeParser |
_xnodeParser |
static java.lang.String |
JSON_FORMAT |
static java.lang.String |
XML_FORMAT |
Constructor and Description |
---|
ResourceGatewayClientAdapter() |
ResourceGatewayClientAdapter(java.lang.String uri) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
addCapability(Capability cap,
java.lang.String handle)
Adds a new capability to the service's org data
|
java.lang.String |
addNonHumanCategory(java.lang.String category,
java.lang.String handle)
Adds a new NonHumanResource category
|
java.lang.String |
addNonHumanResource(NonHumanResource resource,
java.lang.String handle)
Adds a new NonHumanResource to the service's org data
|
boolean |
addNonHumanSubCategory(java.lang.String id,
java.lang.String subcategory,
java.lang.String handle)
Adds a new NonHumanResource category
|
boolean |
addNonHumanSubCategoryByName(java.lang.String category,
java.lang.String subcategory,
java.lang.String handle)
Adds a new NonHumanResource category
|
java.lang.String |
addOrgGroup(OrgGroup group,
java.lang.String handle)
Adds a new org group to the service's org data
|
java.lang.String |
addParticipant(Participant p,
boolean encryptPassword,
java.lang.String handle)
Adds a new participant to the service's org data
|
java.lang.String |
addParticipant(Participant p,
java.lang.String handle)
Adds a new participant to the service's org data
|
java.lang.String |
addParticipantToCapability(Participant p,
Capability cap,
java.lang.String handle)
Adds the specified Participant to the specified Capability
|
java.lang.String |
addParticipantToPosition(Participant p,
Position pos,
java.lang.String handle)
Adds the specified Participant to the specified Position
|
java.lang.String |
addParticipantToRole(Participant p,
Role role,
java.lang.String handle)
Adds the specified Participant to the specified Role
|
java.lang.String |
addPosition(Position pos,
java.lang.String handle)
Adds a new position to the service's org data
|
java.lang.String |
addRole(Role role,
java.lang.String handle)
Adds a new role to the service's org data
|
boolean |
checkConnection(java.lang.String handle)
Checks that the connection to the service is valid
|
java.lang.String |
connect(java.lang.String userid,
java.lang.String password)
Attempts to connect to the service
|
void |
disconnect(java.lang.String handle)
Disconnects a session from the service
|
java.util.Set<Participant> |
getActiveParticipants(java.lang.String handle)
Gets the set of Participants that are currently logged on
|
java.util.List<java.lang.String> |
getAllNonHumanResourceNames(java.lang.String handle)
Gets the name of each NonHumanResource
|
java.util.List<AbstractSelector> |
getAllocators(java.lang.String handle)
Gets a complete list of available Allocator objects
|
java.util.List<java.lang.String> |
getAllParticipantNames(java.lang.String handle)
Gets the full name of each participant
|
java.util.List<java.lang.String> |
getAllRoleNames(java.lang.String handle)
Gets the name of each role
|
java.util.List |
getCapabilities(java.lang.String handle)
Gets a complete list of available Capability objects
|
Capability |
getCapability(java.lang.String id,
java.lang.String handle)
Gets the Capability with the specified id
|
Capability |
getCapabilityByName(java.lang.String name,
java.lang.String handle)
Gets the Capability with the specified name
|
java.util.Map<java.lang.String,java.lang.String> |
getCapabilityIdentifiers(java.lang.String handle)
Gets the id and name of every Capability
|
java.lang.String |
getCapabilityIdentifiersToJSON(java.lang.String handle)
Gets the id and name of every Capability in JSON format
|
ResourceGatewayClient |
getClient() |
java.lang.String |
getClientURI() |
java.util.Map<java.lang.String,java.lang.String> |
getCodeletMap(java.lang.String handle) |
java.util.List<YParameter> |
getCodeletParameters(java.lang.String codeletName,
java.lang.String handle) |
java.util.List<CodeletInfo> |
getCodelets(java.lang.String handle)
Gets a complete list of available codelets
|
java.util.List<AbstractSelector> |
getConstraints(java.lang.String handle)
Gets a complete list of available Constraint objects
|
java.util.List<AbstractSelector> |
getFilters(java.lang.String handle)
Gets a complete list of available Filter objects
|
java.util.List<NonHumanCategory> |
getNonHumanCategories(java.lang.String handle)
Gets the list of all NonHumanCategory objects known to the Resource Service
|
java.lang.String |
getNonHumanCategoriesToJSON(java.lang.String handle)
Gets the list of all NonHumanResource category names in JSON format
|
NonHumanCategory |
getNonHumanCategory(java.lang.String id,
java.lang.String handle)
Gets the NonHumanCategory with the specified id
|
NonHumanCategory |
getNonHumanCategoryByName(java.lang.String name,
java.lang.String handle)
Gets the NonHumanCategory with the specified name
|
java.util.Map<java.lang.String,java.util.Set<java.lang.String>> |
getNonHumanCategorySet(java.lang.String handle)
Gets the list of all NonHumanResource category names and the subcategories of each
|
NonHumanResource |
getNonHumanResource(java.lang.String id,
java.lang.String handle)
Gets the NonHumanResource with the specified id
|
NonHumanResource |
getNonHumanResourceByName(java.lang.String name,
java.lang.String handle)
Gets the NonHumanResource with the specified name
|
java.util.Map<java.lang.String,java.lang.String> |
getNonHumanResourceIdentifiers(java.lang.String handle)
Gets the id and name of every NonHumanResource
|
java.lang.String |
getNonHumanResourceIdentifiersToJSON(java.lang.String handle)
Gets the id and name of every NonHumanResource in JSON format
|
java.util.List<NonHumanResource> |
getNonHumanResources(java.lang.String handle)
Gets a complete list of available NonHumanResource objects
|
java.util.List<java.lang.String> |
getNonHumanSubCategories(java.lang.String id,
java.lang.String handle)
Gets the list of all the subcategory names of a NonHumanResource category
|
java.util.List<java.lang.String> |
getNonHumanSubCategoriesByName(java.lang.String category,
java.lang.String handle)
Gets the list of all the subcategory names of a NonHumanResource category
|
java.lang.String |
getNonHumanSubCategoriesToJSON(java.lang.String id,
java.lang.String handle)
Gets the list of all the subcategory names of a NonHumanResource category in
JSON format
|
java.lang.String |
getNonHumanSubCategoriesToJSONByName(java.lang.String category,
java.lang.String handle)
Gets the list of all the subcategory names of a NonHumanResource category in
JSON format
|
OrgGroup |
getOrgGroup(java.lang.String id,
java.lang.String handle)
Gets the OrgGroup with the specified id
|
OrgGroup |
getOrgGroupByName(java.lang.String name,
java.lang.String handle)
Gets the OrgGroup with the specified name
|
java.util.Map<java.lang.String,java.lang.String> |
getOrgGroupIdentifiers(java.lang.String handle)
Gets the id and name of every OrgGroup
|
java.lang.String |
getOrgGroupIdentifiersToJSON(java.lang.String handle)
Gets the id and name of every OrgGroup in JSON format
|
java.util.List |
getOrgGroups(java.lang.String handle)
Gets a complete list of available OrgGroup objects
|
Participant |
getParticipant(java.lang.String pid,
java.lang.String handle)
Gets a particular Participant
|
java.util.List |
getParticipantCapabilities(java.lang.String pid,
java.lang.String handle)
Gets a list of all capabilities held by the specified participant
|
Participant |
getParticipantFromUserID(java.lang.String userID,
java.lang.String handle)
Gets the Participant with the specified user id
|
java.util.Map<java.lang.String,java.lang.String> |
getParticipantIdentifiers(ResourceDataSet.Identifier identifier,
java.lang.String handle)
Gets the id and chosen name value of every Participant
|
java.util.Map<java.lang.String,java.lang.String> |
getParticipantIdentifiers(java.lang.String handle)
Gets the id and full name of every Participant
|
java.lang.String |
getParticipantIdentifiersToJSON(ResourceDataSet.Identifier identifier,
java.lang.String handle)
Gets the id and chosen name value of every Participant in JSON format
|
java.lang.String |
getParticipantIdentifiersToJSON(java.lang.String handle)
Gets the id and full name of every Participant in JSON format
|
java.util.List |
getParticipantPositions(java.lang.String pid,
java.lang.String handle)
Gets a list of all positions held by the specified participant
|
java.util.List |
getParticipantRoles(java.lang.String pid,
java.lang.String handle)
Gets a list of all roles 'occupied' by the specified participant
|
java.util.List<Participant> |
getParticipants(java.lang.String handle)
Gets a complete list of available Participant objects
|
java.util.Set<Participant> |
getParticipantsWithCapability(java.lang.String capabilityName,
java.lang.String handle)
Gets the set of Participants that hold the named capability
|
java.util.Set<Participant> |
getParticipantsWithPosition(java.lang.String positionName,
java.lang.String handle)
Gets the set of Participants that 'occupy' the named position
|
java.util.Set<Participant> |
getParticipantsWithRole(java.lang.String roleName,
java.lang.String handle)
Gets the set of Participants that 'occupy' the named role
|
Position |
getPosition(java.lang.String id,
java.lang.String handle)
Gets the Position with the specified id
|
Position |
getPositionByName(java.lang.String name,
java.lang.String handle)
Gets the Position with the specified name
|
java.util.Map<java.lang.String,java.lang.String> |
getPositionIdentifiers(java.lang.String handle)
Gets the id and name of every Position
|
java.lang.String |
getPositionIdentifiersToJSON(java.lang.String handle)
Gets the id and name of every Position in JSON format
|
java.util.List |
getPositions(java.lang.String handle)
Gets a complete list of available Position objects
|
java.util.Set<java.lang.String> |
getReferencedParticipantIDs(java.lang.String anyID,
java.lang.String handle)
Gets a set of participant ids referenced by the id string argument
|
Role |
getRole(java.lang.String id,
java.lang.String handle)
Gets the Role with the specified id
|
Role |
getRoleByName(java.lang.String name,
java.lang.String handle)
Gets the Role with the specified name
|
java.util.Map<java.lang.String,java.lang.String> |
getRoleIdentifiers(java.lang.String handle)
Gets the id and name of every Role
|
java.lang.String |
getRoleIdentifiersToJSON(java.lang.String handle)
Gets the id and name of every Role in JSON format
|
java.util.List |
getRoles(java.lang.String handle)
Gets a complete list of available Role objects
|
UserPrivileges |
getUserPrivileges(java.lang.String id,
java.lang.String handle)
Gets the UserPrivileges of the Participant with the specified id
|
boolean |
isKnownCapability(java.lang.String capabilityID,
java.lang.String handle)
Checks if an id corresponds to a capability id known to the service
|
boolean |
isKnownNonHumanCategory(java.lang.String id,
java.lang.String handle)
Checks if an id corresponds to a NonHumanCategory id known to the service
|
boolean |
isKnownNonHumanResource(java.lang.String id,
java.lang.String handle)
Checks if an id corresponds to a NonHumanResource id known to the service
|
boolean |
isKnownOrgGroup(java.lang.String groupID,
java.lang.String handle)
Checks if an id corresponds to a OrgGroup id known to the service
|
boolean |
isKnownParticipant(java.lang.String participantID,
java.lang.String handle)
Checks if an id corresponds to a participant id known to the service
|
boolean |
isKnownPosition(java.lang.String positionID,
java.lang.String handle)
Checks if an id corresponds to a position id known to the service
|
boolean |
isKnownRole(java.lang.String roleID,
java.lang.String handle)
Checks if an id corresponds to a role id known to the service
|
java.lang.String |
removeCapability(Capability cap,
java.lang.String handle)
Removes (deletes) the specified Capability from the service's org data
|
boolean |
removeNonHumanCategory(java.lang.String id,
java.lang.String handle)
Removes a category of the list of NonHumanResource categories
|
boolean |
removeNonHumanCategoryByName(java.lang.String name,
java.lang.String handle)
Removes a category of the list of NonHumanResource categories
|
java.lang.String |
removeNonHumanResource(NonHumanResource resource,
java.lang.String handle)
Removes (deletes) the specified NonHumanResource from the service's org data
|
boolean |
removeNonHumanSubCategory(java.lang.String id,
java.lang.String subcategory,
java.lang.String handle)
Removes a subcategory of a NonHumanResource category
|
boolean |
removeNonHumanSubCategoryByName(java.lang.String category,
java.lang.String subcategory,
java.lang.String handle)
Removes a subcategory of a NonHumanResource category
|
java.lang.String |
removeOrgGroup(OrgGroup group,
java.lang.String handle)
Removes (deletes) the specified OrgGroup from the service's org data
|
java.lang.String |
removeParticipant(Participant p,
java.lang.String handle)
Removes (deletes) the specified Participant from the service's org data
|
java.lang.String |
removeParticipantFromCapability(Participant p,
Capability cap,
java.lang.String handle)
Removes (deletes) the specified Participant from the set of Participants
holding the specified Capability
|
java.lang.String |
removeParticipantFromPosition(Participant p,
Position pos,
java.lang.String handle)
Removes (deletes) the specified Participant from the set of Participants
occupying the specified Position
|
java.lang.String |
removeParticipantFromRole(Participant p,
Role role,
java.lang.String handle)
Removes (deletes) the specified Participant from the set of Participants
occupying the specified Role
|
java.lang.String |
removePosition(Position pos,
java.lang.String handle)
Removes (deletes) the specified Position from the service's org data
|
java.lang.String |
removeRole(Role role,
java.lang.String handle)
Removes (deletes) the specified Role from the service's org data
|
void |
setClientURI(java.lang.String uri) |
java.lang.String |
setContainingOrgGroup(OrgGroup group,
OrgGroup containingGroup,
java.lang.String handle)
Sets the containing OrgGroup for an OrgGroup (i.e.
|
java.lang.String |
setContainingPosition(Position pos,
Position containingPos,
java.lang.String handle)
Sets the containing Position for a Position (i.e.
|
java.lang.String |
setContainingRole(Role role,
Role containingRole,
java.lang.String handle)
Sets the containing Role for a Role (i.e.
|
java.lang.String |
setParticipantPrivileges(Participant p,
java.lang.String handle)
Sets the user privileges for a Participant
|
java.lang.String |
setParticipantPrivileges(Participant p,
UserPrivileges privs,
java.lang.String handle)
Sets the user privileges for a Participant
|
java.lang.String |
setPositionOrgGroup(Position pos,
OrgGroup group,
java.lang.String handle)
Sets the containing OrgGroup for a Position
|
protected java.lang.String |
successCheck(java.lang.String xml) |
boolean |
successful(java.lang.String result) |
java.lang.String |
updateCapability(Capability cap,
java.lang.String handle)
Updates the Capability stored in the service's org data with the modified values
of the Capability specified
|
java.lang.String |
updateNonHumanCategory(NonHumanCategory category,
java.lang.String handle)
Updates the NonHumanCategory stored in the service's org data with the modified
values of the NonHumanResource specified
|
java.lang.String |
updateNonHumanResource(NonHumanResource resource,
java.lang.String handle)
Updates a new NonHumanResource to the service's org data with the modified values
of the NonHumanResource specified
|
java.lang.String |
updateOrgGroup(OrgGroup group,
java.lang.String handle)
Updates the OrgGroup stored in the service's org data with the modified values
of the OrgGroup specified
|
java.lang.String |
updateParticipant(Participant p,
boolean encryptPassword,
java.lang.String handle)
Updates the Participant stored in the service's org data with the modified values
of the Participant specified
|
java.lang.String |
updateParticipant(Participant p,
java.lang.String handle)
Updates the Participant stored in the service's org data with the modified values
of the Participant specified
|
java.lang.String |
updatePosition(Position pos,
java.lang.String handle)
Updates the Position stored in the service's org data with the modified values
of the Position specified
|
java.lang.String |
updateRole(Role role,
java.lang.String handle)
Updates the Role stored in the service's org data with the modified values
of the Role specified
|
java.lang.String |
validateUserCredentials(java.lang.String userid,
java.lang.String password,
boolean checkForAdmin,
java.lang.String handle)
Checks the user credentials passed against those stored
|
public static final java.lang.String XML_FORMAT
public static final java.lang.String JSON_FORMAT
protected ResourceGatewayClient _rgclient
protected java.lang.String _uri
protected ResourceMarshaller _marshaller
protected XNodeParser _xnodeParser
public ResourceGatewayClientAdapter()
public ResourceGatewayClientAdapter(java.lang.String uri)
public void setClientURI(java.lang.String uri)
public java.lang.String getClientURI()
public ResourceGatewayClient getClient()
public boolean successful(java.lang.String result)
protected java.lang.String successCheck(java.lang.String xml) throws ResourceGatewayException
ResourceGatewayException
public boolean checkConnection(java.lang.String handle)
handle
- the current sessionhandlepublic java.lang.String connect(java.lang.String userid, java.lang.String password)
userid
- the useridpassword
- the corresponding passwordpublic void disconnect(java.lang.String handle)
handle
- the sessionhandle of the session to disconnectpublic java.lang.String validateUserCredentials(java.lang.String userid, java.lang.String password, boolean checkForAdmin, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
userid
- the userid of the Participantpassword
- the associated passwordcheckForAdmin
- when true, also checks that the user has admin privilegeshandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there was a problem validating the credentialspublic java.util.List<java.lang.String> getAllParticipantNames(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the namespublic java.util.List<java.lang.String> getAllRoleNames(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the namespublic java.util.List<java.lang.String> getAllNonHumanResourceNames(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the namespublic java.util.List<NonHumanResource> getNonHumanResources(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the NonHumanResourcepublic java.util.List getRoles(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the rolespublic java.util.List getCapabilities(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the capabilitiespublic java.util.List getPositions(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the positionspublic java.util.List getOrgGroups(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the groupspublic java.util.List<Participant> getParticipants(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the participantspublic Participant getParticipant(java.lang.String pid, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
pid
- the id of the Participant to gethandle
- the current session handlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the participantpublic java.util.Set<java.lang.String> getReferencedParticipantIDs(java.lang.String anyID, java.lang.String handle) throws java.io.IOException
anyID
- the id of a Participant, Role, Capability, Position or OrgGrouphandle
- a valid session handlejava.io.IOException
- if the service can't be reachedpublic java.util.List<AbstractSelector> getConstraints(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the constraintspublic java.util.List<AbstractSelector> getAllocators(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the allocatorspublic java.util.List<AbstractSelector> getFilters(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the filterspublic java.util.List<CodeletInfo> getCodelets(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the codeletspublic java.util.Map<java.lang.String,java.lang.String> getCodeletMap(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
java.io.IOException
ResourceGatewayException
public java.util.List<YParameter> getCodeletParameters(java.lang.String codeletName, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
java.io.IOException
ResourceGatewayException
public boolean isKnownCapability(java.lang.String capabilityID, java.lang.String handle)
capabilityID
- the id to checkhandle
- the current sessionhandlepublic boolean isKnownNonHumanResource(java.lang.String id, java.lang.String handle)
id
- the id to checkhandle
- the current sessionhandlepublic boolean isKnownRole(java.lang.String roleID, java.lang.String handle)
roleID
- the id to checkhandle
- the current sessionhandlepublic boolean isKnownParticipant(java.lang.String participantID, java.lang.String handle)
participantID
- the id to checkhandle
- the current sessionhandlepublic boolean isKnownPosition(java.lang.String positionID, java.lang.String handle)
positionID
- the id to checkhandle
- the current sessionhandlepublic boolean isKnownOrgGroup(java.lang.String groupID, java.lang.String handle)
groupID
- the id to checkhandle
- the current sessionhandlepublic boolean isKnownNonHumanCategory(java.lang.String id, java.lang.String handle)
id
- the id to checkhandle
- the current sessionhandlepublic java.util.Set<Participant> getActiveParticipants(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the participantspublic java.util.List getParticipantRoles(java.lang.String pid, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
pid
- the id of the Participant of interesthandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the rolespublic java.util.List getParticipantCapabilities(java.lang.String pid, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
pid
- the id of the Participant of interesthandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the capabilitiespublic java.util.List getParticipantPositions(java.lang.String pid, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
pid
- the id of the Participant of interesthandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the positionspublic java.util.Set<Participant> getParticipantsWithRole(java.lang.String roleName, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
roleName
- the name of the role in question (not the id)handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the participantspublic java.util.Set<Participant> getParticipantsWithPosition(java.lang.String positionName, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
positionName
- the name of the position in question (not the id)handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the participantspublic java.util.Set<Participant> getParticipantsWithCapability(java.lang.String capabilityName, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
capabilityName
- the name of the capability in question (not the id)handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the participantspublic Participant getParticipantFromUserID(java.lang.String userID, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
userID
- the userid to match to a Participanthandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Participantpublic NonHumanResource getNonHumanResource(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the id of the NonHumanResource to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the NonHumanResourcepublic NonHumanResource getNonHumanResourceByName(java.lang.String name, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
name
- the id of the NonHumanResource to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the NonHumanResourcepublic Role getRole(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the id of the Role to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Rolepublic Role getRoleByName(java.lang.String name, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
name
- the id of the Role to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Rolepublic Capability getCapability(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the id of the Capability to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Capabilitypublic Capability getCapabilityByName(java.lang.String name, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
name
- the id of the Capability to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Capabilitypublic Position getPosition(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the id of the Position to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Positionpublic Position getPositionByName(java.lang.String name, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
name
- the id of the Position to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Positionpublic OrgGroup getOrgGroup(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the id of the OrgGroup to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the OrgGrouppublic OrgGroup getOrgGroupByName(java.lang.String name, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
name
- the id of the OrgGroup to gethandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the OrgGrouppublic java.util.Map<java.lang.String,java.lang.String> getParticipantIdentifiers(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Participantspublic java.lang.String getParticipantIdentifiersToJSON(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Participantspublic java.util.Map<java.lang.String,java.lang.String> getParticipantIdentifiers(ResourceDataSet.Identifier identifier, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
identifier
- a valid ResourceDataSet Identifier valuehandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Participantspublic java.lang.String getParticipantIdentifiersToJSON(ResourceDataSet.Identifier identifier, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
identifier
- a valid ResourceDataSet Identifier valuehandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Participantspublic java.util.Map<java.lang.String,java.lang.String> getNonHumanResourceIdentifiers(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the NonHumanResourcespublic java.lang.String getNonHumanResourceIdentifiersToJSON(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the NonHumanResourcespublic java.util.Map<java.lang.String,java.lang.String> getRoleIdentifiers(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Rolespublic java.lang.String getRoleIdentifiersToJSON(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Rolespublic java.util.Map<java.lang.String,java.lang.String> getPositionIdentifiers(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Positionspublic java.lang.String getPositionIdentifiersToJSON(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Positionspublic java.util.Map<java.lang.String,java.lang.String> getCapabilityIdentifiers(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Capabilitiespublic java.lang.String getCapabilityIdentifiersToJSON(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the Capabilitiespublic java.util.Map<java.lang.String,java.lang.String> getOrgGroupIdentifiers(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the OrgGroupspublic java.lang.String getOrgGroupIdentifiersToJSON(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the OrgGroupspublic UserPrivileges getUserPrivileges(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the id of the Participant to get the UserPrivileges forhandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there is some problem getting the UserPrivilegespublic java.lang.String addParticipant(Participant p, java.lang.String handle) throws java.io.IOException
p
- the Participanthandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addParticipant(Participant p, boolean encryptPassword, java.lang.String handle) throws java.io.IOException
p
- the ParticipantencryptPassword
- if true, will encrypt the current password within 'p'
before storing it on the server side (recommended for plain text passwords)handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addNonHumanResource(NonHumanResource resource, java.lang.String handle) throws java.io.IOException
resource
- the NonHumanResourcehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addCapability(Capability cap, java.lang.String handle) throws java.io.IOException
cap
- the Capabilityhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addRole(Role role, java.lang.String handle) throws java.io.IOException
role
- the Rolehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addPosition(Position pos, java.lang.String handle) throws java.io.IOException
pos
- the Positionhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addOrgGroup(OrgGroup group, java.lang.String handle) throws java.io.IOException
group
- the OrgGrouphandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addParticipantToRole(Participant p, Role role, java.lang.String handle) throws java.io.IOException
p
- the Participantrole
- the Role to add the Particpant tohandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addParticipantToCapability(Participant p, Capability cap, java.lang.String handle) throws java.io.IOException
p
- the Participantcap
- the Capability to add the Particpant tohandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String addParticipantToPosition(Participant p, Position pos, java.lang.String handle) throws java.io.IOException
p
- the Participantpos
- the Position to add the Particpant tohandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updateParticipant(Participant p, boolean encryptPassword, java.lang.String handle) throws java.io.IOException
p
- the ParticipantencryptPassword
- if true, will encrypt the current password within 'p'
before storing it on the server side (recommended for plain text passwords)handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updateParticipant(Participant p, java.lang.String handle) throws java.io.IOException
p
- the Participanthandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updateNonHumanResource(NonHumanResource resource, java.lang.String handle) throws java.io.IOException
resource
- the NonHumanResourcehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updateCapability(Capability cap, java.lang.String handle) throws java.io.IOException
cap
- the Capabilityhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updateRole(Role role, java.lang.String handle) throws java.io.IOException
role
- the Rolehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updatePosition(Position pos, java.lang.String handle) throws java.io.IOException
pos
- the Positionhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updateOrgGroup(OrgGroup group, java.lang.String handle) throws java.io.IOException
group
- the OrgGrouphandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String updateNonHumanCategory(NonHumanCategory category, java.lang.String handle) throws java.io.IOException
category
- the NonHumanResourcehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeParticipant(Participant p, java.lang.String handle) throws java.io.IOException
p
- the Participanthandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeNonHumanResource(NonHumanResource resource, java.lang.String handle) throws java.io.IOException
resource
- the NonHumanResourcehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeCapability(Capability cap, java.lang.String handle) throws java.io.IOException
cap
- the Capabilityhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeRole(Role role, java.lang.String handle) throws java.io.IOException
role
- the Rolehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removePosition(Position pos, java.lang.String handle) throws java.io.IOException
pos
- the Positionhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeOrgGroup(OrgGroup group, java.lang.String handle) throws java.io.IOException
group
- the OrgGrouphandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeParticipantFromRole(Participant p, Role role, java.lang.String handle) throws java.io.IOException
p
- the Participantrole
- the Role to remove the specified Participant fromhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeParticipantFromCapability(Participant p, Capability cap, java.lang.String handle) throws java.io.IOException
p
- the Participantcap
- the Capability to remove the specified Participant fromhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String removeParticipantFromPosition(Participant p, Position pos, java.lang.String handle) throws java.io.IOException
p
- the Participantpos
- the Position to remove the specified Participant fromhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String setContainingRole(Role role, Role containingRole, java.lang.String handle) throws java.io.IOException
role
- the RolecontainingRole
- the containing or parent Role that encapsulates rolehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String setContainingOrgGroup(OrgGroup group, OrgGroup containingGroup, java.lang.String handle) throws java.io.IOException
group
- the OrgGroupcontainingGroup
- the containing or parent OrgGroup that encapsulates grouphandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String setContainingPosition(Position pos, Position containingPos, java.lang.String handle) throws java.io.IOException
pos
- the PositioncontainingPos
- the containing or parent Position that encapsulates poshandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String setPositionOrgGroup(Position pos, OrgGroup group, java.lang.String handle) throws java.io.IOException
pos
- the Positiongroup
- the containing OrgGrouphandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String setParticipantPrivileges(Participant p, UserPrivileges privs, java.lang.String handle) throws java.io.IOException
p
- the Participantprivs
- the UserPrivileges objecthandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic java.lang.String setParticipantPrivileges(Participant p, java.lang.String handle) throws java.io.IOException
p
- the Participant (note: the privilege values used are the ones currently
within the Participant object specified)handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource servicepublic NonHumanCategory getNonHumanCategory(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- a valid NonHumanCategory identifierhandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there was a problem getting the NonHumanCategorypublic NonHumanCategory getNonHumanCategoryByName(java.lang.String name, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
name
- a valid NonHumanCategory namehandle
- a valid session handlejava.io.IOException
- if the service can't be reachedResourceGatewayException
- if there was a problem getting the NonHumanCategorypublic java.util.List<NonHumanCategory> getNonHumanCategories(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the listpublic java.lang.String getNonHumanCategoriesToJSON(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the listpublic java.util.List<java.lang.String> getNonHumanSubCategories(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the category id to get the subcategories forhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the listpublic java.util.List<java.lang.String> getNonHumanSubCategoriesByName(java.lang.String category, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
category
- the category name to get the subcategories forhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the listpublic java.lang.String getNonHumanSubCategoriesToJSON(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the category id to get the subcategories forhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the listpublic java.lang.String getNonHumanSubCategoriesToJSONByName(java.lang.String category, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
category
- the category name to get the subcategories forhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the listpublic java.util.Map<java.lang.String,java.util.Set<java.lang.String>> getNonHumanCategorySet(java.lang.String handle) throws java.io.IOException, ResourceGatewayException
handle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem getting the listpublic java.lang.String addNonHumanCategory(java.lang.String category, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
category
- the category to addhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem adding the categorypublic boolean addNonHumanSubCategoryByName(java.lang.String category, java.lang.String subcategory, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
category
- the category name to add the subcategory tosubcategory
- the subcategory to addhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem adding the subcategorypublic boolean addNonHumanSubCategory(java.lang.String id, java.lang.String subcategory, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the identifier of the category to add the subcategory tosubcategory
- the subcategory to addhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem adding the subcategorypublic boolean removeNonHumanCategory(java.lang.String id, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the identifier of the category to remove; all of the category's
subcategories will also be removedhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem removing the categorypublic boolean removeNonHumanCategoryByName(java.lang.String name, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
name
- the name of the category to remove; all of the category's
subcategories will also be removedhandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem removing the categorypublic boolean removeNonHumanSubCategoryByName(java.lang.String category, java.lang.String subcategory, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
category
- the name of the category to remove the subcategory fromsubcategory
- the subcategory name to removehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem removing the subcategorypublic boolean removeNonHumanSubCategory(java.lang.String id, java.lang.String subcategory, java.lang.String handle) throws java.io.IOException, ResourceGatewayException
id
- the identifier of the category to remove the subcategory fromsubcategory
- the subcategory name to removehandle
- the current sessionhandlejava.io.IOException
- if there was a problem connecting to the resource serviceResourceGatewayException
- if there was a problem removing the subcategoryCopyright © 2004-2014 The YAWL Foundation.