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
public class GovernedAssetClient extends FFDCRESTClient implements 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
Constructors Constructor Description GovernedAssetClient(String serverName, String serverPlatformURLRoot)Create a new Governance Engine client.GovernedAssetClient(String serverName, String serverPlatformURLRoot, String userId, String password)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringcreateSoftwareServerCapability(String userId, SoftwareServerCapabilityRequestBody softwareServerCapability)Create a Software Server Capability entityGovernedAssetgetGovernedAsset(String userId, String assetGuid)List<GovernedAsset>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.SoftwareServerCapabilitygetSoftwareServerCapabilityByGUID(String userId, String guid)Returns the Software Server Capability entity by global identifier-
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
-
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 servers- Throws:
InvalidParameterException- if parameter validation fails
-
GovernedAssetClient
public GovernedAssetClient(String serverName, String serverPlatformURLRoot, String userId, String password) throws InvalidParameterException
- Throws:
InvalidParameterException
-
-
Method Detail
-
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:
getGovernedAssetListin 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:
getGovernedAssetin interfaceGovernedAssetInterface- Parameters:
userId- - String - userId of user making request.assetGuid- - String - guid of asset component- Returns:
- the 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:
createSoftwareServerCapabilityin 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:
getSoftwareServerCapabilityByGUIDin 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.
-
-