Class ServerOperationsRESTClient
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
org.odpi.openmetadata.serveroperations.client.rest.ServerOperationsRESTClient
AssetOwnerRESTClient 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
ConstructorsConstructorDescriptionServerOperationsRESTClient(String platformName, String platformURLRoot, String localServerSecretsStoreProvider, String localServerSecretsStoreLocation, String localServerSecretsStoreCollection, AuditLog auditLog) Constructor for no authentication with audit log.ServerOperationsRESTClient(String platformName, String platformRootURL, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) Create a new client with bearer token from supplied secrets store. -
Method Summary
Modifier and TypeMethodDescriptioncallOMAGServerConfigGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a OMAGServerConfigResponse object.callOMAGServerStatusGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a OMAGServerStatusResponse object.callServerStatusGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a ServerStatusResponse object.callServiceListGetRESTCall(String methodName, String urlTemplate, Object... params) Issue a GET REST call that returns a ServerServicesListResponse object.Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callBooleanGetRESTCall, 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
-
ServerOperationsRESTClient
public ServerOperationsRESTClient(String platformName, String platformURLRoot, String localServerSecretsStoreProvider, String localServerSecretsStoreLocation, String localServerSecretsStoreCollection, AuditLog auditLog) throws InvalidParameterException Constructor for no authentication with audit log.- Parameters:
platformName- name of the OMAG Server to callplatformURLRoot- URL root of the server manager where the OMAG Server is running.localServerSecretsStoreProvider- secrets store connector for bearer tokenlocalServerSecretsStoreLocation- secrets store location for bearer tokenlocalServerSecretsStoreCollection- 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.
-
ServerOperationsRESTClient
public ServerOperationsRESTClient(String platformName, String platformRootURL, Map<String, SecretsStoreConnector> secretsStoreConnectorMap, AuditLog auditLog) throws InvalidParameterExceptionCreate a new client with bearer token from supplied secrets store.- Parameters:
platformName- name of the platform to connect toplatformRootURL- the network address of the server running the OMAS REST servicessecretsStoreConnectorMap- 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
-
callServerStatusGetRESTCall
public ServerStatusResponse callServerStatusGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a ServerStatusResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API 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.
-
callServiceListGetRESTCall
public ServerServicesListResponse callServiceListGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a ServerServicesListResponse object.- Parameters:
methodName- name of the method being called.urlTemplate- template of the URL for the REST API 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.
-
callOMAGServerStatusGetRESTCall
public OMAGServerStatusResponse callOMAGServerStatusGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a OMAGServerStatusResponse 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:
- OMAGServerStatusResponse
- 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.
-
callOMAGServerConfigGetRESTCall
public OMAGServerConfigResponse callOMAGServerConfigGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Issue a GET REST call that returns a OMAGServerConfigResponse 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:
- OMAGServerConfigResponse
- Throws:
InvalidParameterException- one of the parameters is invalid.UserNotAuthorizedException- the user is not authorized to make this request.PropertyServerException- something went wrong with the REST call stack.
-