TASKPM/scripts/rest-clients/resources-update-sample.xml
Fernando Bellas Permuy 664d7a8f63 ItEr47S12CUImportacionRecursosProductivosItEr46S13: Added updating functionality to ResourceServiceREST
Updating functionality has been added to ResourceServiceREST. All data associated to a resource can be updated with the exception of the calendar field, since the updating semantics are only clearly defined for such field at this moment (what happens with the previous derived calendar: modified?, removed?, disabled?).

As part of this patch, some improvements to CriterionServiceREST implementation have also been made. In particular, updateUnvalidated methods has been added to related entities (as in ResourceServiceREST). Unlike createUnvalidated methods, such methods are used for updating, and like createUnvalidated methods, non-valid fields are allowed.

Finally, performance of GenericRESTService has been improved. Previously, validations were executed twice for each entity being imported due to previous limitations of IGenericDAO interface. Now, a new method has been added to IGenericDAO to make possible to execute validations only one time for each entity being imported.
2010-02-12 10:53:54 +01:00

46 lines
1.8 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- These updates could be part resources-sample-mini.xml, but have been
extracted to an independent file for clarity (this way, by using the Web
user interface, one can see the effects of importing
resources-sample-mini.xml first, and then
resources-update-sample.xml). -->
<resource-list xmlns="http://rest.ws.navalplanner.org">
<!-- OK (change name, machineA-s1's start date, and machineA-a2's start
date). -->
<machine code="machineA" name="name UPDATED">
<criterion-satisfaction-list>
<criterion-satisfaction
code="machineA-s1"
start-date="2009-02-01"/>
</criterion-satisfaction-list>
<resources-cost-category-assignment-list>
<resources-cost-category-assignment
code="machineA-a2"
start-date="2000-02-01"/>
</resources-cost-category-assignment-list>
</machine>
<!-- OK (change first name, add one new criterion satisfaction and another
new one cost category assignment). -->
<worker code="workerA" first-name="workerA UPDATED">
<criterion-satisfaction-list>
<criterion-satisfaction
code="workerA-s3"
criterion-type-name="LEAVE"
criterion-name="paternityLeave"
start-date="2010-01-02"
end-date="2010-01-03"/>
</criterion-satisfaction-list>
<resources-cost-category-assignment-list>
<resources-cost-category-assignment
code="workerA-a3"
cost-category-name="TestCostCategory"
start-date="2000-05-01"
end-date="2000-06-01"/>
</resources-cost-category-assignment-list>
</worker>
</resource-list>