TASKPM/scripts/rest-clients/criterion-types-sample.xml
Fernando Bellas Permuy ed2bc04448 ItEr46S13CUImportacionRecursosProductivosItEr45S11: Added support for updating when importing criterion types.
Support for updating criterion types when importing criterion types has been added.

To update a criterion type, it is only necessary to send the modifications, and not all the state. In consequence, it is only necessary to send modified propert
ies in the criterions and the criterion type itself, and only new or modified cr
iterions need to be sent. Furthermore, any legal change in the criterion hierarchy of the criterion type is allowed.

Finally, a test case has been added to test the updating funcionality.
2010-02-03 23:14:09 +01:00

145 lines
6 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<criterion-type-list xmlns="http://rest.ws.navalplanner.org">
<!-- Several errors: see comments -->
<criterion-type code="ct-1" name="ct-1" description="ct-1 desc"
allow-hierarchy="false"
allow-simultaneous-criterions-per-resource="true" enabled="true"
resource="RESOURCE">
<criterion-list>
<!-- Missing criterion name -->
<criterion code="ct-1-c1" active="true"/>
<criterion code="ct-1-c2" name="c2" active="true">
<!-- Criterion hierarchy is not allowed -->
<children>
<criterion code="ct-1-c2-1" name="c2-1" active="true">
<children>
<criterion code="ct-1-c2-1-1" name="c2-1-1" active="false"/>
<criterion code="ct-1-c2-1-2" name="c2-1-2" active="true"/>
</children>
</criterion>
<!-- Repeated criterion name -->
<criterion code="ct-1-c2-2" name=" C2-1 " active="true"/>
</children>
</criterion>
</criterion-list>
</criterion-type>
<!-- Missing criterion type name -->
<criterion-type code="ct-2" description="ct-2 desc" allow-hierarchy="true"
allow-simultaneous-criterions-per-resource="true" enabled="true"
resource="RESOURCE">
<criterion-list>
<criterion code="ct-2-c1" name="c1" active="true"/>
<criterion code="ct-2-c2" name="c2" active="true"/>
</criterion-list>
</criterion-type>
<!-- OK -->
<criterion-type code="ct-4" name="ct-4" description="ct-4 desc"
allow-hierarchy="true" allow-simultaneous-criterions-per-resource="true"
enabled="true" resource="RESOURCE">
<criterion-list>
<criterion code="ct-4-c1" name="c1" active="true"/>
<criterion code="ct-4-c2" name="c2" active="true">
<children>
<criterion code="ct-4-c2-1" name="c2-1" active="true">
<children>
<criterion code="ct-4-c2-1-1" name="c2-1-1" active="false"/>
<criterion code="ct-4-c2-1-2" name="c2-1-2" active="true"/>
</children>
</criterion>
<criterion code="ct-4-c2-2" name="c2-2" active="true"/>
</children>
</criterion>
</criterion-list>
</criterion-type>
<!-- Repeated criterion type name (see above) -->
<criterion-type code="ct-4b" name=" CT-4 " description="ct-4 desc"
allow-hierarchy="false"
allow-simultaneous-criterions-per-resource="false" enabled="false"
resource="WORKER"/>
<!-- Repeated criterion type name (probably a criterion type with this name
already exists in the database) -->
<criterion-type code="ct-4c" name="training" description="ct-4 desc"
allow-hierarchy="false"
allow-simultaneous-criterions-per-resource="false" enabled="false"
resource="WORKER"/>
<!-- A non-active criterion has an active subcriterion -->
<criterion-type code="ct-5" name="ct-5" description="ct-5 desc"
allow-hierarchy="true" allow-simultaneous-criterions-per-resource="true"
enabled="true" resource="RESOURCE">
<criterion-list>
<criterion code="ct-5-c1" name="c1" active="true"/>
<criterion code="ct-5-c2" name="c2" active="false">
<children>
<criterion code="ct-5-c2-1" name="c2-1" active="false"/>
<criterion code="ct-5-c2-2" name="c2-2" active="false">
<children>
<criterion code="ct-5-c2-2-1" name="c2-2-1" active="true"/>
</children>
</criterion>
</children>
</criterion>
</criterion-list>
</criterion-type>
<!-- OK -->
<criterion-type code="ct-6" name="ct-6" description="ct-6 desc"
allow-hierarchy="false"
allow-simultaneous-criterions-per-resource="false" enabled="false"
resource="WORKER"/>
<!-- Resource type does not allow enabled criteria -->
<criterion-type code="ct-7" name="ct-7" description="ct-5 desc"
allow-hierarchy="true" allow-simultaneous-criterions-per-resource="true"
enabled="false" resource="RESOURCE">
<criterion-list>
<criterion code="ct-7-c1" name="c1" active="true"/>
<criterion code="ct-7-c2" name="c2" active="false"/>
</criterion-list>
</criterion-type>
<!-- Repeated criterion type code ("ct-6") -->
<criterion-type code="ct-6" name="ct-7" description="ct-7 desc"
allow-hierarchy="false"
allow-simultaneous-criterions-per-resource="false" enabled="false"
resource="WORKER"/>
<!-- Repeated criterion code (ct-8-c1) -->
<criterion-type code="ct-8" name="ct-8" description="ct-8 desc"
allow-hierarchy="true" allow-simultaneous-criterions-per-resource="true"
enabled="true" resource="RESOURCE">
<criterion-list>
<criterion code="ct-8-c1" name="c8" active="true"/>
<criterion code="ct-8-c1" name="c8" active="true"/>
</criterion-list>
</criterion-type>
<!-- Repeated criterion code (ct-4-c2-1) -->
<criterion-type code="ct-9" name="ct-9" description="ct-9 desc"
allow-hierarchy="true" allow-simultaneous-criterions-per-resource="true"
enabled="true" resource="RESOURCE">
<criterion-list>
<criterion code="ct-9-c1" name="c9" active="true"/>
<criterion code="ct-9-c2" name="c9" active="true">
<children>
<criterion code="ct-9-c2-1" name="c9-1" active="true"/>
<criterion code="ct-4-c2-1" name="c9-2" active="true"/>
</children>
</criterion>
</criterion-list>
</criterion-type>
</criterion-type-list>