228 Commits

Author SHA1 Message Date
Derek Hulley
e31a8bf882 Merged V3.2 to HEAD
15586: Merged V3.1 to V3.2
      14863: Fixed ETHREEOH-2223: Oracle version-specific schema update failure in upgrading from 2.1A build to 3.1 build
      15041: Further fix for ETHREEOH-2223: Oracle version-specific schema update failure in upgrading from 2.1A build to 3.1 build
      15428: The ipAddress field of HibernateNodeDaoServiceImpl is 39 characters long (Transaction.hbm.xml modified)
      15472: Incremented schema version number for SQL patch
      15502: ETHREEOH-2292: Deployment failure in case of IPv6 on Win 2k8
             *NOTE*: Removed Derby scripts as it's no longer supported
   15588: (record only after Derby script removal) Fixed over-zelous move of Derby scripts
   15589: Removed hard-coded GUEST reference
___________________________________________________________________
Modified: svn:mergeinfo
   Merged /alfresco/BRANCHES/V3.1:r14863,15041,15428,15472,15502
   Merged /alfresco/BRANCHES/V3.2:r15586,15588-15589


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16863 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-10-13 13:02:56 +00:00
Derek Hulley
5365c3d6ef Removed audit result time ordering tests, which depends on millisecond accurancy
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16711 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-10-06 14:25:51 +00:00
Jan Vonka
174e22a9f2 Fix ALFCOM-3384 - unable to create WCM form-based content
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16706 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-10-06 10:18:29 +00:00
Derek Hulley
7bc361268d Fixed MOB-1656: Audit Log: Log ordering is incorrect for "Last N" results
- Added option to have results in either ascending or descending order
 - RM uses descending listings where the query results are limited


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16628 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-30 15:56:05 +00:00
Derek Hulley
5b8650fb4b Final fix for MOB-1609: Incorrect number of results returned from audit log
- When the query size is limited, the DB query returns only the audit entries
 - The audited properties are pulled back in batches


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16567 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-28 17:58:37 +00:00
Derek Hulley
ac71c4f7d7 Added multi-select for property values
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16542 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-27 20:57:47 +00:00
Derek Hulley
5f50bf11e7 Partial fix for MOB-1609: Incorrect number of results returned from audit log - size parameter is not correctly processed
- This will pull back the correct number if you request less than the total number of audit entries
 - TODO: You can still get N-1 entries if you request more than the total number of entries
 - TODO: Reverse order of limited queries (last N)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16518 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-25 12:09:38 +00:00
Derek Hulley
7c68847cb6 Wired AuditMethodInterceptor into new audit framework
- Two new repo properties to control auditing:
     audit.enabled=false
     audit.useNewConfig=false
 - Auditing was enabled by default, but it is not enabled any more!
   The property has to be set in alfresco-global.properties
 - Unit tests for auditing successful and failed authentication attempts


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16496 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-24 14:52:25 +00:00
Derek Hulley
f0b95093e6 Failure to read an audit entry logs a warning and skips the entry
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16467 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-23 17:18:08 +00:00
Derek Hulley
a48ac3deca Added method to delete multiple child contexts for unique property contexts
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16441 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-22 15:17:45 +00:00
Derek Hulley
3f18dafd2b Added conversion support for StoreRef-String conversion
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16433 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-22 12:49:36 +00:00
Derek Hulley
14515875c7 Added table and DAO: alf_prop_unique_ctx
- Ensure uniqueness across any three (incl. null) Serializable values
 - Required to support RM rma:identifier contextual uniqueness

DB Update for MySQL:

drop table if exists alf_prop_unique_ctx;
CREATE TABLE alf_prop_unique_ctx
(
   id BIGINT NOT NULL AUTO_INCREMENT,
   version SMALLINT NOT NULL,
   value1_prop_id BIGINT NOT NULL,
   value2_prop_id BIGINT NOT NULL,
   value3_prop_id BIGINT NOT NULL,
   UNIQUE INDEX idx_alf_prop_unique_ctx (value1_prop_id, value2_prop_id, value3_prop_id),
   CONSTRAINT fk_alf_prop_unique_ctx_1 FOREIGN KEY (value1_prop_id) REFERENCES alf_prop_value (id) ON DELETE CASCADE,
   CONSTRAINT fk_alf_prop_unique_ctx_2 FOREIGN KEY (value2_prop_id) REFERENCES alf_prop_value (id) ON DELETE CASCADE,
   CONSTRAINT fk_alf_prop_unique_ctx_3 FOREIGN KEY (value3_prop_id) REFERENCES alf_prop_value (id) ON DELETE CASCADE,
   PRIMARY KEY (id)
);

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16417 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-21 22:20:29 +00:00
Derek Hulley
ed3d9014f0 Merged V3.1 to HEAD
15963: Fix ETHREEOH-1962: Hibernate flush ordering incorrect for alf_qname
   - This merge will come from V3.2 15972 as well, but should not cause issues


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16389 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-20 19:10:08 +00:00
Derek Hulley
818791d88a Audit query extension: Search for audited data of any type
- Pulled out some of the query joins in favour of more cache hits


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16359 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-18 03:16:40 +00:00
Jan Vonka
45d25dcd7e iBatis boolean parameterization in AVM select queries (follow-on for r16347)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16353 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-17 17:14:00 +00:00
Derek Hulley
95bfde2d56 Changed 'version' column from TINYINT to SMALLINT
- Tables are 'alf_prop_root' and 'alf_audit_app'
 - Added property test to update past the SMALLINT rollover to test reversion to 0
 - To modify your tables (not absolutely necessary)
   alter table alf_audit_app modify version SMALLINT NOT NULL;
   alter table alf_prop_root modify version SMALLINT NOT NULL;


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16320 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-16 16:55:37 +00:00
Derek Hulley
cd7aff5703 Audit log clearing and related tests
- RM start(), stop() and clear() implemented


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16276 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-15 13:13:41 +00:00
Derek Hulley
2c33287ea3 Added 'enableAuditPath' and 'disableAuditPath'
- Various tests to see that the recorded data is changed
 - disabledPaths rely entirely on the property caching for fast retrieval


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16271 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-15 10:06:31 +00:00
Derek Hulley
b0aac65e9a Updates of root (unshared) properties are done via EntityLookupCache
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16269 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-15 10:03:18 +00:00
Derek Hulley
29b94cf0d7 Audit and Prop table enhancements
- alf_prop_xxx tables
   - Added alf_prop_root table
   - alf_prop_value_xxx tables enforce uniqueness
   - Better splitting up of Collections and Maps (attempt to use exact storage type)
   - Moved some indexes around to reduce size but maintain index data lookups
   - Allow updates and deletes of properties via alf_prop_root (entry-point table)
 - Audit Application
   - Unique by name
   - Add 'disabled paths' to control audit behaviour (not wired into services)
   - Added concurrency checks for updates to the Audit Application (model change, etc)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16217 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-11 13:59:45 +00:00
Derek Hulley
d2be2015e4 Wired up RM node-based audit results
- Fixed up some file formatting
 - Added List-based audit results for RM


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16146 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-08 15:08:02 +00:00
Jan Vonka
efb73c6e4c AVM DAO refactor - fix child entry name pattern match (+ missing test), also orphan reaper max limit
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16145 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-08 12:58:46 +00:00
Jan Vonka
efda84932f AVM DAO refactor - handle null bool
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16143 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-08 12:04:33 +00:00
Jan Vonka
c2cca0311b AVM DAO refactor
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16138 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-08 09:55:22 +00:00
Derek Hulley
bae58d6ee7 Added key-value audit query
- Currently supports lookups on string values (RM use-case)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16133 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-07 17:38:27 +00:00
Derek Hulley
fadc101ce4 Full resultset audit queries
- Use RollupRowHandler and nested ResultMap
 - Audit Map values are pulled back with entries


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16130 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-07 15:48:00 +00:00
Derek Hulley
4dc6006f1c Fixed usage of iBatis namespaces
- Turned namespacing on
 - Collapsed SqlMapConfig.xml files with the exception of that for activities, which uses a different datasource bean
 - Tried to use it and discovered a "feature": If any ID has a '.' in it, then it is assumed to be namespaced already ...
 - Fixed up all IDs for iBatis objects; replaced '.' with '_' except in our namespaces
 - Don't panic!  It's a find/replace job of ID strings.  Errors will be hard and fast, if there are any.  All DAO and activities tests run.
 - The AVM refactor will get some conflicts in the ibatis-context.xml
    - Either follow the same pattern and fix up the IDs, or
    - Keep a separate bean until some later time.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16106 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-05 10:59:01 +00:00
Derek Hulley
034027961d Audit queries
- Any combination of application (e.g. RM, repo, etc), user and time
 - TODO: Extend queries to support finding audit entries by arbitrary audited values
 - TODO: Full map retrieval in single query


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16086 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-04 00:34:28 +00:00
Derek Hulley
2cdc1777f9 Audit changes and fixes
- Removed notion of audit session
 - Removed 'scope' attribute for DataGenerator elements
 - Removed alf_audit_session table and replaced with alf_audit_app (see script)
 - DataGenerators are working properly


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16053 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-09-02 14:45:23 +00:00
Derek Hulley
200bf8d3a0 Added iBatis support for java.io.Serializable
- 'alf_prop_serializable_value' is working


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15993 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-29 00:47:25 +00:00
Derek Hulley
f0cd5ef0d8 Audit config, XSD and write-persistence tests
- Audit paths can now use mixed case (after alf_prop_string_value enhancements)
 - Pluggable data conversion when pushing values into persistence
 - Relaxed XSD to allow mixed-case key values
 - Regex checking of paths and names when building strings


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15976 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-27 16:16:05 +00:00
Derek Hulley
51a2ef5df3 alf_prop tables: Improvements to string-related queries and fix duplicate handling
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15946 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-27 05:24:09 +00:00
Derek Hulley
ef67ac777a AuditComponent implementation and fallout
- alf_prop_string_value now includes a CRC column and handles Oracle empty string issues
 - All property values are/must now be Serializable for auditing
 - Pushing data into audit is working


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15915 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-26 06:01:52 +00:00
Derek Hulley
00e2edb3de Fixed CrcHelper's derivation of the short string version
- The short string should always be lowercase


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15909 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-25 15:28:02 +00:00
Derek Hulley
442e1040d6 AuditComponent work for new auditing
- Pulled old AuditDAO methods into new AuditDAO interface
 - Combined AuditDAO implementations
 - First cut of high-level AuditSession creation
 - TODO: AuditSession data generation according to path


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15864 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-21 18:51:35 +00:00
Derek Hulley
00dfb8ee66 Audit session and bootstrap support
- Sessions are created using an application name (shared prop) and a persisted model ID
 - Added a bootstrap bean for audit that unmarshalls the models
 - Added hook points for repo-loading models, but won't implement yet


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15863 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-21 17:50:36 +00:00
Derek Hulley
33cb2a4d75 Better indexing for string properties to support path-based lookups
- Normal prefix-index has been shortened to 32 chars (from 64)
 - Added a fully indexed 'string_end' column of 16 characters
 - iBatis queries are optimized to pull short strings from the index
 - Long paths and NodeRefs are well-indexed using this approach


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15833 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-20 13:03:29 +00:00
Derek Hulley
528df9ef5f Audit DAO
- Audit config (alf_audit_cfg) now uses CRC check and persists via ContentService and alf_content_data
 - Reverted 3.3 references back to 3.2


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15805 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-19 02:30:42 +00:00
Derek Hulley
f00d441cae Nested collection (maps, sets, lists) property retrieval
- Single-shot query retrieves ordered view
 - MLText, HashMap and ArrayList currently supported


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15783 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-18 10:26:43 +00:00
Derek Hulley
5f8bfcae7a Support for searchable, arbitrarily-nested properties
- TODO: ID-based caching for entities that can't be found by value (e.g. maps, serializable)
 - TODO: Serializable table
 - TODO: Dedicated tests for node properties (QName-Serializable maps with nested MLText)


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15753 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-14 14:53:12 +00:00
Derek Hulley
fe4d547316 Further date property support (yyyy-mm-dd)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15666 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-11 04:56:29 +00:00
Derek Hulley
aeef3a5af8 Property DAO support for date (yyyy-mm-dd)
- Avoided nasty timezone issues by using Epoch millisecond time


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15665 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-10 19:08:23 +00:00
Derek Hulley
2401bfc93e More property DAO changes
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15652 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-10 09:33:20 +00:00
Derek Hulley
686ec6479b Further DAO for audit values
- General-purpose property persisting in searchable schema
 - TODO: More high volume tests for general values


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15556 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-08-03 17:59:05 +00:00
Dave Ward
0d6a176f8d Merged V3.2 to HEAD
15388: ETHREEOH-1872: Better debug logging in authentication components
      - Now each authentication component logs every step of the authentication process (including reason for failure) if you switch on debug logging for that component or the entire org.alfresco.repo.security.authentication package. E.g.
      log4j.logger.org.alfresco.repo.security.authentication.ldap.LDAPAuthenticationComponentImpl=debug
      log4j.logger.org.alfresco.repo.security.authentication.AuthenticationComponentImpl=debug
      log4j.logger.org.alfresco.repo.security.authentication=debug
   15196: Further LDAP sync performance improvements
      - Bunch user and group creations into small transactions (except for differential sync on login)
      - Run a differential sync on startup (so that bulk of users are not brought over on first login)
      - Can be disabled by synchronization.syncOnStartup property
   15135: Node creation / ACL performance improvements
      - When an ACL was set on a leaf node such as a person, redundant 'shared' ACLs were created for child nodes with getInheritedAccessControlList(), even though no child nodes existed.
      - Now setInheritanceForChildren() makes a 'lazy' call to getInheritedAccessControlList(), only when it realises there are child nodes
   15133: Changes to datasource definition for improved performance
      - Enable caching and reuse of prepared statements (by default 40 for each connection)
      - Removed custom-connection-pool-context.xml.sample and instead introduced complete property set into repository.properties
      - Updated v3.2 Wiki docs http://wiki.alfresco.com/wiki/Database_Configuration#Overriding_the_Database_Connection_Properties


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15439 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-07-28 10:12:16 +00:00
Derek Hulley
fc2e47a119 Support 'alf_prop_string_value'
- Simple ID-string table
 - Non-unique and case-sensitive, but with re-use of entries as far as possible


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15430 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-07-27 13:55:08 +00:00
Derek Hulley
20b602324c PropertyValueDAO and alf_prop_class implementation
- Contains patch that is incomplete i.e. future DAO unit tests won't work for incremental dev upgrades

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15405 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-07-25 03:23:04 +00:00
Dave Ward
57cd1bfd94 ALFCOM-3110: Groups added to sites became invisible to Share client
- Root groups are now those in the default zone that are not children of groups in the same zone

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@15051 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-07-01 11:39:37 +00:00
Kevin Roast
6763cfabc1 Merged V3.1 to HEAD
14955: Merged V2.2 to V3.1
      14352: Fixed ETWOTWO-1113: Creation date / modification date reset to current date during import
   14956: Fix for ETHREEOH-2198 and ALFCOM-2972
           - Thumbnail Service now allows creation of system managed thumbnails nodes by Consumer users or on Locked items
           - Explicit permission check to ensure user must at least be able to Read the original doc
           - Now correctly ensures that the 'modifier' properties are not updated on the original doc due to thumbnail generation

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14957 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-06-26 12:47:58 +00:00
Derek Hulley
f2a0a4f35e Fixed user usage tracking query
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14891 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
2009-06-24 12:51:07 +00:00