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 AuditRecordRepresentationcreate(AuditRecordRepresentation representation)Creates an audit record in the platform.AuditRecordRepresentationgetAuditRecord(GId gid)Gets an audit record by idAuditRecordCollectiongetAuditRecords()Gets all audit records from the platformAuditRecordCollectiongetAuditRecordsByFilter(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:AuditRecordApiGets an audit record by id- Specified by:
getAuditRecordin 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:AuditRecordApiGets all audit records from the platform- Specified by:
getAuditRecordsin 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:AuditRecordApiCreates 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:
createin 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:AuditRecordApiGets audit records from the platform based on the specified filter- Specified by:
getAuditRecordsByFilterin 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
-
-