Fixed orders service examples and documentation.
FEA: ItEr60S04ValidacionEProbasFuncionaisItEr59S04
This commit is contained in:
parent
53d22d9af4
commit
4d5342464b
8 changed files with 17 additions and 87 deletions
|
|
@ -954,7 +954,7 @@ Exemplo de ficheiro de importación
|
|||
<indirect-criterion-requirement code="20" is-valid="true"/>
|
||||
</criterion-requirements>
|
||||
<hours-group-list>
|
||||
<hours-group code="HG-1" working-hours="2000" resource-type="WORKER" >
|
||||
<hours-group code="HG-2" working-hours="2000" resource-type="WORKER" >
|
||||
<criterion-requirements>
|
||||
<indirect-criterion-requirement code="10" is-valid="true"/>
|
||||
<indirect-criterion-requirement code="20" is-valid="true"/>
|
||||
|
|
@ -977,7 +977,7 @@ Exemplo de ficheiro de importación
|
|||
<label name="medium" type="risk" />
|
||||
</labels>
|
||||
<hours-group-list>
|
||||
<hours-group code="HG-1" working-hours="1500" resource-type="WORKER">
|
||||
<hours-group code="HG-3" working-hours="1500" resource-type="WORKER">
|
||||
<criterion-requirements>
|
||||
<indirect-criterion-requirement code="10" is-valid="true"/>
|
||||
<indirect-criterion-requirement code="20" is-valid="true" />
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./rest-common-env.sh
|
||||
|
||||
printf "Login name: "
|
||||
read loginName
|
||||
printf "Password: "
|
||||
read password
|
||||
|
||||
baseServiceURL=$DEVELOPMENT_BASE_SERVICE_URL
|
||||
certificate=$DEVELOPMENT_CERTIFICATE
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
if [ "$i" = "--prod" ]; then
|
||||
baseServiceURL=$PRODUCTION_BASE_SERVICE_URL
|
||||
certificate=$PRODUCTION_CERTIFICATE
|
||||
else
|
||||
file=$i
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$file" = "" ]; then
|
||||
printf "Missing file\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
authorization=`./base64.sh $loginName:$password`
|
||||
|
||||
curl -sv -X POST $certificate -d @$file \
|
||||
--header "Content-type: application/xml" \
|
||||
--header "Authorization: Basic $authorization" \
|
||||
$baseServiceURL/orderelements/ | tidy -xml -i -q -utf8
|
||||
|
|
@ -16,14 +16,14 @@
|
|||
</order-line>
|
||||
<order-line code="ORDER-1-OE-1-2" name="Order element 1.2">
|
||||
<hours-groups>
|
||||
<hours-group code="HG-1" working-hours="2000" resource-type="WORKER" />
|
||||
<hours-group code="HG-2" working-hours="2000" resource-type="WORKER" />
|
||||
</hours-groups>
|
||||
</order-line>
|
||||
</children>
|
||||
</order-line-group>
|
||||
<order-line code="ORDER-1-OE-2" name="Order element 2">
|
||||
<hours-groups>
|
||||
<hours-group code="HG-1" working-hours="1500" resource-type="WORKER" />
|
||||
<hours-group code="HG-3" working-hours="1500" resource-type="WORKER" />
|
||||
</hours-groups>
|
||||
</order-line>
|
||||
</children>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
<order-list xmlns="http://rest.ws.navalplanner.org">
|
||||
<order xmlns="http://rest.ws.navalplanner.org"
|
||||
code="ORDER-1" name="Order" init-date="2010-01-01">
|
||||
code="ORDER-1" name="Order UPDATED" init-date="2010-01-01">
|
||||
<children>
|
||||
<order-line-group code="ORDER-1-OE-1" name="Order element 1">
|
||||
<children>
|
||||
|
|
@ -13,14 +13,14 @@
|
|||
</order-line>
|
||||
<order-line code="ORDER-1-OE-1-2" name="Order element 1.2">
|
||||
<hours-groups>
|
||||
<hours-group code="HG-1" working-hours="2500" resource-type="WORKER" />
|
||||
<hours-group code="HG-2" working-hours="2500" resource-type="WORKER" />
|
||||
</hours-groups>
|
||||
</order-line>
|
||||
</children>
|
||||
</order-line-group>
|
||||
<order-line code="ORDER-1-OE-2" name="Order element 2">
|
||||
<hours-groups>
|
||||
<hours-group code="HG-1" working-hours="1500" resource-type="WORKER" />
|
||||
<hours-group code="HG-3" working-hours="1500" resource-type="WORKER" />
|
||||
</hours-groups>
|
||||
</order-line>
|
||||
</children>
|
||||
|
|
|
|||
|
|
@ -6,42 +6,38 @@
|
|||
init-date="2010-03-15T10:22:24.251+01:00" name="Pedido A"
|
||||
code="PREFIX-00019">
|
||||
<labels>
|
||||
<label code="458ade05-dc8c-4678-a28a-50b883415d99" />
|
||||
<label code="b2b9cdee-2785-4c03-8e01-cec0a93b61aa" />
|
||||
</labels>
|
||||
<material-assignments>
|
||||
<material-assignment estimated-availability="2010-03-15T10:22:24.251+01:00"
|
||||
unit-price="5.00" units="0.0" material-code="4141" />
|
||||
</material-assignments>
|
||||
<advance-measurements>
|
||||
<advance-measurement value="0"
|
||||
<advance-measurement value="10"
|
||||
date="2010-03-15T00:00:00+01:00" />
|
||||
</advance-measurements>
|
||||
<criterion-requirements>
|
||||
<direct-criterion-requirement type="LeaveAAKjflasfj"
|
||||
name="CriterioB" />
|
||||
<direct-criterion-requirement type="LEAVE"
|
||||
name="medicalLeave" />
|
||||
</criterion-requirements>
|
||||
<children>
|
||||
<order-line name="orderline A2" code="PREFIX-00019-00002">
|
||||
<labels />
|
||||
<material-assignments />
|
||||
<advance-measurements>
|
||||
<advance-measurement value="0.00"
|
||||
date="2010-03-15T00:00:00+01:00" />
|
||||
</advance-measurements>
|
||||
<criterion-requirements>
|
||||
<direct-criterion-requirement type="LeaveAAKjflasfj"
|
||||
name="CriterioA" />
|
||||
<direct-criterion-requirement type="LEAVE"
|
||||
name="paternityLeave" />
|
||||
<indirect-criterion-requirement valid="true"
|
||||
type="LeaveAAKjflasfj" name="CriterioB" />
|
||||
type="LEAVE" name="medicalLeave" />
|
||||
</criterion-requirements>
|
||||
<hours-groups>
|
||||
<hours-group working-hours="0" resource-type="WORKER"
|
||||
code="PREFIX-00019-00001-00001">
|
||||
<criterion-requirements>
|
||||
<indirect-criterion-requirement valid="true"
|
||||
type="LeaveAAKjflasfj" name="CriterioB" />
|
||||
type="LEAVE" name="medicalLeave" />
|
||||
<indirect-criterion-requirement valid="true"
|
||||
type="LeaveAAKjflasfj" name="CriterioA" />
|
||||
type="LEAVE" name="paternityLeave" />
|
||||
</criterion-requirements>
|
||||
</hours-group>
|
||||
</hours-groups>
|
||||
|
|
@ -54,7 +50,7 @@
|
|||
init-date="2010-03-15T10:22:24.251+01:00" name="Pedido BBB"
|
||||
code="PREFIX-00022">
|
||||
<labels>
|
||||
<label code="458ade05-dc8c-4678-a28a-50b883415d99" />
|
||||
<label code="b2b9cdee-2785-4c03-8e01-cec0a93b61xt" />
|
||||
</labels>
|
||||
<material-assignments>
|
||||
<material-assignment estimated-availability="2010-03-15T10:22:24.251+01:00"
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
. ./rest-common-env.sh
|
||||
|
||||
printf "Login name: "
|
||||
read loginName
|
||||
printf "Password: "
|
||||
read password
|
||||
|
||||
baseServiceURL=$DEVELOPMENT_BASE_SERVICE_URL
|
||||
certificate=$DEVELOPMENT_CERTIFICATE
|
||||
|
||||
for i in "$@"
|
||||
do
|
||||
if [ "$i" = "--prod" ]; then
|
||||
baseServiceURL=$PRODUCTION_BASE_SERVICE_URL
|
||||
certificate=$PRODUCTION_CERTIFICATE
|
||||
else
|
||||
file=$i
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$file" = "" ]; then
|
||||
printf "Missing file\n" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
authorization=`./base64.sh $loginName:$password`
|
||||
|
||||
curl -sv -X PUT $certificate -d @$file \
|
||||
--header "Content-type: application/xml" \
|
||||
--header "Authorization: Basic $authorization" \
|
||||
$baseServiceURL/orderelements/ | tidy -xml -i -q -utf8
|
||||
Loading…
Add table
Reference in a new issue