Class ContactDetailsHandler
java.lang.Object
org.odpi.openmetadata.frameworkservices.omf.client.handlers.ContactDetailsHandler
- Direct Known Subclasses:
ContactMethodManagement
,ContactMethodManagement
ContactDetailsHandler provides methods to maintain an actor's contact details.
-
Constructor Summary
ConstructorsConstructorDescriptionContactDetailsHandler
(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) Create a new client that passes userId and password in each HTTP request.ContactDetailsHandler
(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptioncreateContactMethod
(String userId, String externalSourceGUID, String externalSourceName, String actorProfileGUID, ContactMethodProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Create a new contact method.createContactMethodFromTemplate
(String userId, String externalSourceGUID, String externalSourceName, String actorProfileGUID, Date effectiveFrom, Date effectiveTo, String templateGUID, ElementProperties replacementProperties, Map<String, String> placeholderProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Create a new metadata element to represent a contact method using an existing element as a template.void
deleteContactMethod
(String userId, String externalSourceGUID, String externalSourceName, String contactMethodGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Delete a contact method.void
updateContactMethod
(String userId, String externalSourceGUID, String externalSourceName, String contactMethodGUID, boolean replaceAllProperties, ContactMethodProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) Update the properties of a contact method.
-
Constructor Details
-
ContactDetailsHandler
public ContactDetailsHandler(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
localServerName
- name of this server (view server)serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destinationaccessServiceURLMarker
- which access service to callserviceName
- local service namemaxPageSize
- maximum number of results supported by this server- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
ContactDetailsHandler
public ContactDetailsHandler(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) 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
- maximum number of results supported by this serverauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
createContactMethod
public String createContactMethod(String userId, String externalSourceGUID, String externalSourceName, String actorProfileGUID, ContactMethodProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a new contact method.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementactorProfileGUID
- unique identifier of the actor profile that should be the anchor for the new element.properties
- properties for the new element.forLineage
- the retrieved elements are for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.- 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.
-
createContactMethodFromTemplate
public String createContactMethodFromTemplate(String userId, String externalSourceGUID, String externalSourceName, String actorProfileGUID, Date effectiveFrom, Date effectiveTo, String templateGUID, ElementProperties replacementProperties, Map<String, String> placeholderProperties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionCreate a new metadata element to represent a contact method using an existing element as a template. The template defines additional classifications and relationships that should be added to the new contact method.- Parameters:
userId
- calling userexternalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementactorProfileGUID
- unique identifier of the actor profile that should be the anchor for the new element.effectiveFrom
- the date when this element is active - null for active on creationeffectiveTo
- the date when this element becomes inactive - null for active until deletedtemplateGUID
- the unique identifier of the existing asset to copy (this will copy all the attachments such as nested content, schema connection etc)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.forLineage
- the retrieved elements are for lineage processing so include archived elementsforDuplicateProcessing
- the retrieved element is for duplicate processing so do not combine results from known duplicates.effectiveTime
- only return an element if it is effective at this time. Null means anytime. Use "new Date()" for now.- 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)
-
updateContactMethod
public void updateContactMethod(String userId, String externalSourceGUID, String externalSourceName, String contactMethodGUID, boolean replaceAllProperties, ContactMethodProperties properties, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties of a contact method.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementcontactMethodGUID
- unique identifier of the contact method (returned from create)replaceAllProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.properties
- properties for the element.forLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- 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.
-
deleteContactMethod
public void deleteContactMethod(String userId, String externalSourceGUID, String externalSourceName, String contactMethodGUID, boolean forLineage, boolean forDuplicateProcessing, Date effectiveTime) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete a contact method.- Parameters:
userId
- userId of user making request.externalSourceGUID
- unique identifier of the software capability that owns this elementexternalSourceName
- unique name of the software capability that owns this elementcontactMethodGUID
- unique identifier of the elementforLineage
- the query is to support lineage retrievalforDuplicateProcessing
- the query is for duplicate processing and so must not deduplicateeffectiveTime
- the time that the retrieved elements must be effective for (null for any time, new Date() for now)- 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.
-