Commit graph

197 commits

Author SHA1 Message Date
Manuel Rego Casasnovas
d795fe6270 ItEr55S07AdaptacionServiciosRESTItEr54S09: Using a more human friendly code for CalendarExceptionType predefined entities. 2010-04-26 13:50:09 +02:00
Susana Montes Pedreira
fee8406e5e ItEr53S10AdaptacionServiciosRESTItEr52S10 : adds the import of calendars to the calendar service. 2010-04-13 11:15:15 +02:00
Manuel Rego Casasnovas
c4d60526c1 ItEr53S04ValidacionEProbasFuncionaisItEr52S04: Updated URL to navalplan.org for REST scripts. 2010-04-06 08:49:39 +02:00
Susana Montes Pedreira
3aeb9544e4 ItEr52S10AdaptacionServiciosRESTItEr51S10: Adapting of the material-categories-sample.xml 2010-03-26 18:57:31 +01:00
Susana Montes Pedreira
4126c6de43 ItEr52S10AdaptacionServiciosRESTItEr51S10: Creation and Adapting of UnitTypeServiceRest. 2010-03-26 17:58:49 +01:00
Susana Montes Pedreira
331837adf5 ItEr52S10AdaptacionServiciosRESTItEr51S10: Creation and Adapting of MaterialCategoryServiceRest. 2010-03-26 11:13:53 +01:00
Manuel Rego Casasnovas
fb3bd8bacf ItEr50S13AdaptacionServiciosRESTItEr49S18: Implementing calendars export service. 2010-03-22 16:39:34 +01:00
Manuel Rego Casasnovas
bafae1638a ItEr51S10AdaptacionServiciosRESTItEr50S13: Added export resources service. 2010-03-22 11:37:58 +01:00
Susana Montes Pedreira
daabf1ce4c ItEr50S13AdaptacionServiciosRESTItEr49S18 : Adapting of OrderServiceRest to GenericServiceRest. 2010-03-22 11:19:12 +01:00
Manuel Rego Casasnovas
2563ba73c6 ItEr50S13AdaptacionServiciosRESTItEr49S18: Creating web service for export CalendarExceptionType entities. 2010-03-16 14:08:04 +01:00
Susana Montes Pedreira
105a2f0169 ItEr50S13AdaptacionServiciosRESTItEr49S18 : Creation and Adapting of TypeOfWorkHoursServiceRest. 2010-03-15 16:06:49 +01:00
Susana Montes Pedreira
59b6776b8c ItEr50S13AdaptacionServiciosRESTItEr49S18 : Creation and Adapting of CostCategoryServiceRest to GenericServiceRest.
Important : it should be to add the column code to the table costcategory and the table hourcost.
2010-03-15 14:22:21 +01:00
Susana Montes Pedreira
4fe334f33c ItEr50S13AdaptacionServiciosRESTItEr49S18 : Adapting of WorkReportServiceRest to GenericServiceRest.
This patch should be applied after the following patches :
ItEr50S13AdaptacionServiciosRESTItEr49S18 : Adds class validations.
ItEr50S13AdaptacionServiciosRESTItEr49S18 : Refactoring the create way a work report line.

    It is need a work report to create a work report line , and now the work report line
    does not change its work report.
2010-03-15 10:56:38 +01:00
Jacobo Aragunde Pérez
928ce03f82 ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #365] Parse the strings in -business and append them to the keys file in -webapp. 2010-03-09 19:41:24 +01:00
Diego Pino Garcia
f5fc797267 ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #375] Error translating strings with HTML encoded characters in it 2010-03-09 19:30:27 +01:00
Susana Montes Pedreira
8f41cd5836 ItEr49S18AdaptacionServiciosREST: Fixes the LabelServiceREST. 2010-03-04 18:08:53 +01:00
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
Fernando Bellas Permuy
22c883820a ItEr47S12CUImportacionRecursosProductivosItEr46S13: ResourceServiceREST adapted to GenericRESTService and added support for recoverable errors.
ResourceServiceREST has been adapted to GenericRESTService. Updating functionality in ResourceServiceREST is not implemented yet.

As part of this patch, the generic infraestructure for REST services has been improved. In particular, recoverable error support has been provided. Exceptions representing recoverable errors must extend from RecoverableErrorException. To demonstrate this capability, ResourceServiceREST nows reports non-existent calendars, criterions, critetion types, and cost categories as recoverable errors.
2010-02-10 13:09:28 +01:00
Fernando Bellas Permuy
571f814b64 ItEr46S13CUImportacionRecursosProductivosItEr45S11: code added to entities imported by ResourceService.
IMPORTANT: "code" column has been added to tables of the following entitites: Resource, CriterionSatisfaction, and ResourcesCostCategoryAssignment. "code" column has been removed from Machine's table. In consequence, it is better to remove all the database when applying this patch (navaldev, navaldevtest, navalprod, and navaprodtest).

This change is compatible with the current Web user interface. The only thing you will notice is that when creating a machine, the form containing the code automatically displays a value in the code field (which, of course, can be changed by the user). Of course, the user interface should be improved to set a blank value or propose a more meaningful code to the user (probably this second option).

The service has not been adpated to GenericRESTService yet and duplicate codes in resources *being* imported are not detected yet (GenericRESTService will make this automatically).
2010-02-05 18:27:01 +01:00
Fernando Bellas Permuy
16b87de8ed ItEr46S13CUImportacionRecursosProductivosItEr45S11: First version of the generic REST service and CriterionServiceREST reimplemented in terms of it.
GenericRESTService provides initial common functionality to all services. Some another generic infraestructure has been improved (IntegrationEntity,  IIntegrationEntityDAO, InstanceConstraintViolationsDTO, and ConstraintViolationConverter) or simplified (IntegrationEntityDTO).

GenericRESTService does not implement all desirable features yet (e.g. recoverable errors). Please, do not use it yet.

CriterionServiceREST has been reimplemented in terms of it. Tests have also been improved.
2010-02-05 12:25:36 +01:00
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
Manuel Rego Casasnovas
dfc91a2577 ItEr45S23CUImportacionTiposEtiquetasEEtiquetas: Removed labels information from example XMLs, because of it is needed that labels exists on database before make the import of the order. 2010-01-28 14:09:05 +01:00
Manuel Rego Casasnovas
381f339440 ItEr45S17CUServizoExportacionHoras: Added script to test the new service to export resource hours from command line. 2010-01-26 20:29:10 +01:00
Fernando Bellas Permuy
1091ede3ca ItEr44S17CUImportacionRecursosProductivosItEr43S08: First version of migration of criterion REST service to the new semantics of POST.
IMPORTANT: CriterionType and Criterion tables must be removed because they now need "code" column with non-null values. Any row in any other table refering to CriterionType and Criterion instances must also probably be removed. In consequence, it is probably better to remove all databases (navaldev, navaldevtest, navalprod and navalprodtest).

This first version does not implement updates yet (only insertions) and does not detect repeated codes in the entities being imported (repeated codes in database are detected). "code" attribute has now been added to entities, and "num-instance" + "code" + "entity-type" attribute has been added to InstanceConstraintViolationsDTO.

This effort has been implemented creating reusable classes (to facilitate migration of the rest of services) and with a non-invasive approach (to make possible migrate each service individually and minimize the number of changes to the current code [specially testing code]).

Some existing methods/attributes in existing reusable classes (e.g. Util, InstanceConstraintViolationsDTO) have been deprecated (to support migration of services incrementally) and new ones have been implemented.

New reusables clases have been implemented: IntegrationEntity (all entities used in application integration must extend from this one), IIntegrationEntityDAO, IntegrationEntityDAO, InstanceConstraintViolationsDTOId (identifier for an instance causing a list of constraint violations), and IntegrationEntityDTO (all entity DTOs must extend from this one). Please, have a look to the JavaDoc of such classes.
2010-01-25 11:27:43 +01:00
Fernando Bellas Permuy
3f75fb7666 ItEr43S08CUImportacionRecursosProductivosItEr42S12: One example more added to resources-sample.xml.
It illustrates an error when trying to add a resource with overlapping criterions satisfactions refering to the same criterion (even though its criterion type allows simultaneous criterion satisfactions). This case was already illustrated as a test case in ResourceServiceTest.
2010-01-15 11:25:06 +01:00
Fernando Bellas Permuy
f04de2d768 ItEr43S08CUImportacionRecursosProductivosItEr42S12: Added support for detecting overlapping in criterion satisfactions when importing resources.
Please note that criterion satisfaction overlapping means: (1) if criterion satisfactions refer to the same Criterion, they must not overlap (regardless of its CriterionType allows simultaneous criterion satisfactions per resource), and (2) if CriterionType does not allow simultaneous criterion satisfactions per resource, criterion satisfactions (of the same type) must not overlap (regardless of they refer to different Criterion objects).
2010-01-15 11:25:06 +01:00
Fernando Bellas Permuy
56337460f9 ItEr43S08CUImportacionRecursosProductivosItEr42S12: checkConstraintPositiveTimeInterval added to CriterionSatisfaction.
This constraint checks that interval of a CriterionSatisfaction is positive. A test case has also been provided.
2010-01-14 18:30:58 +01:00
Fernando Bellas Permuy
b9fae80d22 ItEr43S05ValidacionEProbasFuncionaisItEr42S05: Minor improvements to criterion REST service.
The following improvements have been implemented: (1) criterion type and criterion names are trimmed with StringUtils.trim, (2) case is ignored for criterion type and criterion names, (3) just one constraint violation is reported for a criterion type with a name already used by another criterion type being imported, (4) CriterionType::checkConstraintNonRepeatedCriterionNames now discards criterions with names fulfilling StringUtils.isBlank(criterionName), (5) Criterion::createUnvalidated and CriterionType::createUnvalidated now use BaseEntity::create (to avoid to call setNewObject and other possible future actions), and (6) assertTrue/assertFalse JUnit methods in CriterionServiceTest now make use of the toString method provided by constraint violations related DTOs (to make debugging easier).
2010-01-14 18:02:59 +01:00
Manuel Rego Casasnovas
6df3a08603 ItEr43S09ImplantacionAplicacionItEr42S13: Added script to get XML Schema of web services. 2010-01-13 14:04:54 +01:00
Fernando Bellas Permuy
d9f0a0ee51 ItEr42S12CUImportacionRecursosProductivosItEr41S15: Support for importing resources with cost assignments.
Support for importing resources with cost assignments has been implemented. Many test cases have been implemented for checking all constraint violations in cost assigments (special care has been taken to check time interval overlappings). toString method has been implemented in constraint violation related DTOs to facilitate debuging in testing.
2010-01-09 18:57:56 +01:00
Fernando Bellas Permuy
3f67d4aad5 ItEr42S12CUImportacionRecursosProductivosItEr41S15: Calendar-specification support for resources being imported.
Resources to be imported can now specify a calendar name. Each resource will have a derived calendar of the specified one. Furthermore, test cases have been implemented for the most common cases (calendar not specified -> use default calendar, calendar specified, and non-existent calendar).
2010-01-07 16:47:28 +01:00
Fernando Bellas Permuy
1a12344ce5 ItEr42S12CUImportacionRecursosProductivosItEr41S15: Detection of resoures with hthe same "logical" name among the resources being imported.
Resources with the same "logical" name (code for machines; first name, surnamne, and nif for workers) among the list of resources *being imported* are detected. This detection must be implemented at the service-level (at the entity-level, @AssertTrue annotations in Machine and Worker detect importation of resources with the same logical name as other resources already existing in the *database*). A test case has been added (furthermore, ResourceServiceTest has been refactorized a little bit).
2010-01-07 16:45:05 +01:00
Fernando Bellas Permuy
ae52e31f17 ItEr41S15CUImportacionRecursosProductivosItEr40S20: Test case added to check criterion and criterion type names when importing resources.
Test case added to check criterion and criterion type names when importing resources.
2010-01-03 13:19:40 +01:00
Fernando Bellas Permuy
77a236a5e8 ItEr41S15CUImportacionRecursosProductivosItEr40S20: Constraint added to verify criterion satisfactions are of a CriterionType compatible with the resource
--
Fernando Bellas Permuy

Associate Professor (Titular) at University of A Coruña
Department of Information and Communications Technologies
Facultad de Informática - Campus de Elviña, S/N
15071 - A Coruña - Spain
http://www.tic.udc.es/~fbellas - fbellas@udc.es
Tel: +34 981 167 000 (ext: 1353) - Fax: +34 981 167 160

>From c9af4778e28e370fb2a8dc2c63a4d75e41a07d7f Mon Sep 17 00:00:00 2001
From: Fernando Bellas Permuy <fbellas@udc.es>
Date: Thu, 31 Dec 2009 13:14:28 +0100
Subject: [PATCH 6/7] ItEr41S15CUImportacionRecursosProductivosItEr40S20: Constraint added to verify criterion satisfactions are of a CriterionType compatible with the resource.

A test case has also been added.
2010-01-03 13:19:36 +01:00
Fernando Bellas Permuy
523aa46263 ItEr41S15CUImportacionRecursosProductivosItEr40S20: Resource validations propagaged to CriterionSatisfactions.
@Valid has been specified in Resource::getCriterionSatisfactions. A test case has been added to verify a validation constraint is generated when a resource containing a criterion satisfaction without start date is being imported with the REST service (@Valid annotation is necessary).
2010-01-03 13:19:25 +01:00
Fernando Bellas Permuy
746ce17bf1 ItEr41S15CUImportacionRecursosProductivosItEr40S20: String fields when importing resources are trimmed.
String fields when importing resources are trimmed.
2010-01-03 13:19:21 +01:00
Fernando Bellas Permuy
ec0da2601e ItEr41S15CUImportacionRecursosProductivosItEr40S20: Bug fixed when firstName, surname or nif are null in a worker to be imported with the REST service.
Bug fixed when firstName, surname or nif are null in a worker to be imported with the REST service. Now, Worker::checkConstraintUniqueFirstName checks if such fields are null.
2010-01-03 13:19:19 +01:00
Manuel Rego Casasnovas
ef4bedfab9 ItEr41S16ImplantacionAplicacionItEr40S21: Added scripts for order elements service. 2010-01-02 12:58:45 +01:00
Fernando Bellas Permuy
ed5c0976d2 ItEr40S20CUImportacionRecursosProductivosItEr39S23: Added support for importing resources containing criterion satisfactions.
Added support for importing resources containing criterion satisfactions. Complex validations are not implemented yet.
2009-12-29 17:13:12 +01:00
Fernando Bellas Permuy
a01c1fa5b3 ItEr40S20CUImportacionRecursosProductivosItEr39S23: REST service for importing resources exported remotely.
REST service for importing resources has been exported remotely. A script and a sample file with resources is also provided. Complex validations are not implemented yet.
2009-12-29 17:13:12 +01:00
Fernando Bellas Permuy
6f2754ae56 ItEr40S20CUImportacionRecursosProductivosItEr39S23: get-*.sh and post-*.sh REST scripts have been renamed to export-*.sh and import-*.sh, respectively.
get-*.sh and post-*.sh REST scripts have been renamed to export-*.sh and import-*.sh, respectively.
2009-12-29 17:13:12 +01:00
Fernando Bellas Permuy
e4d9fa0e01 ItEr40S20CUImportacionRecursosProductivosItEr39S23: "scripts/rest-clients" folder has been created with initial scripts for REST clients.
The new foler includes a README file (please, update it when adding new scripts), common scripts (base64.sh and rest-common-env.sh), two scripts (post-criterions-types.sh and get-criterion-types.sh) for importing/exporting criterion types, and a sample file (criterion-types-sample.xml) with criterion types to be imported.
2009-12-23 13:53:13 +01:00
Diego Pino Garcia
b95801945e ItEr37S06ValidacionEProbasFuncionaisItEr36S07: [Bug #113] Convert absolute paths to relative paths in keys.pot and locales.po files 2009-12-03 16:26:46 +01:00
Diego Pino Garcia
5ef7213a42 ItEr34S15ArquitecturaServidorItEr33S13: Added script for generating all keys.pot files in all submodules 2009-11-16 11:05:26 +01:00
Diego Pino Garcia
ac95d0031b ItEr34S15ArquitecturaServidorItEr33S13: Added gettext-keys-generator.pl script (accidentally deleted in previous commit) 2009-11-16 11:03:17 +01:00
Diego Pino Garcia
cbf68b47f3 ItEr33S13ArquitecturaServidorItEr32S16: Add --java option to gettext script for parsing annotations messages using hibernate validator.
Moved the script from navalplanner-webapp/script to scripts/ directory.
2009-11-10 12:10:13 +01:00
Jose Maria Casanova Crespo
1397ef2da5 ItEr32S13ImplantacionAplicacionItEr31S16: Update scripts and installation howtos 2009-10-28 22:16:08 +01:00