Class ActorProfileClient
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ActorProfileClient
Provides services for connectors to work with ActorProfile objects: Person, Team and ITProfile
along with contact details associated with this profile.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
asOfTimeDefault, auditLog, connectorGUID, connectorUserId, externalSourceGUID, externalSourceIsHome, externalSourceName, forDuplicateProcessing, forLineage, governanceZonesFilterDefault, limitResultsByStatusDefault, localServerName, localServiceName, maxPageSize, parentContext, propertyHelper, sequencingOrderDefault, sequencingPropertyDefault, useCurrentEffectiveTime
-
Constructor Summary
ConstructorsConstructorDescriptionActorProfileClient
(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenMetadataClient openMetadataClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client. -
Method Summary
Modifier and TypeMethodDescriptioncreateActorProfile
(NewElementOptions newElementOptions, Map<String, ClassificationProperties> initialClassifications, ActorProfileProperties properties, RelationshipProperties parentRelationshipProperties) Create a new actor profile.createActorProfileFromTemplate
(TemplateOptions templateOptions, String templateGUID, boolean allowRetrieve, ElementProperties replacementProperties, Map<String, String> placeholderProperties, RelationshipProperties parentRelationshipProperties) Create a new metadata element to represent an actor profile using an existing element as a template.void
deleteActorProfile
(String actorProfileGUID, DeleteOptions deleteOptions) Delete a actor profile.void
detachAssetFromProfile
(String assetGUID, String itProfileGUID, DeleteOptions deleteOptions) Detach an asset from an IT profile.void
detachLocationFromProfile
(String actorProfileGUID, String locationGUID, DeleteOptions deleteOptions) Detach an actor profile from a location.void
detachPeerPerson
(String personOneGUID, String personTwoGUID, DeleteOptions deleteOptions) Detach a person profile from one of its peers.void
detachTeamFromLeadershipRole
(String teamGUID, String personRoleGUID, DeleteOptions deleteOptions) Detach a team profile from its leadership role.void
detachTeamFromMembershipRole
(String teamGUID, String personRoleGUID, DeleteOptions deleteOptions) Detach a team profile from its membership role.void
detachTeamStructure
(String superTeamGUID, String subteamGUID, DeleteOptions deleteOptions) Detach a super team from a subteam.findActorProfiles
(String searchString, SearchOptions searchOptions) Retrieve the list of actor profiles metadata elements that contain the search string and show which solution components (if any) are attached to it.getActorProfileByGUID
(String actorProfileGUID, GetOptions getOptions) Return the properties of a specific actor profile.getActorProfileByUserId
(String requiredUserId, GetOptions getOptions) Return the properties of a specific actor profile retrieved using an associated userId.getActorProfilesByName
(String name, QueryOptions queryOptions) Returns the list of actor profiles with a particular name.void
linkAssetToProfile
(String assetGUID, String itProfileGUID, MetadataSourceOptions metadataSourceOptions, ITInfrastructureProfileProperties relationshipProperties) Attach an asset to an IT profile.void
linkLocationToProfile
(String actorProfileGUID, String locationGUID, MetadataSourceOptions metadataSourceOptions, ProfileLocationProperties relationshipProperties) Attach a profile to a location.void
linkPeerPerson
(String personOneGUID, String personTwoGUID, MetadataSourceOptions metadataSourceOptions, PeerProperties relationshipProperties) Attach a person profile to one of its peers.void
linkTeamStructure
(String superTeamGUID, String subteamGUID, MetadataSourceOptions metadataSourceOptions, TeamStructureProperties relationshipProperties) Attach a super team to a subteam.void
linkTeamToLeadershipRole
(String teamGUID, String personRoleGUID, MetadataSourceOptions metadataSourceOptions, TeamLeadershipProperties relationshipProperties) Attach a team to its leadership role.void
linkTeamToMembershipRole
(String teamGUID, String personRoleGUID, MetadataSourceOptions metadataSourceOptions, TeamMembershipProperties relationshipProperties) Attach a team to its membership role.void
updateActorProfile
(String actorProfileGUID, UpdateOptions updateOptions, ActorProfileProperties properties) Update the properties of an actor profile.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
getAdditionalProperties, getDeleteOptions, getDisplayName, getEffectiveTime, getGetOptions, getMaxPagingSize, getMetadataSourceOptions, getNewElementProperties, getQualifiedName, getQueryOptions, getQueryOptions, getQueryOptions, getQueryOptions, getSearchOptions, getSearchOptions, getUpdateOptions, isForDuplicateProcessing, isForLineage, isUseCurrentEffectiveTime, publishElement, setAsOfTimeDefault, setEffectiveTimeDefault, setExternalSourceIsHome, setForDuplicateProcessing, setForLineage, setGovernanceZonesFilterDefault, setLimitResultsByStatusDefault, setSequencingOrderDefault, setUseCurrentEffectiveTime, withdrawElement
-
Constructor Details
-
ActorProfileClient
public ActorProfileClient(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenMetadataClient openMetadataClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client.- Parameters:
parentContext
- connector's contextlocalServerName
- local server where this client is running - used for error handlinglocalServiceName
- local service that his connector is hosted by - used for error handlingconnectorUserId
- the userId to use with all requests for open metadataconnectorGUID
- the unique identifier that represents this connector in open metadataexternalSourceGUID
- unique identifier of the software server capability for the source of metadataexternalSourceName
- unique name of the software server capability for the source of metadataopenMetadataClient
- client to access the open metadata storeauditLog
- logging destinationmaxPageSize
- max number of elements that can be returned on a query
-
-
Method Details
-
createActorProfile
public String createActorProfile(NewElementOptions newElementOptions, Map<String, ClassificationProperties> initialClassifications, ActorProfileProperties properties, RelationshipProperties parentRelationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionCreate a new actor profile.- Parameters:
newElementOptions
- details of the element to createinitialClassifications
- map of classification names to classification properties to include in the entity creation requestproperties
- properties for the new element.parentRelationshipProperties
- properties to include in parent relationship- Returns:
- unique identifier of the newly created element
- Throws:
InvalidParameterException
- one of the parameters 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.
-
createActorProfileFromTemplate
public String createActorProfileFromTemplate(TemplateOptions templateOptions, String templateGUID, boolean allowRetrieve, ElementProperties replacementProperties, Map<String, String> placeholderProperties, RelationshipProperties parentRelationshipProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a new metadata element to represent an actor profile using an existing element as a template. The template defines additional classifications and relationships that should be added to the new actor profile.- Parameters:
templateOptions
- details of the element to createtemplateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)allowRetrieve
- whether the code allowed to retrieve an existing element, or must it create a new one - the match is done on the qualified name (default is false).replacementProperties
- properties of the new metadata element. These override the template valuesplaceholderProperties
- property name-to-property value map to replace any placeholder values in the template element - and their anchored elements, which are also copied as part of this operation.parentRelationshipProperties
- properties to include in parent relationship- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-
updateActorProfile
public void updateActorProfile(String actorProfileGUID, UpdateOptions updateOptions, ActorProfileProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties of an actor profile.- Parameters:
actorProfileGUID
- unique identifier of the actor profile (returned from create)updateOptions
- provides a structure for the additional options when updating an element.properties
- properties for the element.- Throws:
InvalidParameterException
- one of the parameters 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.
-
linkLocationToProfile
public void linkLocationToProfile(String actorProfileGUID, String locationGUID, MetadataSourceOptions metadataSourceOptions, ProfileLocationProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a profile to a location.- Parameters:
actorProfileGUID
- unique identifier of the actor profilelocationGUID
- unique identifier of the locationmetadataSourceOptions
- options to control access to open metadatarelationshipProperties
- description of the relationship.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
detachLocationFromProfile
public void detachLocationFromProfile(String actorProfileGUID, String locationGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach an actor profile from a location.- Parameters:
actorProfileGUID
- unique identifier of the actor profilelocationGUID
- unique identifier of the locationdeleteOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
linkPeerPerson
public void linkPeerPerson(String personOneGUID, String personTwoGUID, MetadataSourceOptions metadataSourceOptions, PeerProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a person profile to one of its peers.- Parameters:
personOneGUID
- unique identifier of the first person profilepersonTwoGUID
- unique identifier of the second person profilemetadataSourceOptions
- options to control access to open metadatarelationshipProperties
- description of the relationship.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
detachPeerPerson
public void detachPeerPerson(String personOneGUID, String personTwoGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach a person profile from one of its peers.- Parameters:
personOneGUID
- unique identifier of the first person profilepersonTwoGUID
- unique identifier of the second person profiledeleteOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
linkTeamStructure
public void linkTeamStructure(String superTeamGUID, String subteamGUID, MetadataSourceOptions metadataSourceOptions, TeamStructureProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a super team to a subteam.- Parameters:
superTeamGUID
- unique identifier of the super teamsubteamGUID
- unique identifier of the subteammetadataSourceOptions
- options to control access to open metadatarelationshipProperties
- description of the relationship.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
detachTeamStructure
public void detachTeamStructure(String superTeamGUID, String subteamGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach a super team from a subteam.- Parameters:
superTeamGUID
- unique identifier of the super teamsubteamGUID
- unique identifier of the subteamdeleteOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
linkAssetToProfile
public void linkAssetToProfile(String assetGUID, String itProfileGUID, MetadataSourceOptions metadataSourceOptions, ITInfrastructureProfileProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach an asset to an IT profile.- Parameters:
assetGUID
- unique identifier of the assetitProfileGUID
- unique identifier of the IT profilemetadataSourceOptions
- options to control access to open metadatarelationshipProperties
- description of the relationship.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
detachAssetFromProfile
public void detachAssetFromProfile(String assetGUID, String itProfileGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach an asset from an IT profile.- Parameters:
assetGUID
- unique identifier of the assetitProfileGUID
- unique identifier of the IT profiledeleteOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
linkTeamToMembershipRole
public void linkTeamToMembershipRole(String teamGUID, String personRoleGUID, MetadataSourceOptions metadataSourceOptions, TeamMembershipProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a team to its membership role.- Parameters:
teamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person rolemetadataSourceOptions
- options to control access to open metadatarelationshipProperties
- description of the relationship.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
detachTeamFromMembershipRole
public void detachTeamFromMembershipRole(String teamGUID, String personRoleGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach a team profile from its membership role.- Parameters:
teamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person roledeleteOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
linkTeamToLeadershipRole
public void linkTeamToLeadershipRole(String teamGUID, String personRoleGUID, MetadataSourceOptions metadataSourceOptions, TeamLeadershipProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a team to its leadership role.- Parameters:
teamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person rolemetadataSourceOptions
- options to control access to open metadatarelationshipProperties
- description of the relationship.- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
detachTeamFromLeadershipRole
public void detachTeamFromLeadershipRole(String teamGUID, String personRoleGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach a team profile from its leadership role.- Parameters:
teamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person roledeleteOptions
- options to control access to open metadata- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
deleteActorProfile
public void deleteActorProfile(String actorProfileGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete a actor profile.- Parameters:
actorProfileGUID
- unique identifier of the element- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getActorProfilesByName
public List<OpenMetadataRootElement> getActorProfilesByName(String name, QueryOptions queryOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns the list of actor profiles with a particular name.- Parameters:
name
- name of the element to return - match is full text match in qualifiedName or namequeryOptions
- multiple options to control the query- Returns:
- a list of elements
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getActorProfileByGUID
public OpenMetadataRootElement getActorProfileByGUID(String actorProfileGUID, GetOptions getOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the properties of a specific actor profile.- Parameters:
actorProfileGUID
- unique identifier of the required elementgetOptions
- multiple options to control the query- Returns:
- retrieved properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
getActorProfileByUserId
public OpenMetadataRootElement getActorProfileByUserId(String requiredUserId, GetOptions getOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the properties of a specific actor profile retrieved using an associated userId.- Parameters:
requiredUserId
- identifier of usergetOptions
- multiple options to control the query- Returns:
- retrieved properties
- Throws:
InvalidParameterException
- one of the parameters is null or invalid.PropertyServerException
- there is a problem retrieving information from the property server(s).UserNotAuthorizedException
- the requesting user is not authorized to issue this request.
-
findActorProfiles
public List<OpenMetadataRootElement> findActorProfiles(String searchString, SearchOptions searchOptions) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of actor profiles metadata elements that contain the search string and show which solution components (if any) are attached to it. The returned actor profiles include a list of the components that are associated with it. The search string is treated as a regular expression.- Parameters:
searchString
- string to find in the propertiessearchOptions
- multiple options to control the query- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException
- one of the parameters is invalidUserNotAuthorizedException
- the user is not authorized to issue this requestPropertyServerException
- there is a problem reported in the open metadata server(s)
-