|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.audit.model.AuditApplication
public class AuditApplication
Helper class that wraps the audit application
.
Once wrapped, client code doesn't need access to any of the generated
model-driven classes.
Nested Class Summary | |
---|---|
static class |
AuditApplication.DataExtractorDefinition
Utility class carrying information around a DataExtractor . |
Field Summary | |
---|---|
static java.lang.String |
AUDIT_INVALID_PATH_COMP_CHAR_REGEX
|
static java.lang.String |
AUDIT_KEY_REGEX
|
static java.lang.String |
AUDIT_PATH_REGEX
|
static java.lang.String |
AUDIT_PATH_SEPARATOR
|
Method Summary | |
---|---|
static java.lang.String |
buildPath(java.lang.String[] pathComponents)
Compile a path or part of a path into a single string which always starts with the AuditApplication.AUDIT_PATH_SEPARATOR . |
void |
checkPath(java.lang.String path)
Helper method to check that a path is correct for this application instance |
static void |
checkPathFormat(java.lang.String path)
Helper method to check that a path is correct for this application instance |
boolean |
equals(java.lang.Object obj)
|
java.lang.Long |
getApplicationId()
Get the database ID for this application |
java.lang.String |
getApplicationKey()
Get the key (root path) for the application |
java.lang.String |
getApplicationName()
Get the application name |
java.util.List |
getDataExtractors()
Get all data extractors applicable to this application. |
java.util.Map |
getDataGenerators(java.util.Set paths)
Get all data generators applicable to a given path and scope. |
java.util.Map |
getDataGenerators(java.lang.String path)
Get all data generators applicable to a given path and scope. |
java.lang.Long |
getDisabledPathsId()
Get the property representing the set of disabled paths for the application |
static java.lang.String |
getRootKey(java.lang.String path)
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String AUDIT_PATH_SEPARATOR
public static final java.lang.String AUDIT_KEY_REGEX
public static final java.lang.String AUDIT_PATH_REGEX
public static final java.lang.String AUDIT_INVALID_PATH_COMP_CHAR_REGEX
Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getApplicationName()
public java.lang.String getApplicationKey()
public java.lang.Long getApplicationId()
public java.lang.Long getDisabledPathsId()
Set
of disabled pathspublic void checkPath(java.lang.String path)
path
- the path in format /app-key/x/y/z
AuditModelException
- if the path is invalidAuditApplication.AUDIT_PATH_REGEX
public static void checkPathFormat(java.lang.String path)
path
- the path in format /app-key/x/y/z
AuditModelException
- if the path is invalidAuditApplication.AUDIT_PATH_REGEX
public static java.lang.String buildPath(java.lang.String[] pathComponents)
AuditApplication.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.
pathElements
- the elements of the path e.g. "a", "b", "c"
.
"/a/b/c"
.public static java.lang.String getRootKey(java.lang.String path)
path
- the audit path for form /abc/def
#AUDIT_ROOT_KEY_REGEX
public java.util.List getDataExtractors()
public java.util.Map getDataGenerators(java.lang.String path)
path
- the audit path
public java.util.Map getDataGenerators(java.util.Set paths)
paths
- the audit paths
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |