public static AuditEntryBean contractCreatedToApi ( ContractBean bean , ISecurityContext securityContext ) { AuditEntryBean entry = newEntry ( bean . getApi ( ) . getApi ( ) . getOrganization ( ) . getId ( ) , AuditEntityType . Api , securityContext ) ; // Ensure the order of contract-created events are deterministic by adding 1 ms to this one entry . setCreatedOn ( new Date ( entry . getCreatedOn ( ) . getTime ( ) + 1 ) ) ; entry . setWhat ( AuditEntryType . CreateContract ) ; entry . setEntityId ( bean . getApi ( ) . getApi ( ) . getId ( ) ) ; entry . setEntityVersion ( bean . getApi ( ) . getVersion ( ) ) ; ContractData data = new ContractData ( bean ) ; entry . setData ( toJSON ( data ) ) ; return entry ; }
Creates an audit entry for the contract created event .