Class ITInfrastructureRESTClient
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
-
- org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
-
- org.odpi.openmetadata.commonservices.ocf.metadatamanagement.client.OCFRESTClient
-
- org.odpi.openmetadata.accessservices.itinfrastructure.client.rest.ITInfrastructureRESTClient
-
public class ITInfrastructureRESTClient extends OCFRESTClient
ITInfrastructureRESTClient 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
Constructors Constructor Description ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot)Constructor for no authentication.ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password)Constructor for simple userId and password authentication.ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog)Constructor for simple userId and password authentication with audit log.ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot, AuditLog auditLog)Constructor for no authentication with audit log.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ElementStubResponsecallElementStubGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns a ElementStubResponse object.EndpointResponsecallMyEndpointGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns a EndpointResponse object.EndpointsResponsecallMyEndpointsGetRESTCall(String methodName, String urlTemplate, Object... params)Issue a GET REST call that returns a EndpointsResponse object.-
Methods inherited from class org.odpi.openmetadata.commonservices.ocf.metadatamanagement.client.OCFRESTClient
callAssetGetRESTCall, callAssetsGetRESTCall, callAssetsPostRESTCall, callConnectionGetRESTCall, callTagGetRESTCall, callTagListGetRESTCall, callTagListPostRESTCall
-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callConnectorTypeGetRESTCall, callCountGetRESTCall, callGUIDGetRESTCall, callGUIDListGetRESTCall, callGUIDListPostRESTCall, callGUIDPostRESTCall, callNameListGetRESTCall, callStringMapGetRESTCall, callVoidGetRESTCall, callVoidPostRESTCall
-
Methods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
callDeleteRESTCall, callDeleteRESTCall, callGetRESTCall, callGetRESTCall, callGetRESTCallNoParams, callPostRESTCall, callPostRESTCall, callPostRESTCallNoParams, callPutRESTCall, callPutRESTCall
-
-
-
-
Constructor Detail
-
ITInfrastructureRESTClient
public ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot, 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.auditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ITInfrastructureRESTClient
public ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException
Constructor for no authentication.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ITInfrastructureRESTClient
public ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog) throws InvalidParameterException
Constructor for simple userId and password 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.userId- user id for the HTTP requestpassword- password for the HTTP requestauditLog- destination for log messages.- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
ITInfrastructureRESTClient
public ITInfrastructureRESTClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
Constructor for simple userId and password authentication.- Parameters:
serverName- name of the OMAG Server to callserverPlatformURLRoot- URL root of the server manager where the OMAG Server is running.userId- user id for the HTTP requestpassword- password for the HTTP request- Throws:
InvalidParameterException- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Detail
-
callMyEndpointGetRESTCall
public EndpointResponse callMyEndpointGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a EndpointResponse 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:
- EndpointResponse
- 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.
-
callMyEndpointsGetRESTCall
public EndpointsResponse callMyEndpointsGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a EndpointsResponse 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:
- EndpointsResponse
- 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.
-
callElementStubGetRESTCall
public ElementStubResponse callElementStubGetRESTCall(String methodName, String urlTemplate, Object... params) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Issue a GET REST call that returns a ElementStubResponse 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.
-
-