public class AuditUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static AuditEntryBean |
apiCreated(ApiBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'API created' event.
|
static AuditEntryBean |
apiDefinitionDeleted(ApiVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry when a API definition is deleted.
|
static AuditEntryBean |
apiDefinitionUpdated(ApiVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry when a API definition is updated.
|
static AuditEntryBean |
apiPublished(ApiVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'API published' event.
|
static AuditEntryBean |
apiRetired(ApiVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'API retired' event.
|
static AuditEntryBean |
apiUpdated(ApiBean bean,
EntityUpdatedData data,
ISecurityContext securityContext)
Creates an audit entry for the 'API updated' event.
|
static AuditEntryBean |
apiVersionCreated(ApiVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'API version created' event.
|
static AuditEntryBean |
apiVersionUpdated(ApiVersionBean bean,
EntityUpdatedData data,
ISecurityContext securityContext)
Creates an audit entry for the 'API version updated' event.
|
static String |
asString_ApiGatewayBeans(Set<ApiGatewayBean> gateways)
Converts the list of gateways to a string for display/comparison.
|
static String |
asString_ApiPlanBeans(Set<ApiPlanBean> plans)
Converts the list of plans to a string for display/comparison.
|
static AuditEntryBean |
clientCreated(ClientBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'client created' event.
|
static AuditEntryBean |
clientRegistered(ClientVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'client registered' event.
|
static AuditEntryBean |
clientUnregistered(ClientVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'client unregistered' event.
|
static AuditEntryBean |
clientUpdated(ClientBean bean,
EntityUpdatedData data,
ISecurityContext securityContext)
Creates an audit entry for the 'client updated' event.
|
static AuditEntryBean |
clientVersionCreated(ClientVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'client version created' event.
|
static AuditEntryBean |
clientVersionUpdated(ClientVersionBean bean,
EntityUpdatedData data,
ISecurityContext securityContext)
Creates an audit entry for the 'client version updated' event.
|
static AuditEntryBean |
contractBrokenFromClient(ContractBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'contract broken' event.
|
static AuditEntryBean |
contractBrokenToApi(ContractBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'contract broken' event.
|
static AuditEntryBean |
contractCreatedFromClient(ContractBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'contract created' event.
|
static AuditEntryBean |
contractCreatedToApi(ContractBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'contract created' event.
|
static AuditEntryBean |
membershipGranted(String organizationId,
MembershipData data,
ISecurityContext securityContext)
Creates an audit entry for the 'membership granted' even.
|
static AuditEntryBean |
membershipRevoked(String organizationId,
MembershipData data,
ISecurityContext securityContext)
Creates an audit entry for the 'membership revoked' even.
|
static AuditEntryBean |
organizationCreated(OrganizationBean bean,
ISecurityContext securityContext)
Creates an
AuditEntryBean for the 'organization created' event. |
static AuditEntryBean |
organizationUpdated(OrganizationBean bean,
EntityUpdatedData data,
ISecurityContext securityContext)
Creates an audit entry for the 'organization updated' event.
|
static AuditEntryBean |
planCreated(PlanBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'plan created' event.
|
static AuditEntryBean |
planLocked(PlanVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'plan locked' event.
|
static AuditEntryBean |
planUpdated(PlanBean bean,
EntityUpdatedData data,
ISecurityContext securityContext)
Creates an audit entry for the 'plan updated' event.
|
static AuditEntryBean |
planVersionCreated(PlanVersionBean bean,
ISecurityContext securityContext)
Creates an audit entry for the 'plan version created' event.
|
static AuditEntryBean |
planVersionUpdated(PlanVersionBean bean,
EntityUpdatedData data,
ISecurityContext securityContext)
Creates an audit entry for the 'plan version updated' event.
|
static AuditEntryBean |
policiesReordered(ApiVersionBean apiVersion,
PolicyType policyType,
ISecurityContext securityContext)
Called when the user reorders the policies in a API.
|
static AuditEntryBean |
policiesReordered(ClientVersionBean cvb,
PolicyType policyType,
ISecurityContext securityContext)
Called when the user reorders the policies in an client.
|
static AuditEntryBean |
policiesReordered(PlanVersionBean pvb,
PolicyType policyType,
ISecurityContext securityContext)
Called when the user reorders the policies in a plan.
|
static AuditEntryBean |
policyAdded(PolicyBean bean,
PolicyType type,
ISecurityContext securityContext)
Creates an audit entry for the 'policy added' event.
|
static AuditEntryBean |
policyRemoved(PolicyBean bean,
PolicyType type,
ISecurityContext securityContext)
Creates an audit entry for the 'policy removed' event.
|
static AuditEntryBean |
policyUpdated(PolicyBean bean,
PolicyType type,
ISecurityContext securityContext)
Creates an audit entry for the 'policy updated' event.
|
static boolean |
valueChanged(Boolean before,
Boolean after)
Returns true only if the value changed.
|
static boolean |
valueChanged(Enum<?> before,
Enum<?> after)
Returns true only if the value changed.
|
static boolean |
valueChanged(Map<String,String> before,
Map<String,String> after)
Returns true only if the map has changed.
|
static boolean |
valueChanged(Set<?> before,
Set<?> after)
Returns true only if the set has changed.
|
static boolean |
valueChanged(String before,
String after)
Returns true only if the value changed.
|
public static boolean valueChanged(String before, String after)
before - the value before changeafter - the value after changepublic static boolean valueChanged(Boolean before, Boolean after)
before - the value before changeafter - the value after changepublic static boolean valueChanged(Set<?> before, Set<?> after)
before - the value before changeafter - the value after changepublic static boolean valueChanged(Map<String,String> before, Map<String,String> after)
before - the value before changeafter - the value after changepublic static boolean valueChanged(Enum<?> before, Enum<?> after)
before - the value before changeafter - the value after changepublic static AuditEntryBean organizationCreated(OrganizationBean bean, ISecurityContext securityContext)
AuditEntryBean for the 'organization created' event.bean - the beansecurityContext - the security contextpublic static AuditEntryBean organizationUpdated(OrganizationBean bean, EntityUpdatedData data, ISecurityContext securityContext)
bean - the beandata - the updatesecurityContext - the security contextpublic static AuditEntryBean membershipGranted(String organizationId, MembershipData data, ISecurityContext securityContext)
organizationId - the organization iddata - the membership datasecurityContext - the security contextpublic static AuditEntryBean membershipRevoked(String organizationId, MembershipData data, ISecurityContext securityContext)
organizationId - the organization iddata - the membership datasecurityContext - the security contextpublic static AuditEntryBean apiCreated(ApiBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean apiUpdated(ApiBean bean, EntityUpdatedData data, ISecurityContext securityContext)
bean - the beandata - the updated datasecurityContext - the security contextpublic static AuditEntryBean apiVersionCreated(ApiVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean apiVersionUpdated(ApiVersionBean bean, EntityUpdatedData data, ISecurityContext securityContext)
bean - the beandata - the updated datasecurityContext - the security contextpublic static AuditEntryBean apiDefinitionUpdated(ApiVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean apiDefinitionDeleted(ApiVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean clientCreated(ClientBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean clientUpdated(ClientBean bean, EntityUpdatedData data, ISecurityContext securityContext)
bean - the beandata - the updated datasecurityContext - the security contextpublic static AuditEntryBean clientVersionCreated(ClientVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean clientVersionUpdated(ClientVersionBean bean, EntityUpdatedData data, ISecurityContext securityContext)
bean - the beandata - the updated datasecurityContext - the security contextpublic static AuditEntryBean contractCreatedFromClient(ContractBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean contractCreatedToApi(ContractBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean contractBrokenFromClient(ContractBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean contractBrokenToApi(ContractBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean policyAdded(PolicyBean bean, PolicyType type, ISecurityContext securityContext)
bean - the beantype - the policy typesecurityContext - the security contextpublic static AuditEntryBean policyRemoved(PolicyBean bean, PolicyType type, ISecurityContext securityContext)
bean - the beantype - the policy typesecurityContext - the security contextpublic static AuditEntryBean policyUpdated(PolicyBean bean, PolicyType type, ISecurityContext securityContext)
bean - the beantype - the policy typesecurityContext - the security contextpublic static AuditEntryBean planCreated(PlanBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean planUpdated(PlanBean bean, EntityUpdatedData data, ISecurityContext securityContext)
bean - the beandata - the updated datasecurityContext - the security contextpublic static AuditEntryBean planVersionCreated(PlanVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean planVersionUpdated(PlanVersionBean bean, EntityUpdatedData data, ISecurityContext securityContext)
bean - the beandata - the updated datasecurityContext - the security contextpublic static AuditEntryBean apiPublished(ApiVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean apiRetired(ApiVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean clientRegistered(ClientVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean clientUnregistered(ClientVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean planLocked(PlanVersionBean bean, ISecurityContext securityContext)
bean - the beansecurityContext - the security contextpublic static AuditEntryBean policiesReordered(ApiVersionBean apiVersion, PolicyType policyType, ISecurityContext securityContext)
apiVersion - the API versionpolicyType - the policy typesecurityContext - the security contextpublic static AuditEntryBean policiesReordered(ClientVersionBean cvb, PolicyType policyType, ISecurityContext securityContext)
cvb - the client and versionpolicyType - the policy typesecurityContext - the security contextpublic static AuditEntryBean policiesReordered(PlanVersionBean pvb, PolicyType policyType, ISecurityContext securityContext)
pvb - the plan and versionpolicyType - the policy typesecurityContext - the security contextpublic static String asString_ApiPlanBeans(Set<ApiPlanBean> plans)
plans - the planspublic static String asString_ApiGatewayBeans(Set<ApiGatewayBean> gateways)
gateways - set of gatewaysCopyright © 2021 Apiman. All rights reserved.