public class AuditApplication extends Object
audit application
.
Once wrapped, client code doesn't need access to any of the generated
model-driven classes.Modifier and Type | Class and Description |
---|---|
static class |
AuditApplication.DataExtractorDefinition
Utility class carrying information around a
DataExtractor . |
Modifier and Type | Field and Description |
---|---|
static String |
AUDIT_APPLICATION_PREFIX_FOR_PRE_DATA |
static Pattern |
AUDIT_INVALID_PATH_COMP_CHAR_PATTERN |
static Pattern |
AUDIT_KEY_PATTERN |
static Pattern |
AUDIT_PATH_PATTERN |
static String |
AUDIT_PATH_SEPARATOR |
Modifier and Type | Method and Description |
---|---|
static String |
buildPath(String... pathComponents)
Compile a path or part of a path into a single string which always starts with the
AUDIT_PATH_SEPARATOR . |
void |
checkPath(String path)
Helper method to check that a path is correct for this application instance
|
static void |
checkPathFormat(String path)
Helper method to check that a path is correct for this application instance
|
boolean |
equals(Object obj) |
Long |
getApplicationId()
Get the database ID for this application
|
String |
getApplicationKey()
Get the key (root path) for the application
|
String |
getApplicationName()
Get the application name
|
List<AuditApplication.DataExtractorDefinition> |
getDataExtractors()
Get all data extractors applicable to this application.
|
Map<String,DataGenerator> |
getDataGenerators(Set<String> paths)
Get all data generators applicable to a given path and scope.
|
Map<String,DataGenerator> |
getDataGenerators(String path)
Get all data generators applicable to a given path and scope.
|
Long |
getDisabledPathsId()
Get the property representing the set of disabled paths for the application
|
static String |
getRootKey(String path) |
int |
hashCode() |
boolean |
isApplicationJustGeneratingPreCallData()
Returns
true if the application name has a prefix of "PreCallData"
that indicates that the only purpose of the Application is to generate data to be
passed to a post call audit application. |
String |
toString() |
public static final String AUDIT_APPLICATION_PREFIX_FOR_PRE_DATA
public static final String AUDIT_PATH_SEPARATOR
public static final Pattern AUDIT_KEY_PATTERN
public static final Pattern AUDIT_PATH_PATTERN
public static final Pattern AUDIT_INVALID_PATH_COMP_CHAR_PATTERN
public String getApplicationName()
public String getApplicationKey()
public Long getApplicationId()
public Long getDisabledPathsId()
public void checkPath(String path)
path
- the path in format /app-key/x/y/zAuditModelException
- if the path is invalidAUDIT_PATH_PATTERN
public static void checkPathFormat(String path)
path
- the path in format /app-key/x/y/zAuditModelException
- if the path is invalidAUDIT_PATH_PATTERN
public static String buildPath(String... pathComponents)
AUDIT_PATH_SEPARATOR
. This can be a relative path so need not always start with
the application root key.
If the path separator is present at the beginning of a path component, then it is not added,
so "/a", "b", "/c"
becomes "/a/b/c"
allowing path to be appended
to other paths.
The final result is checked against a regular expression
to ensure
it is valid.
pathComponents
- the elements of the path e.g. "a", "b", "c"
."/a/b/c"
.public static String getRootKey(String path)
path
- the audit path for form /abc/defpublic List<AuditApplication.DataExtractorDefinition> getDataExtractors()
public Map<String,DataGenerator> getDataGenerators(String path)
path
- the audit pathpublic Map<String,DataGenerator> getDataGenerators(Set<String> paths)
paths
- the audit pathspublic boolean isApplicationJustGeneratingPreCallData()
true
if the application name has a prefix of "PreCallData"
that indicates that the only purpose of the Application is to generate data to be
passed to a post call audit application. In this situation the application's
audit data is not audited. This allows the post audit application to have access to
'before' values including those created by extractors and generators. Some of which
will not be available (for example the node has been deleted) or will have changed
as a result of the call.Copyright © 2005–2017 Alfresco Software. All rights reserved.