mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Morning merge.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@2812 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint name="cm:filename" type="REGEX">
|
<constraint name="cm:filename" type="REGEX">
|
||||||
<parameter name="expression"><value><![CDATA[[^\"\*\\\>\<\?\/\:\|\¬\£\%\&\+\;]+]]></value></parameter>
|
<parameter name="expression"><value><![CDATA[.*[\"\*\\\>\<\?\/\:\|\xA3\xAC\%\&\+\;]+.*]]></value></parameter>
|
||||||
<parameter name="requiresMatch"><value>true</value></parameter>
|
<parameter name="requiresMatch"><value>false</value></parameter>
|
||||||
</constraint>
|
</constraint>
|
||||||
</constraints>
|
</constraints>
|
||||||
|
|
||||||
|
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
<imports>
|
<imports>
|
||||||
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
|
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
|
||||||
|
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys" />
|
||||||
</imports>
|
</imports>
|
||||||
|
|
||||||
<namespaces>
|
<namespaces>
|
||||||
@@ -18,6 +19,7 @@
|
|||||||
<types>
|
<types>
|
||||||
|
|
||||||
<type name="nt:base">
|
<type name="nt:base">
|
||||||
|
<parent>sys:base</parent>
|
||||||
<properties>
|
<properties>
|
||||||
<property name="jcr:primaryType">
|
<property name="jcr:primaryType">
|
||||||
<type>d:qname</type>
|
<type>d:qname</type>
|
||||||
|
@@ -229,12 +229,12 @@ public class ConstraintsTest extends TestCase
|
|||||||
public void testRegexConstraintFilename() throws Exception
|
public void testRegexConstraintFilename() throws Exception
|
||||||
{
|
{
|
||||||
// we assume UTF-8
|
// we assume UTF-8
|
||||||
String expression = "[^\\\"\\*\\\\\\>\\<\\?\\/\\:\\|\\¬\\£\\%\\&\\+\\;]+";
|
String expression = ".*[\\\"\\*\\\\\\>\\<\\?\\/\\:\\|\\xA3\\xAC\\%\\&\\+\\;]+.*";
|
||||||
String invalidChars = "\"*\\><?/:|£%&+;";
|
String invalidChars = "\"*\\><?/:|£%&+;";
|
||||||
|
|
||||||
RegexConstraint constraint = new RegexConstraint();
|
RegexConstraint constraint = new RegexConstraint();
|
||||||
constraint.setExpression(expression);
|
constraint.setExpression(expression);
|
||||||
constraint.setRequiresMatch(true);
|
constraint.setRequiresMatch(false);
|
||||||
constraint.initialize();
|
constraint.initialize();
|
||||||
|
|
||||||
// check that all the invalid chars cause failures
|
// check that all the invalid chars cause failures
|
||||||
@@ -249,6 +249,7 @@ public class ConstraintsTest extends TestCase
|
|||||||
evaluate(constraint, "Company Home", false);
|
evaluate(constraint, "Company Home", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private enum DummyEnum
|
private enum DummyEnum
|
||||||
{
|
{
|
||||||
ABC,
|
ABC,
|
||||||
|
Reference in New Issue
Block a user