Class GovernedAssetClient
java.lang.Object
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
org.odpi.openmetadata.accessservices.securityofficer.client.GovernedAssetClient
- All Implemented Interfaces:
GovernedAssetInterface
The Security Officer Open Metadata Access Service (OMAS) provides an interface to support a policy engine
such as Apache Ranger. See interface definition for more explanation
-
Field Summary
Fields inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase
auditLog, exceptionHandler, serverName, serverPlatformURLRoot
-
Constructor Summary
ConstructorDescriptionGovernedAssetClient
(String serverName, String serverPlatformURLRoot) Create a new Governance Engine client.GovernedAssetClient
(String serverName, String serverPlatformURLRoot, String userId, String password) -
Method Summary
Modifier and TypeMethodDescriptioncreateSoftwareServerCapability
(String userId, SoftwareServerCapabilityRequestBody softwareServerCapability) Create a Software Server Capability entitygetGovernedAsset
(String userId, String assetGuid) getGovernedAssetList
(String userId, String classification, List<String> entityTypes, Integer offset, Integer pageSize) Returns a list of the entities filtered by types that have the searched governed classification.getSoftwareServerCapabilityByGUID
(String userId, String guid) Returns the Software Server Capability entity by global identifierMethods inherited from class org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClient
callBooleanGetRESTCall, callCountGetRESTCall, callGUIDGetRESTCall, callGUIDListGetRESTCall, callGUIDListPostRESTCall, callGUIDPostRESTCall, callNameListGetRESTCall, callOCFConnectorReportGetRESTCall, 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 Details
-
GovernedAssetClient
public GovernedAssetClient(String serverName, String serverPlatformURLRoot) throws InvalidParameterException Create a new Governance Engine client.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST services- Throws:
InvalidParameterException
- if parameter validation fails
-
GovernedAssetClient
public GovernedAssetClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException - Throws:
InvalidParameterException
-
-
Method Details
-
getGovernedAssetList
public List<GovernedAsset> getGovernedAssetList(String userId, String classification, List<String> entityTypes, Integer offset, Integer pageSize) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException Returns a list of the entities filtered by types that have the searched governed classification.- Specified by:
getGovernedAssetList
in interfaceGovernedAssetInterface
- Parameters:
userId
- - userId of user making request.classification
- - name of base classification type (can be null)entityTypes
- - String - root type of asset (can be null)offset
- - offset of full collection to begin the return resultspageSize
- - limit the number of the results returned- Returns:
- a list of the governed entities that have the Governed Classification Searched.
- Throws:
UserNotAuthorizedException
- - the requesting user is not authorized to issue this request.PropertyServerException
- - there is a problem retrieving information from the property server(s).InvalidParameterException
- - one of the parameters is null or invalid.
-
getGovernedAsset
public GovernedAsset getGovernedAsset(String userId, String assetGuid) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException - Specified by:
getGovernedAsset
in interfaceGovernedAssetInterface
- Parameters:
userId
- - String - userId of user making request.assetGuid
- - String - guid of asset component- Returns:
- the entity if this has a governed classification assigned
- Throws:
UserNotAuthorizedException
- - the requesting user is not authorized to issue this request.PropertyServerException
- - there is a problem retrieving information from the property server(s).InvalidParameterException
- - one of the parameters is null or invalid.
-
createSoftwareServerCapability
public String createSoftwareServerCapability(String userId, SoftwareServerCapabilityRequestBody softwareServerCapability) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException Create a Software Server Capability entity- Specified by:
createSoftwareServerCapability
in interfaceGovernedAssetInterface
- Parameters:
userId
- - String - userId of user making request.softwareServerCapability
- - SoftwareServerCapabilityRequestBody- Returns:
- the GUID of the Software Server entity created
- Throws:
UserNotAuthorizedException
- - the requesting user is not authorized to issue this request.PropertyServerException
- - there is a problem retrieving information from the property server(s).InvalidParameterException
- - one of the parameters is null or invalid.
-
getSoftwareServerCapabilityByGUID
public SoftwareServerCapability getSoftwareServerCapabilityByGUID(String userId, String guid) throws UserNotAuthorizedException, PropertyServerException, InvalidParameterException Returns the Software Server Capability entity by global identifier- Specified by:
getSoftwareServerCapabilityByGUID
in interfaceGovernedAssetInterface
- Parameters:
userId
- - the name of the calling userguid
- - guid of the software server- Returns:
- the Software Server Capability entity associated with the provided GUID
- Throws:
UserNotAuthorizedException
- - the requesting user is not authorized to issue this request.PropertyServerException
- - there is a problem retrieving information from the property server(s).InvalidParameterException
- - one of the parameters is null or invalid.
-