Package com.cumulocity.sdk.client.audit
Class AuditRecordApiImpl
- java.lang.Object
-
- com.cumulocity.sdk.client.audit.AuditRecordApiImpl
-
- All Implemented Interfaces:
AuditRecordApi
public class AuditRecordApiImpl extends Object implements AuditRecordApi
-
-
Constructor Summary
Constructors Constructor Description AuditRecordApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, AuditRecordsRepresentation auditRecordsRepresentation, int pageSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuditRecordRepresentation
create(AuditRecordRepresentation representation)
Creates an audit record in the platform.AuditRecordRepresentation
getAuditRecord(GId gid)
Gets an audit record by idAuditRecordCollection
getAuditRecords()
Gets all audit records from the platformAuditRecordCollection
getAuditRecordsByFilter(AuditRecordFilter filter)
Gets audit records from the platform based on the specified filter
-
-
-
Constructor Detail
-
AuditRecordApiImpl
public AuditRecordApiImpl(RestConnector restConnector, UrlProcessor urlProcessor, AuditRecordsRepresentation auditRecordsRepresentation, int pageSize)
-
-
Method Detail
-
getAuditRecord
public AuditRecordRepresentation getAuditRecord(GId gid) throws SDKException
Description copied from interface:AuditRecordApi
Gets an audit record by id- Specified by:
getAuditRecord
in interfaceAuditRecordApi
- Parameters:
gid
- id of the audit record to search for- Returns:
- the audit record with the given id
- Throws:
SDKException
- if the audit record is not found
-
getAuditRecords
public AuditRecordCollection getAuditRecords() throws SDKException
Description copied from interface:AuditRecordApi
Gets all audit records from the platform- Specified by:
getAuditRecords
in interfaceAuditRecordApi
- Returns:
- collection of audit records with paging functionality
- Throws:
SDKException
- if the query failed
-
create
public AuditRecordRepresentation create(AuditRecordRepresentation representation) throws SDKException
Description copied from interface:AuditRecordApi
Creates an audit record in the platform. The id of the audit record must not be set, since it will be generated by the platform- Specified by:
create
in interfaceAuditRecordApi
- Parameters:
representation
- the audit record to be created- Returns:
- the created audit record with the generated id
- Throws:
SDKException
- if the audit record could not be generated
-
getAuditRecordsByFilter
public AuditRecordCollection getAuditRecordsByFilter(AuditRecordFilter filter) throws SDKException
Description copied from interface:AuditRecordApi
Gets audit records from the platform based on the specified filter- Specified by:
getAuditRecordsByFilter
in interfaceAuditRecordApi
- Parameters:
filter
- the filter criteria(s)- Returns:
- collection of audit records matched by the filter with paging functionality
- Throws:
SDKException
- if the query failed
-
-