Class OMFRESTClient
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
org.odpi.openmetadata.frameworkservices.omf.client.rest.OMFRESTClient
OMFRESTClient is responsible for issuing calls to the OMAS REST APIs.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
auditLog, exceptionHandler, serverName, serverPlatformURLRoot -
Constructor Summary
ConstructorsConstructorDescriptionOMFRESTClient(String serverName, String serverPlatformURLRoot, String secretsStoreProvider, String secretsStoreLocation, String secretsStoreCollection, AuditLog auditLog) Constructor for no authentication with audit log.OMFRESTClient(String serverName, String serverPlatformURLRoot, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) Constructor for no authentication with audit log. -
Method Summary
Modifier and TypeMethodDescriptioncallAnchorSearchMatchesListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a AnchorSearchMatchesListResponse object.callAnchorSearchMatchesPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a AnchorSearchMatchesResponse object.callAttachedClassificationsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a AttachedClassificationsResponse object.callAttributeTypeDefGetRESTCall(String methodName, String operationSpecificURL, Object... params) Issue a GET REST call that returns a AttributeTypeDefResponse object.callAttributeTypeDefListGetRESTCall(String methodName, String operationSpecificURL, Object... params) Issue a GET REST call that returns a AttributeTypeDefListResponse object.callBooleanGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a BooleanResponse object.callBooleanPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a GET REST call that returns a BooleanResponse object.callCorrelationHeadersPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a MetadataCorrelationHeadersResponse object.callOpenMetadataElementGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a OpenMetadataElementResponse object.callOpenMetadataElementPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a OpenMetadataElementResponse object.callOpenMetadataElementsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a OpenMetadataElementsResponse object.callOpenMetadataGraphPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a OpenMetadataGraphResponse object.callOpenMetadataRelationshipListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a OpenMetadataRelationshipListResponse object.callOpenMetadataRelationshipPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a OpenMetadataRelationshipResponse object.callRelatedMetadataElementGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a OpenMetadataRelationshipResponse object.callRelatedMetadataElementListGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a RelatedMetadataElementListResponse object.callRelatedMetadataElementListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) Issue a POST REST call that returns a RelatedMetadataElementListResponse object.callRelatedMetadataElementsListGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a OpenMetadataRelationshipListResponse object.callTranslationDetailGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a TranslationDetailResponse object.callTranslationListGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a TranslationListResponse object.callTypeDefGalleryGetRESTCall(String methodName, String operationSpecificURL, Object... params) Issue a GET REST call that returns a TypeDefGalleryResponse object.callTypeDefGetRESTCall(String methodName, String operationSpecificURL, Object... params) Issue a GET REST call that returns a TypeDefResponse object.callTypeDefListGetRESTCall(String methodName, String operationSpecificURL, Object... params) Issue a GET REST call that returns a TypeDefListResponse object.callTypeDefListPostRESTCall(String methodName, String operationSpecificURL, Object requestBody, Object... params) Issue a POST REST call that returns a TypeDefListResponse object.callTypeDefPostRESTCall(String methodName, String operationSpecificURL, Object requestBody, Object... params) Issue a POST REST call that returns a TypeDefResponse object.Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callElementHeadersPostRESTCall, callGUIDListGetRESTCall, callGUIDPostRESTCall, callOCFConnectorReportGetRESTCall, callVoidGetRESTCall, callVoidPostRESTCallMethods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
callDeleteRESTCall, callDeleteRESTCall, callGetRESTCall, callGetRESTCall, callGetRESTCallNoParams, callPostRESTCall, callPostRESTCall, callPostRESTCallNoParams, callPutRESTCall, callPutRESTCall
-
Constructor Details
-
OMFRESTClient
public OMFRESTClient(String serverName, String serverPlatformURLRoot, String secretsStoreProvider, String secretsStoreLocation, String secretsStoreCollection, AuditLog auditLog) throws InvalidParameterException Constructor for no authentication with audit log.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.secretsStoreProvider- secrets store connector for bearer tokensecretsStoreLocation- secrets store location for bearer tokensecretsStoreCollection- secrets store collection for bearer tokenauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
OMFRESTClient
public OMFRESTClient(String serverName, String serverPlatformURLRoot, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) throws InvalidParameterExceptionConstructor for no authentication with audit log.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.secretsStoreConnectorMap- connectors to secrets storesauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
callTypeDefGalleryGetRESTCall
public TypeDefGalleryResponse callTypeDefGalleryGetRESTCall(String methodName, String operationSpecificURL, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a TypeDefGalleryResponse object.- Parameters:
methodName- name of the method being calledoperationSpecificURL- template of the URL for the REST API call, with place-holders for the parametersparams- a list of parameters that are slotted into the url template- Returns:
- TypeDefGalleryResponseObject
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callAttributeTypeDefListGetRESTCall
public AttributeTypeDefListResponse callAttributeTypeDefListGetRESTCall(String methodName, String operationSpecificURL, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a AttributeTypeDefListResponse object.- Parameters:
methodName- name of the method being calledoperationSpecificURL- template of the URL for the REST API call, with place-holders for the parametersparams- a list of parameters that are slotted into the url template- Returns:
- AttributeTypeDefListResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callAttributeTypeDefGetRESTCall
public AttributeTypeDefResponse callAttributeTypeDefGetRESTCall(String methodName, String operationSpecificURL, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a AttributeTypeDefResponse object.- Parameters:
methodName- name of the method being calledoperationSpecificURL- template of the URL for the REST API call, with place-holders for the parametersparams- a list of parameters that are slotted into the url template- Returns:
- AttributeTypeDefResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callTypeDefListGetRESTCall
public TypeDefListResponse callTypeDefListGetRESTCall(String methodName, String operationSpecificURL, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a TypeDefListResponse object.- Parameters:
methodName- name of the method being calledoperationSpecificURL- template of the URL for the REST API call, with place-holders for the parametersparams- a list of parameters that are slotted into the url template- Returns:
- TypeDefListResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callTypeDefListPostRESTCall
public TypeDefListResponse callTypeDefListPostRESTCall(String methodName, String operationSpecificURL, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a TypeDefListResponse object.- Parameters:
methodName- name of the method being calledoperationSpecificURL- template of the URL for the REST API call, with place-holders for the parametersrequestBody- request bodyparams- a list of parameters that are slotted into the url template- Returns:
- TypeDefListResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callTypeDefGetRESTCall
public TypeDefResponse callTypeDefGetRESTCall(String methodName, String operationSpecificURL, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a TypeDefResponse object.- Parameters:
methodName- name of the method being calledoperationSpecificURL- template of the URL for the REST API call, with place-holders for the parametersparams- a list of parameters that are slotted into the url template- Returns:
- TypeDefResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callTypeDefPostRESTCall
public TypeDefResponse callTypeDefPostRESTCall(String methodName, String operationSpecificURL, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a TypeDefResponse object.- Parameters:
methodName- name of the method being calledoperationSpecificURL- template of the URL for the REST API call, with place-holders for the parametersrequestBody- request body objectparams- a list of parameters that are slotted into the url template- Returns:
- TypeDefResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callOpenMetadataElementsPostRESTCall
public OpenMetadataElementsResponse callOpenMetadataElementsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a OpenMetadataElementsResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callAttachedClassificationsPostRESTCall
public AttachedClassificationsResponse callAttachedClassificationsPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a AttachedClassificationsResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callOpenMetadataElementPostRESTCall
public OpenMetadataElementResponse callOpenMetadataElementPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a OpenMetadataElementResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callAnchorSearchMatchesListPostRESTCall
public AnchorSearchMatchesListResponse callAnchorSearchMatchesListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a AnchorSearchMatchesListResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callAnchorSearchMatchesPostRESTCall
public AnchorSearchMatchesResponse callAnchorSearchMatchesPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a AnchorSearchMatchesResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callOpenMetadataGraphPostRESTCall
public OpenMetadataGraphResponse callOpenMetadataGraphPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a OpenMetadataGraphResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callOpenMetadataElementGetRESTCall
public OpenMetadataElementResponse callOpenMetadataElementGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a OpenMetadataElementResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callOpenMetadataRelationshipListPostRESTCall
public OpenMetadataRelationshipListResponse callOpenMetadataRelationshipListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a OpenMetadataRelationshipListResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callOpenMetadataRelationshipPostRESTCall
public OpenMetadataRelationshipResponse callOpenMetadataRelationshipPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a OpenMetadataRelationshipResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callRelatedMetadataElementsListGetRESTCall
public OpenMetadataRelationshipListResponse callRelatedMetadataElementsListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a OpenMetadataRelationshipListResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callRelatedMetadataElementGetRESTCall
public OpenMetadataRelationshipResponse callRelatedMetadataElementGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a OpenMetadataRelationshipResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callRelatedMetadataElementListPostRESTCall
public RelatedMetadataElementListResponse callRelatedMetadataElementListPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a RelatedMetadataElementListResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callRelatedMetadataElementListGetRESTCall
public RelatedMetadataElementListResponse callRelatedMetadataElementListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a RelatedMetadataElementListResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callTranslationDetailGetRESTCall
public TranslationDetailResponse callTranslationDetailGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a TranslationDetailResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callTranslationListGetRESTCall
public TranslationListResponse callTranslationListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a TranslationListResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callBooleanGetRESTCall
public BooleanResponse callBooleanGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a BooleanResponse object.- Overrides:
callBooleanGetRESTCallin classFFDCRESTClient- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.params- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callBooleanPostRESTCall
public BooleanResponse callBooleanPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a BooleanResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call, with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-
callCorrelationHeadersPostRESTCall
public MetadataCorrelationHeadersResponse callCorrelationHeadersPostRESTCall(String methodName, String urlTemplate, Object requestBody, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a POST REST call that returns a MetadataCorrelationHeadersResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API call with place-holders for the parameters.requestBody- object that passes additional parametersparams- a list of parameters that are slotted into the url template.- Returns:
- response object
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- the repository is not available or not working properly.
-