Class OrganizationRESTServices
java.lang.Object
org.odpi.openmetadata.accessservices.communityprofile.server.OrganizationRESTServices
The OrganizationRESTServices provides the server-side implementation of the Community Profile Open Metadata
Assess Service (OMAS) capability for organization management. This interface provides support for creating all types of actor profiles and
associated user roles in order to describe the structure of an organization.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddContactMethod
(String serverName, String userId, String actorProfileGUID, ContactMethodRequestBody requestBody) Add a new contact method to the profile.createActorProfile
(String serverName, String userId, ActorProfileRequestBody requestBody) Create a definition of an actor profile.createPersonRole
(String serverName, String userId, PersonRoleRequestBody requestBody) Create a definition of a person role.deleteActorProfile
(String serverName, String userId, String actorProfileGUID, ExternalSourceRequestBody requestBody) Remove the definition of an actor profile.deleteContactMethod
(String serverName, String userId, String contactMethodGUID, ExternalSourceRequestBody requestBody) Remove an obsolete contact method from the profile.deletePersonRole
(String serverName, String userId, String personRoleGUID, ExternalSourceRequestBody requestBody) Remove the definition of a person role.findActorProfiles
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching profiles for the search string.findPersonRoles
(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching roles for the search string.getActorProfileByGUID
(String serverName, String userId, String actorProfileGUID) Return information about a specific actor profile.getActorProfileByUserId
(String serverName, String userId, String actorProfileUserId) Return information about a specific actor profile.getActorProfiles
(String serverName, String userId, int startFrom, int pageSize) Return all actor profiles.getActorProfilesByLocation
(String serverName, String userId, String locationGUID, int startFrom, int pageSize) Return information about a named actor profiles.getActorProfilesByName
(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named actor profiles.getAppointees
(String serverName, String userId, String personRoleGUID, int startFrom, int pageSize, EffectiveTimeRequestBody requestBody) Return the list of people appointed to a particular role.getLeadershipRolesForTeam
(String serverName, String userId, String teamGUID, int startFrom, int pageSize) Return information about a person role connected to the named team via the TeamLeadership relationship.getMembershipRolesForTeam
(String serverName, String userId, String teamGUID, int startFrom, int pageSize) Return information about a person role connected to the named team via the TeamMembership relationship.getPersonRoleByGUID
(String serverName, String userId, String personRoleGUID) Return information about a specific person role.getPersonRoleByName
(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named person role.linkPersonRoleToProfile
(String serverName, String userId, String personRoleGUID, String personProfileGUID, AppointmentRequestBody requestBody) Link a person role to a person profile to show that that person is performing the role.linkTeamPlayer
(String serverName, String userId, String teamRoleGUID, String teamProfileGUID, TeamPlayerRequestBody requestBody) Link a team leader person role or team member person role to a team profile.linkTeamsInHierarchy
(String serverName, String userId, String superTeamProfileGUID, String subTeamProfileGUID, boolean delegationEscalationAuthority, EffectiveDatesRequestBody requestBody) Link two related team/organization actor profiles together as part of a hierarchy.unlinkPersonRoleFromProfile
(String serverName, String userId, String appointmentGUID, ExternalSourceRequestBody requestBody) Remove the link between a person role and a person profile.unlinkTeamPlayer
(String serverName, String userId, String teamRoleGUID, String teamProfileGUID, TeamPlayerRequestBody requestBody) Remove the link between a person role and a team profile.unlinkTeamsInHierarchy
(String serverName, String userId, String superTeamProfileGUID, String subTeamProfileGUID, ExternalSourceRequestBody requestBody) Remove the link between two actor profiles in the actor profile hierarchy.updateActorProfile
(String serverName, String userId, String actorProfileGUID, boolean isMergeUpdate, ActorProfileRequestBody requestBody) Update the definition of an actor profile.updateAppointment
(String serverName, String userId, String appointmentGUID, boolean isMergeUpdate, AppointmentRequestBody requestBody) Update the properties for the appointment of a person to a role.updatePersonRole
(String serverName, String userId, String personRoleGUID, boolean isMergeUpdate, PersonRoleRequestBody requestBody) Update the definition of a person role.
-
Constructor Details
-
OrganizationRESTServices
public OrganizationRESTServices()Default constructor
-
-
Method Details
-
createActorProfile
public GUIDResponse createActorProfile(String serverName, String userId, ActorProfileRequestBody requestBody) Create a definition of an actor profile. This could be for the whole organization, a team, a person or a system.- Parameters:
serverName
- called serveruserId
- calling userrequestBody
- properties for a actor profile- Returns:
- unique identifier of actor profile InvalidParameterException qualifiedName or userId is null; qualifiedName is not unique PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
updateActorProfile
public VoidResponse updateActorProfile(String serverName, String userId, String actorProfileGUID, boolean isMergeUpdate, ActorProfileRequestBody requestBody) Update the definition of an actor profile.- Parameters:
serverName
- called serveruserId
- calling useractorProfileGUID
- unique identifier of actor profileisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?requestBody
- properties to change- Returns:
- void or InvalidParameterException guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
deleteActorProfile
public VoidResponse deleteActorProfile(String serverName, String userId, String actorProfileGUID, ExternalSourceRequestBody requestBody) Remove the definition of an actor profile.- Parameters:
serverName
- called serveruserId
- calling useractorProfileGUID
- unique identifier of actor profilerequestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException guid or userId is null; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
addContactMethod
public GUIDResponse addContactMethod(String serverName, String userId, String actorProfileGUID, ContactMethodRequestBody requestBody) Add a new contact method to the profile.- Parameters:
serverName
- called serveruserId
- the name of the calling user.actorProfileGUID
- identifier of the profile to update.requestBody
- properties of contact method.- Returns:
- unique identifier (guid) for the new contact method. InvalidParameterException the userId is null or invalid. Another property is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteContactMethod
public VoidResponse deleteContactMethod(String serverName, String userId, String contactMethodGUID, ExternalSourceRequestBody requestBody) Remove an obsolete contact method from the profile.- Parameters:
serverName
- called serveruserId
- the name of the calling user.contactMethodGUID
- unique identifier (guid) for the obsolete contact method.requestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException the userId is null or invalid. Another property is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkTeamsInHierarchy
public VoidResponse linkTeamsInHierarchy(String serverName, String userId, String superTeamProfileGUID, String subTeamProfileGUID, boolean delegationEscalationAuthority, EffectiveDatesRequestBody requestBody) Link two related team/organization actor profiles together as part of a hierarchy. A team/organization actor profile can only have one parent but many child actor profiles.- Parameters:
serverName
- called serveruserId
- calling usersuperTeamProfileGUID
- unique identifier of the parent team profilesubTeamProfileGUID
- unique identifier of the child team profiledelegationEscalationAuthority
- can workflows delegate/escalate through this link?requestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
unlinkTeamsInHierarchy
public VoidResponse unlinkTeamsInHierarchy(String serverName, String userId, String superTeamProfileGUID, String subTeamProfileGUID, ExternalSourceRequestBody requestBody) Remove the link between two actor profiles in the actor profile hierarchy.- Parameters:
serverName
- called serveruserId
- calling usersuperTeamProfileGUID
- unique identifier of the parent actor profilesubTeamProfileGUID
- unique identifier of the child actor profilerequestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getActorProfileByGUID
public ActorProfileResponse getActorProfileByGUID(String serverName, String userId, String actorProfileGUID) Return information about a specific actor profile.- Parameters:
serverName
- called serveruserId
- calling useractorProfileGUID
- unique identifier for the actor profile- Returns:
- properties of the actor profile InvalidParameterException actorProfileGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getActorProfileByUserId
public ActorProfileResponse getActorProfileByUserId(String serverName, String userId, String actorProfileUserId) Return information about a specific actor profile.- Parameters:
serverName
- called serveruserId
- calling useractorProfileUserId
- unique identifier for the actor profile- Returns:
- properties of the actor profile InvalidParameterException actorProfileUserId or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getActorProfilesByName
public ActorProfilesResponse getActorProfilesByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named actor profiles.- Parameters:
serverName
- called serveruserId
- calling userstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- unique name for the actor profile- Returns:
- list of matching actor profiles (hopefully only one) InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getActorProfiles
public ActorProfilesResponse getActorProfiles(String serverName, String userId, int startFrom, int pageSize) Return all actor profiles.- Parameters:
serverName
- called serveruserId
- calling userstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching actor profiles (hopefully only one) InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getActorProfilesByLocation
public ActorProfilesResponse getActorProfilesByLocation(String serverName, String userId, String locationGUID, int startFrom, int pageSize) Return information about a named actor profiles.- Parameters:
serverName
- called serveruserId
- calling userlocationGUID
- unique identifier for the locationstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching actor profiles (hopefully only one) InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
findActorProfiles
public ActorProfilesResponse findActorProfiles(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching profiles for the search string.- Parameters:
serverName
- called serveruserId
- the name of the calling user.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- RegEx string to search for- Returns:
- list of matching actor profiles InvalidParameterException guid invalid or the external references are not correctly specified, or are null. PropertyServerException the server is not available. UserNotAuthorizedException the calling user is not authorized to issue the call.
-
createPersonRole
public GUIDResponse createPersonRole(String serverName, String userId, PersonRoleRequestBody requestBody) Create a definition of a person role.- Parameters:
serverName
- called serveruserId
- calling userrequestBody
- properties for a person role- Returns:
- unique identifier of person role InvalidParameterException qualifiedName or userId is null; qualifiedName is not unique PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
updatePersonRole
public VoidResponse updatePersonRole(String serverName, String userId, String personRoleGUID, boolean isMergeUpdate, PersonRoleRequestBody requestBody) Update the definition of a person role.- Parameters:
serverName
- called serveruserId
- calling userpersonRoleGUID
- unique identifier of person roleisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?requestBody
- properties to change- Returns:
- void or InvalidParameterException guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
deletePersonRole
public VoidResponse deletePersonRole(String serverName, String userId, String personRoleGUID, ExternalSourceRequestBody requestBody) Remove the definition of a person role.- Parameters:
serverName
- called serveruserId
- calling userpersonRoleGUID
- unique identifier of person rolerequestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException guid or userId is null; guid is not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkPersonRoleToProfile
public GUIDResponse linkPersonRoleToProfile(String serverName, String userId, String personRoleGUID, String personProfileGUID, AppointmentRequestBody requestBody) Link a person role to a person profile to show that that person is performing the role.- Parameters:
serverName
- called serveruserId
- calling userpersonRoleGUID
- unique identifier of the person rolepersonProfileGUID
- unique identifier of the person profilerequestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getAppointees
public AppointeesResponse getAppointees(String serverName, String userId, String personRoleGUID, int startFrom, int pageSize, EffectiveTimeRequestBody requestBody) Return the list of people appointed to a particular role.- Parameters:
serverName
- called serveruserId
- calling userpersonRoleGUID
- unique identifier of the person rolestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to returnrequestBody
- time for appointments, null for full appointment history- Returns:
- list of appointees or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
updateAppointment
public VoidResponse updateAppointment(String serverName, String userId, String appointmentGUID, boolean isMergeUpdate, AppointmentRequestBody requestBody) Update the properties for the appointment of a person to a role.- Parameters:
serverName
- called serveruserId
- calling userappointmentGUID
- unique identifier of the appointment relationshipisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?requestBody
- properties to change- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
unlinkPersonRoleFromProfile
public VoidResponse unlinkPersonRoleFromProfile(String serverName, String userId, String appointmentGUID, ExternalSourceRequestBody requestBody) Remove the link between a person role and a person profile.- Parameters:
serverName
- called serveruserId
- calling userappointmentGUID
- unique identifier of the appointment relationshiprequestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException one of the guids is null or not known PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
linkTeamPlayer
public VoidResponse linkTeamPlayer(String serverName, String userId, String teamRoleGUID, String teamProfileGUID, TeamPlayerRequestBody requestBody) Link a team leader person role or team member person role to a team profile.- Parameters:
serverName
- called serveruserId
- calling userteamRoleGUID
- unique identifier of the person roleteamProfileGUID
- unique identifier of the team profilerequestBody
- properties for the relationship- Returns:
- void or InvalidParameterException one of the guids is null or not known; the person role is not a team member or team leader PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
unlinkTeamPlayer
public VoidResponse unlinkTeamPlayer(String serverName, String userId, String teamRoleGUID, String teamProfileGUID, TeamPlayerRequestBody requestBody) Remove the link between a person role and a team profile.- Parameters:
serverName
- called serveruserId
- calling userteamRoleGUID
- unique identifier of the person roleteamProfileGUID
- unique identifier of the team profilerequestBody
- identifiers of the software server capability entity that represented the external source - null for local- Returns:
- void or InvalidParameterException one of the guids is null or not known; the person role is not a team member or team leader PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getPersonRoleByGUID
public PersonRoleResponse getPersonRoleByGUID(String serverName, String userId, String personRoleGUID) Return information about a specific person role.- Parameters:
serverName
- called serveruserId
- calling userpersonRoleGUID
- unique identifier for the person role- Returns:
- properties of the person role InvalidParameterException personRoleGUID or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getPersonRoleByName
public PersonRolesResponse getPersonRoleByName(String serverName, String userId, int startFrom, int pageSize, NameRequestBody requestBody) Return information about a named person role.- Parameters:
serverName
- called serveruserId
- calling userstartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- unique name for the actor profile- Returns:
- list of matching person roles (hopefully only one) InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getLeadershipRolesForTeam
public PersonRolesResponse getLeadershipRolesForTeam(String serverName, String userId, String teamGUID, int startFrom, int pageSize) Return information about a person role connected to the named team via the TeamLeadership relationship.- Parameters:
serverName
- called serveruserId
- calling userteamGUID
- unique identifier for the Team actor profilestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching person roles InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
getMembershipRolesForTeam
public PersonRolesResponse getMembershipRolesForTeam(String serverName, String userId, String teamGUID, int startFrom, int pageSize) Return information about a person role connected to the named team via the TeamMembership relationship.- Parameters:
serverName
- called serveruserId
- calling userteamGUID
- unique identifier for the Team actor profilestartFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.- Returns:
- list of matching person roles InvalidParameterException name or userId is null PropertyServerException problem accessing property server UserNotAuthorizedException security access problem
-
findPersonRoles
public PersonRolesResponse findPersonRoles(String serverName, String userId, int startFrom, int pageSize, SearchStringRequestBody requestBody) Retrieve the list of matching roles for the search string.- Parameters:
serverName
- called serveruserId
- the name of the calling user.startFrom
- index of the list to start from (0 for start)pageSize
- maximum number of elements to return.requestBody
- RegEx string to search for- Returns:
- list of matching actor profiles InvalidParameterException guid invalid or the external references are not correctly specified, or are null. PropertyServerException the server is not available. UserNotAuthorizedException the calling user is not authorized to issue the call.
-