2 ~ Copyright 2005-2006 The Apache Software Foundation.
4 ~ Licensed under the Apache License, Version 2.0 (the "License");
5 ~ you may not use this file except in compliance with the License.
6 ~ You may obtain a copy of the License at
8 ~ http://www.apache.org/licenses/LICENSE-2.0
10 ~ Unless required by applicable law or agreed to in writing, software
11 ~ distributed under the License is distributed on an "AS IS" BASIS,
12 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 ~ See the License for the specific language governing permissions and
14 ~ limitations under the License.
17 <!DOCTYPE validators PUBLIC "-//OpenSymphony Group//XWork Validator 1.0.2//EN"
18 "http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd">
20 <!-- TODO! see MRM-150 for progress on these -->
22 <!-- TODO: constrain more -->
24 <field-validator type="requiredstring">
25 <message>You must enter the repository identifier.</message>
27 <!--field-validator type="regex">
28 <param name="expression"><![CDATA[([A-Z][a-z][0-9])]]></param>
29 <message>Id must not have special characters.</message>
33 <field-validator type="requiredstring">
34 <message>You must enter the repository name.</message>
38 <!-- deng todo: check if the entered repo url exists -->
40 <field-validator type="requiredstring">
41 <message>You must enter the repository URL.</message>
44 <field name="snapshotsInterval">
45 <field-validator type="regex">
46 <param name="expression"><![CDATA[([0-9])]]></param>
47 <message>The value must be numeric</message>
50 <field name="releasesInterval">
51 <field-validator type="regex">
52 <param name="expression"><![CDATA[([0-9])]]></param>
53 <message>The value must be numeric</message>
57 <!-- deng todo: check if the interval validator is still valid -->
58 <validator type="interval">
63 <field-validator type="required">
64 <message>Repository type is required.</message>
66 <field-validator type="fieldexpression">
67 <param name="expression">layout in {"legacy", "default"} </param>
68 <message>Invalid repository type.</message>
71 <field name="snapshotsPolicy">
72 <field-validator type="fieldexpression">
73 <param name="expression">snapshotsPolicy in { "disabled", "daily", "hourly", "never", "interval" }</param>
74 <message>Invalid snapshot policy.</message>
77 <field name="releasesPolicy">
78 <field-validator type="fieldexpression">
79 <param name="expression">releasesPolicy in { "disabled", "daily", "hourly", "never", "interval" }</param>
80 <message>Invalid releases policy.</message>
84 <field name="managedRepository">
85 <field-validator type="requiredstring">
86 <message>A managed repository must be selected.</message>
90 <!-- TODO: validate managed repository -->
91 <!-- TODO: validate layout -->
92 <!-- TODO: validate policies -->
93 <!-- TODO: validate that intervals are integers -->
94 <!-- TODO: validate that intervals are empty if policy is not interval -->