Class SubjectAreaManager
java.lang.Object
org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
org.odpi.openmetadata.accessservices.governanceprogram.client.SubjectAreaManager
- All Implemented Interfaces:
RelatedElementsManagementInterface
,SubjectAreasInterface
public class SubjectAreaManager
extends GovernanceProgramBaseClient
implements SubjectAreasInterface
The SubjectAreasInterface is used by the governance team to define the subject area for topic related governance definitions.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
nullRequestBody
-
Constructor Summary
ConstructorDescriptionSubjectAreaManager
(String serverName, String serverPlatformURLRoot) Create a new client with no authentication embedded in the HTTP request.SubjectAreaManager
(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) Create a new client with no authentication embedded in the HTTP request.SubjectAreaManager
(String serverName, String serverPlatformURLRoot, String userId, String password) Create a new client that passes userId and password in each HTTP request.SubjectAreaManager
(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) Create a new client that passes userId and password in each HTTP request.SubjectAreaManager
(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) Create a new client that uses the supplied rest client. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSubjectAreaMemberClassification
(String userId, String elementGUID, SubjectAreaClassificationProperties properties) Add a subject area classification to a referenceable element.createSubjectArea
(String userId, SubjectAreaProperties properties) Create a definition of a subject area.void
deleteSubjectArea
(String userId, String subjectAreaGUID) Remove the definition of a subject area.void
deleteSubjectAreaMemberClassification
(String userId, String elementGUID) Remove a subject area classification from a referenceable.getMembersOfSubjectArea
(String userId, String subjectAreaName, int startFrom, int pageSize) Return information about the contents of a subject area such as the glossaries, reference data sets and quality definitions.getSubjectAreaByGUID
(String userId, String subjectAreaGUID) Return information about a specific subject area.getSubjectAreaByName
(String userId, String qualifiedName) Return information about a specific subject area.getSubjectAreaDefinitionByGUID
(String userId, String subjectAreaGUID) Return information about a specific subject area and its linked governance definitions.getSubjectAreasForDomain
(String userId, int domainIdentifier, int startFrom, int pageSize) Return information about the defined subject areas.void
linkSubjectAreasInHierarchy
(String userId, String parentSubjectAreaGUID, String childSubjectAreaGUID) Link two related subject areas together as part of a hierarchy.void
unlinkSubjectAreasInHierarchy
(String userId, String parentSubjectAreaGUID, String childSubjectAreaGUID) Remove the link between two subject areas in the subject area hierarchy.void
updateSubjectArea
(String userId, String subjectAreaGUID, boolean isMergeUpdate, SubjectAreaProperties properties) Update the definition of a subject area.Methods inherited from class org.odpi.openmetadata.accessservices.governanceprogram.client.GovernanceProgramBaseClient
clearAssignmentScope, clearGovernanceDefinitionScope, clearGovernanceResponsibilityAssignment, clearGovernedBy, clearMoreInformation, clearResource, clearStakeholder, getAssignedActors, getAssignedScopes, getDescriptiveElements, getGovernanceDefinitionScopes, getGovernanceDefinitionsForElement, getGovernedElements, getMoreInformation, getResourceList, getResponsibleRoles, getRoleResponsibilities, getScopedGovernanceDefinitions, getStakeholderCommissionedElements, getStakeholders, getSupportedByResource, removeReferenceable, setupAssignmentScope, setupGovernanceDefinitionScope, setupGovernanceResponsibilityAssignment, setupGovernedBy, setupMoreInformation, setupResource, setupStakeholder, updateGovernanceDefinitionStatus, updateRelationship
-
Constructor Details
-
SubjectAreaManager
public SubjectAreaManager(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
SubjectAreaManager
public SubjectAreaManager(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requests- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
SubjectAreaManager
public SubjectAreaManager(String serverName, String serverPlatformURLRoot, int maxPageSize, AuditLog auditLog) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesmaxPageSize
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
SubjectAreaManager
public SubjectAreaManager(String serverName, String serverPlatformURLRoot, String userId, String password, int maxPageSize, AuditLog auditLog) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsmaxPageSize
- pre-initialized parameter limitauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
SubjectAreaManager
public SubjectAreaManager(String serverName, String serverPlatformURLRoot, GovernanceProgramRESTClient restClient, int maxPageSize) throws InvalidParameterException Create a new client that uses the supplied rest client. This is typically used when called from another OMAG Server.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesrestClient
- internal client for rest callsmaxPageSize
- pre-initialized parameter limit- Throws:
InvalidParameterException
- bad input parameters
-
-
Method Details
-
createSubjectArea
public String createSubjectArea(String userId, SubjectAreaProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Create a definition of a subject area.- Specified by:
createSubjectArea
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling userproperties
- properties for a subject area- Returns:
- unique identifier of subject area
- Throws:
InvalidParameterException
- qualifiedName or userId is null; qualifiedName is not uniquePropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
updateSubjectArea
public void updateSubjectArea(String userId, String subjectAreaGUID, boolean isMergeUpdate, SubjectAreaProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Update the definition of a subject area.- Specified by:
updateSubjectArea
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling usersubjectAreaGUID
- unique identifier of subject areaisMergeUpdate
- are unspecified properties unchanged (true) or replaced with null?properties
- properties to change- Throws:
InvalidParameterException
- guid, qualifiedName or userId is null; qualifiedName is not unique; guid is not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
deleteSubjectArea
public void deleteSubjectArea(String userId, String subjectAreaGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the definition of a subject area.- Specified by:
deleteSubjectArea
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling usersubjectAreaGUID
- unique identifier of subject area- Throws:
InvalidParameterException
- guid or userId is null; guid is not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
linkSubjectAreasInHierarchy
public void linkSubjectAreasInHierarchy(String userId, String parentSubjectAreaGUID, String childSubjectAreaGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Link two related subject areas together as part of a hierarchy. A subject area can only have one parent but many child subject areas.- Specified by:
linkSubjectAreasInHierarchy
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling userparentSubjectAreaGUID
- unique identifier of the parent subject areachildSubjectAreaGUID
- unique identifier of the child subject area- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
unlinkSubjectAreasInHierarchy
public void unlinkSubjectAreasInHierarchy(String userId, String parentSubjectAreaGUID, String childSubjectAreaGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove the link between two subject areas in the subject area hierarchy.- Specified by:
unlinkSubjectAreasInHierarchy
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling userparentSubjectAreaGUID
- unique identifier of the parent subject areachildSubjectAreaGUID
- unique identifier of the child subject area- Throws:
InvalidParameterException
- one of the guids is null or not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getSubjectAreaByGUID
public SubjectAreaElement getSubjectAreaByGUID(String userId, String subjectAreaGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific subject area.- Specified by:
getSubjectAreaByGUID
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling usersubjectAreaGUID
- unique identifier for the subject area- Returns:
- properties of the subject area
- Throws:
InvalidParameterException
- subjectAreaGUID or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getSubjectAreaByName
public SubjectAreaElement getSubjectAreaByName(String userId, String qualifiedName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific subject area.- Specified by:
getSubjectAreaByName
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling userqualifiedName
- unique name for the subject area- Returns:
- properties of the subject area
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getSubjectAreasForDomain
public List<SubjectAreaElement> getSubjectAreasForDomain(String userId, int domainIdentifier, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the defined subject areas.- Specified by:
getSubjectAreasForDomain
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling userdomainIdentifier
- identifier for the desired governance domain - zero for allstartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the subject area
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getSubjectAreaDefinitionByGUID
public SubjectAreaDefinition getSubjectAreaDefinitionByGUID(String userId, String subjectAreaGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about a specific subject area and its linked governance definitions.- Specified by:
getSubjectAreaDefinitionByGUID
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling usersubjectAreaGUID
- unique identifier for the subject area- Returns:
- properties of the subject area
- Throws:
InvalidParameterException
- subjectAreaGUID or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
addSubjectAreaMemberClassification
public void addSubjectAreaMemberClassification(String userId, String elementGUID, SubjectAreaClassificationProperties properties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Add a subject area classification to a referenceable element.- Specified by:
addSubjectAreaMemberClassification
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier for the elementproperties
- identifier for a subject area- Throws:
InvalidParameterException
- qualifiedName or userId is null; qualifiedName is not uniquePropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
deleteSubjectAreaMemberClassification
public void deleteSubjectAreaMemberClassification(String userId, String elementGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Remove a subject area classification from a referenceable.- Specified by:
deleteSubjectAreaMemberClassification
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling userelementGUID
- unique identifier for the element- Throws:
InvalidParameterException
- guid or userId is null; guid is not knownPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-
getMembersOfSubjectArea
public List<ElementStub> getMembersOfSubjectArea(String userId, String subjectAreaName, int startFrom, int pageSize) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Return information about the contents of a subject area such as the glossaries, reference data sets and quality definitions.- Specified by:
getMembersOfSubjectArea
in interfaceSubjectAreasInterface
- Parameters:
userId
- calling usersubjectAreaName
- unique identifier for the subject areastartFrom
- paging start pointpageSize
- maximum results that can be returned- Returns:
- properties of the subject area members
- Throws:
InvalidParameterException
- qualifiedName or userId is nullPropertyServerException
- problem accessing property serverUserNotAuthorizedException
- security access problem
-