25 Commits

Author SHA1 Message Date
Matt Ward
f495a69ba9 ALF-11591: Externalise diff/validation messages
system-messages.properties now contains log messages and diff/validation output messages.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32236 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-23 13:16:27 +00:00
Matt Ward
9be594eee2 ALF-11592: Post-upgrade differencing bug
Character data now handled correctly in XML parsing logic.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32200 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-22 17:59:24 +00:00
Matt Ward
d021543bce ALF-7260: schema validation: ensure outputting UTF-8 and Windows line endings.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32183 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-22 13:16:01 +00:00
Matt Ward
1e8d689de6 ALF-11414: Sequences must be exported/imported (not directly supported by DatabaseMetadata)
Supported by PostgreSQL - not yet verified against Oracle.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32161 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-21 18:26:32 +00:00
Matt Ward
b8ea34e7bb ALF-11519: changed ONLY_IN_LEFT to ONLY_IN_REFERENCE, ONLY_IN_RIGHT to ONLY_IN_TARGET
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32111 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-18 18:25:26 +00:00
Matt Ward
29dadc748a ALF-11518 and ALF-11519: unify separate validation/differences lists and move text generation to Result classes.
ALF-11518: Unify differences and validation results lists
ALF-11519: Move validation/diff result text generation from SchemaBootstrap to result classes.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32110 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-18 18:20:53 +00:00
Matt Ward
0369a9b3d0 ALF-11370: ExportDbTest expects particular/PostgreSQL schema
Now creates own test tables, indexes and sequence and runs export test against those (if running PostgreSQL).


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32022 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-16 15:00:58 +00:00
Matt Ward
f5b08ab073 ALF-11256: SchemaBootstrap must compare running schema against reference dump
Reference schemas (e.g. classpath:org/alfresco/util/schemacomp/reference/PostgreSQLDialect-Reference.xml) are loaded (if present) and the database is compared to that reference schema.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31991 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-15 15:03:22 +00:00
Matt Ward
3df35a9d06 ALF-10771: schema validation and differences rules
Validation serialized and deserialized in XML.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31942 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-14 16:25:49 +00:00
Matt Ward
4c863f5e0a ALF-10771: schema validation and differences rules
Laying some groundwork for the main code.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31921 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-14 10:16:59 +00:00
Matt Ward
4718c76929 Temporarily disabling test that only currently works on PostgreSQL.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31839 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-08 11:57:47 +00:00
Matt Ward
d41c381ac8 ALF-11255: schema dumper bugfix: added app context shutdown call.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31694 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-03 16:19:47 +00:00
Matt Ward
067e8fffac ALF-11255: Create tool to dump "reference" schemas to XML
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31650 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-02 18:36:02 +00:00
Matt Ward
68997e630a ALF-11030: Create object graph from real database schema
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31625 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-01 19:19:45 +00:00
Matt Ward
b7c32e2c92 ALF-11032: Load file in to object graph
Added facility to load an object graph from an XML input stream.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31568 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-31 15:14:45 +00:00
Paul Holmes-Higgin
e6ade9b51a Fix to compile error in r31548
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31551 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-29 01:49:14 +00:00
Matt Ward
2754a50ab9 ALF-11031: Persist object graph to file
Implemented so that the graph can actually be rendered to XML as a OutputStream, File, Writer.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31548 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-28 16:50:58 +00:00
Matt Ward
723fe98cf2 ALF-7260: schema comparator
* replace path/push/pop mechanism as it doesn't work well at reporting where differences/validation errors occur.
* add getParent() to DbObject - so that a path-style identifier can be deduced for a DbObject when needed
* add DbProperty to specify a specific DbObject's property and value -- acts as a schema location pointer
* refactored Result code (need difference result and validation error result)





git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31527 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-27 18:07:06 +00:00
Matt Ward
ec302df6ed ALF-10771: adding validation to schema compare tool
Added support to DbObjects to accept visitors
Added ValidatingVisitor to invoke suitable validator on each DbObject
Added NameValidator and NullValidator to operate on DbObject types
Added test suites



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31494 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-26 16:01:38 +00:00
Matt Ward
9b4cd0ab0e ALF-10771: DiffContext is now passed around to provide the DB Dialect.
Instead of the Differences being passed around on their own, the DiffContext is able to provide more information -- at present just the Dialect. The dialect can be used to change the way database objects are validated or differenced.





git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31466 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-25 16:03:31 +00:00
Matt Ward
4ef52e4e72 ALF-7260: unit tests, bug fixes.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31455 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-25 08:28:13 +00:00
Matt Ward
2a5a337b4e ALF-10772: schema comparator
Compares two abstract database schemas.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31312 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-18 11:42:57 +00:00
Derek Hulley
13be6ffd22 Added an empty test to stop JUnit from complaining
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31256 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-16 20:23:03 +00:00
Matt Ward
56868d7284 ALF-10770: accidentally checked in some placeholder code that doesn't compile - fixed.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31225 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-14 08:29:55 +00:00
Matt Ward
57fdad562d ALF-10770: create schema representation
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31224 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-10-14 08:08:12 +00:00