9 Commits

Author SHA1 Message Date
Matt Ward
3fab4ea0d6 ALF-7260: schema comparator - improved language of reporting.
The differences and validation messages are hopefully improved, e.g:

Difference: missing sequence from database, expected at path: .alf_acl_member_seq
Difference: missing table from database, expected at path: .alf_acl_change_set
Validation: index alfresco.some_table.idx_table_id.name="idx_table_id" fails to match rule: value must be 'xyz'

I'm sure there's still room for improvement but this should give a decent starting point.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32420 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-30 17:57:02 +00:00
Matt Ward
462994f3eb ALF-11668: Add position identifiers (same as seq elements in current schema dump tool)
As for current schemadump tool, table columns and primary key column names have order associated with them.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32296 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2011-11-24 18:17:41 +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
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
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