Audit paths and keys may now also contain '_' (underscore)

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16366 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-09-18 11:53:12 +00:00
parent 04c877b808
commit d0d6d61373
4 changed files with 66 additions and 63 deletions

View File

@@ -110,7 +110,7 @@
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="128"/>
<xs:pattern value="([a-z]|[A-Z]|[0-9]|\-|\.|\ )*"/>
<xs:pattern value="([a-z]|[A-Z]|[0-9]|\-|\_|\.|\ )*"/>
</xs:restriction>
</xs:simpleType>
@@ -118,7 +118,7 @@
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="128"/>
<xs:pattern value="([a-z]|[A-Z]|[0-9]|\-|\.)*"/>
<xs:pattern value="([a-z]|[A-Z]|[0-9]|\-|\_|\.)*"/>
</xs:restriction>
</xs:simpleType>
@@ -126,7 +126,7 @@
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="128"/>
<xs:pattern value="(/([a-z]|[A-Z]|[0-9]|\-|\.)+)+"/>
<xs:pattern value="(/([a-z]|[A-Z]|[0-9]|\-|\_|\.)+)+"/>
</xs:restriction>
</xs:simpleType>

View File

@@ -1096,10 +1096,13 @@ public class AuditComponentImpl implements AuditComponent
if (disabledPaths.contains(AuditApplication.buildPath(rootKey)))
{
// The root key has been disabled for this application
if (logger.isDebugEnabled())
{
logger.debug(
"Audit values root path has been excluded by disabled paths: \n" +
" Application: " + application + "\n" +
" Root Path: " + AuditApplication.buildPath(rootKey));
}
continue;
}
// Do the audit

View File

@@ -50,8 +50,8 @@ import org.apache.commons.logging.LogFactory;
public class AuditApplication
{
public static final String AUDIT_PATH_SEPARATOR = "/";
public static final String AUDIT_KEY_REGEX = "[a-zA-Z0-9\\-\\.]+";
public static final String AUDIT_PATH_REGEX = "(/[a-zA-Z0-9\\-\\.]+)+";
public static final String AUDIT_KEY_REGEX = "[a-zA-Z0-9\\-\\_\\.]+";
public static final String AUDIT_PATH_REGEX = "(/[a-zA-Z0-9\\-\\_\\.]+)+";
private static final Log logger = LogFactory.getLog(AuditApplication.class);

View File

@@ -33,14 +33,6 @@ public class ObjectFactory {
public ObjectFactory() {
}
/**
* Create an instance of {@link DataExtractor }
*
*/
public DataExtractor createDataExtractor() {
return new DataExtractor();
}
/**
* Create an instance of {@link Audit }
*
@@ -49,46 +41,6 @@ public class ObjectFactory {
return new Audit();
}
/**
* Create an instance of {@link DataExtractors }
*
*/
public DataExtractors createDataExtractors() {
return new DataExtractors();
}
/**
* Create an instance of {@link AuditPath }
*
*/
public AuditPath createAuditPath() {
return new AuditPath();
}
/**
* Create an instance of {@link PathMap }
*
*/
public PathMap createPathMap() {
return new PathMap();
}
/**
* Create an instance of {@link KeyedAuditDefinition }
*
*/
public KeyedAuditDefinition createKeyedAuditDefinition() {
return new KeyedAuditDefinition();
}
/**
* Create an instance of {@link PathMappings }
*
*/
public PathMappings createPathMappings() {
return new PathMappings();
}
/**
* Create an instance of {@link DataGenerator }
*
@@ -98,19 +50,19 @@ public class ObjectFactory {
}
/**
* Create an instance of {@link Application }
* Create an instance of {@link AuditPath }
*
*/
public Application createApplication() {
return new Application();
public AuditPath createAuditPath() {
return new AuditPath();
}
/**
* Create an instance of {@link DataGenerators }
* Create an instance of {@link KeyedAuditDefinition }
*
*/
public DataGenerators createDataGenerators() {
return new DataGenerators();
public KeyedAuditDefinition createKeyedAuditDefinition() {
return new KeyedAuditDefinition();
}
/**
@@ -121,6 +73,22 @@ public class ObjectFactory {
return new GenerateValue();
}
/**
* Create an instance of {@link DataGenerators }
*
*/
public DataGenerators createDataGenerators() {
return new DataGenerators();
}
/**
* Create an instance of {@link DataExtractors }
*
*/
public DataExtractors createDataExtractors() {
return new DataExtractors();
}
/**
* Create an instance of {@link RecordValue }
*
@@ -129,6 +97,38 @@ public class ObjectFactory {
return new RecordValue();
}
/**
* Create an instance of {@link Application }
*
*/
public Application createApplication() {
return new Application();
}
/**
* Create an instance of {@link DataExtractor }
*
*/
public DataExtractor createDataExtractor() {
return new DataExtractor();
}
/**
* Create an instance of {@link PathMappings }
*
*/
public PathMappings createPathMappings() {
return new PathMappings();
}
/**
* Create an instance of {@link PathMap }
*
*/
public PathMap createPathMap() {
return new PathMap();
}
/**
* Create an instance of {@link JAXBElement }{@code <}{@link Audit }{@code >}}
*