org.inspektr.audit.annotation
Annotation Type Auditable


@Retention(value=RUNTIME)
@Target(value=METHOD)
public @interface Auditable

States that this method should be logged for auditing purposes.

Since:
1.0
Version:
$Revision$ $Date$
Author:
Alice Leung, Dmitriy Kopylenko, Scott Battaglia

Required Element Summary
 java.lang.String action
          The action to write to the log when we audit this method.
 java.lang.Class<? extends AuditableResourceResolver> resourceResolverClass
          Returns the AuditableResourceResolver that knows how to resolve the resource.
 
Optional Element Summary
 java.lang.Class<? extends AuditableActionResolver> actionResolverClass
          Whether to use one of the built in resolvers or not.
 java.lang.String applicationCode
          Identifier for this particular application in the audit trail logs.
 java.lang.String failureSuffix
          The suffix to append to the action when resolvers are used that can detect failure.
 java.lang.String successSuffix
          The suffix to append to the action when resolvers are used that can detect success.
 

Element Detail

action

public abstract java.lang.String action
The action to write to the log when we audit this method. Value must be defined.

Returns:
the action to write to the logs.

resourceResolverClass

public abstract java.lang.Class<? extends AuditableResourceResolver> resourceResolverClass
Returns the AuditableResourceResolver that knows how to resolve the resource.

Returns:
the AuditableResourceResolver that knows how to resolve the resource.

applicationCode

public abstract java.lang.String applicationCode
Identifier for this particular application in the audit trail logs. This attribute should only be used to override the basic application code when you want to differentiate a section of the code.

Returns:
the application code or an empty String if none is set.
Default:
""

successSuffix

public abstract java.lang.String successSuffix
The suffix to append to the action when resolvers are used that can detect success.

Returns:
the suffix.
Default:
""

failureSuffix

public abstract java.lang.String failureSuffix
The suffix to append to the action when resolvers are used that can detect failure.

Returns:
the suffix
Default:
""

actionResolverClass

public abstract java.lang.Class<? extends AuditableActionResolver> actionResolverClass
Whether to use one of the built in resolvers or not.

Returns:
the resolver to use. Defaults to the DefaultAuditableActionResolver, which means just return the action.
Default:
org.inspektr.audit.spi.support.DefaultAuditableActionResolver.class


Copyright © 2007-2011. All Rights Reserved.