diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml
index 5490709328..36ce2a4cfd 100644
--- a/config/alfresco/bootstrap-context.xml
+++ b/config/alfresco/bootstrap-context.xml
@@ -167,26 +167,25 @@
-
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/avm-common-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/avm-common-SqlMap.xml
index d62d7d8963..2e80c24ece 100644
--- a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/avm-common-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/avm-common-SqlMap.xml
@@ -201,39 +201,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -288,12 +255,7 @@
insert into avm_version_layered_node_entry (version_root_id, md5sum, path)
values (#versionRootId#, #md5sum#, #path#)
-
-
- insert into avm_node_properties (actual_type_n, persisted_type_n, multi_valued, boolean_value, long_value, float_value, double_value, string_value, serializable_value, node_id, qname_id)
- values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
-
-
+
@@ -337,17 +299,20 @@
-
+
update
avm_stores
set
- next_version_id = ?,
- name = ?,
- current_root_id = ?,
- acl_id = ?,
- vers = ?
+ next_version_id = #nextVersion#,
+ name = #name#,
+ current_root_id = #rootNodeId#,
+ acl_id = #aclId#,
+ vers = #vers#
where
- id = ?
+ id = #id#
+
+ and vers = (#vers#-1)
+
@@ -391,7 +356,7 @@
join alf_namespace ns on (ns.id = qn.ns_id)
where
ns.uri like ? and
- upper(qn.local_name) like upper(?)
+ qn.local_name like ?
@@ -533,33 +498,36 @@
-
+
update
avm_nodes
set
- store_new_id = ?,
- acl_id = ?,
- layer_id = ?,
- version_id = ?,
- class_type = ?,
- deletedType = ?,
- owner = ?,
- modDate = ?,
- accessDate = ?,
- is_root = ?,
- lastModifier = ?,
- indirection = ?,
- indirection_version = ?,
- primary_indirection = ?,
- opacity = ?,
- content_url = ?,
- mime_type = ?,
- encoding = ?,
- length = ?,
- guid = ?,
- vers = ?
+ store_new_id = #storeNewId#,
+ acl_id = #aclId#,
+ layer_id = #layerId#,
+ version_id = #version#,
+ class_type = #classType#,
+ deletedType = #deletedType#,
+ owner = #owner#,
+ modDate = #modifiedDate#,
+ accessDate = #accessDate#,
+ is_root = #isRoot#,
+ lastModifier = #modifier#,
+ indirection = #indirection#,
+ indirection_version = #indirectionVersion#,
+ primary_indirection = #primaryIndirection#,
+ opacity = #opacity#,
+ content_url = #contentUrl#,
+ mime_type = #mimetype#,
+ encoding = #encoding#,
+ length = #length#,
+ guid = #guid#,
+ vers = #vers#
where
- id = ?
+ id = #id#
+
+ and vers = (#vers#-1)
+
diff --git a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/content-common-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/content-common-SqlMap.xml
index 819de19d62..18a322781b 100644
--- a/config/alfresco/ibatis/org.hibernate.dialect.Dialect/content-common-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.Dialect/content-common-SqlMap.xml
@@ -65,6 +65,14 @@
+
+
+
+
+
+
+
+
@@ -89,7 +97,7 @@
insert into alf_content_url (content_url, content_url_short, content_url_crc, content_size, orphan_time)
- values (#contentUrl#, #contentUrlShort#, #contentUrlCrc#, #size#, #orphanTime#)
+ values (?, ?, ?, ?, ?)
diff --git a/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/avm-insert-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/avm-insert-SqlMap.xml
index 417fa2ba1c..0093ca6644 100644
--- a/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/avm-insert-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/avm-insert-SqlMap.xml
@@ -34,4 +34,9 @@
+
+ insert into avm_node_properties (actual_type_n, persisted_type_n, multi_valued, boolean_value, long_value, float_value, double_value, string_value, serializable_value, node_id, qname_id)
+ values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
+
+
\ No newline at end of file
diff --git a/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/content-insert-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/content-insert-SqlMap.xml
index f95b056c4b..a37e1d6072 100644
--- a/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/content-insert-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.MySQLInnoDBDialect/content-insert-SqlMap.xml
@@ -20,7 +20,7 @@
-
+
KEY_COLUMN:GENERATED_KEY
diff --git a/config/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect/avm-insert-SqlMap.xml b/config/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect/avm-insert-SqlMap.xml
index 8684060d5c..4134760abe 100755
--- a/config/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect/avm-insert-SqlMap.xml
+++ b/config/alfresco/ibatis/org.hibernate.dialect.PostgreSQLDialect/avm-insert-SqlMap.xml
@@ -50,4 +50,9 @@
+
+ insert into avm_node_properties (actual_type_n, persisted_type_n, multi_valued, boolean_value, long_value, float_value, double_value, string_value, serializable_value, node_id, qname_id)
+ values (#actualType#, #persistedType#, #isMultiValued#, #booleanValue#, #longValue#, #floatValue#, #doubleValue#, #stringValue#, #serializableValue#, #nodeId#, #qnameId#)
+
+
\ No newline at end of file
diff --git a/config/alfresco/repo-admin-context.xml b/config/alfresco/repo-admin-context.xml
index c0a654aeda..2bc29b3671 100755
--- a/config/alfresco/repo-admin-context.xml
+++ b/config/alfresco/repo-admin-context.xml
@@ -12,7 +12,7 @@
-
+
@@ -41,7 +41,7 @@
-
+
@@ -50,18 +50,18 @@
/app:company_home/app:dictionary/app:models
- xpath
-
+ path
+
-
+
/app:company_home/app:dictionary/app:messages
- xpath
+ path
-
-
+
+
diff --git a/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java b/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java
index 6db749773f..c787c888b1 100644
--- a/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java
+++ b/source/java/org/alfresco/repo/content/cleanup/ContentStoreCleaner.java
@@ -269,6 +269,13 @@ public class ContentStoreCleaner
public void execute()
{
checkProperties();
+
+ // Bypass if the system is in read-only mode
+ if (transactionService.isReadOnly())
+ {
+ logger.debug("Content store cleanup bypassed; the system is read-only.");
+ return;
+ }
try
{
diff --git a/source/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java b/source/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java
index 989f4632cb..8000701055 100644
--- a/source/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java
+++ b/source/java/org/alfresco/repo/dictionary/DictionaryModelTypeTest.java
@@ -145,13 +145,11 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
this.dictionaryDAO = (DictionaryDAO)this.applicationContext.getBean("dictionaryDAO");
this.nodeService = (NodeService)this.applicationContext.getBean("NodeService");
- SearchService searchService = (SearchService)this.applicationContext.getBean("searchService");
TenantAdminService tenantAdminService = (TenantAdminService)this.applicationContext.getBean("tenantAdminService");
MessageService messageService = (MessageService)this.applicationContext.getBean("messageService");
DictionaryRepositoryBootstrap bootstrap = new DictionaryRepositoryBootstrap();
bootstrap.setContentService(this.contentService);
- bootstrap.setSearchService(searchService);
bootstrap.setDictionaryDAO(this.dictionaryDAO);
bootstrap.setTransactionService(this.transactionService);
bootstrap.setTenantAdminService(tenantAdminService);
@@ -162,8 +160,8 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
RepositoryLocation location = new RepositoryLocation();
location.setStoreProtocol(this.storeRef.getProtocol());
location.setStoreId(this.storeRef.getIdentifier());
- location.setQueryLanguage(SearchService.LANGUAGE_XPATH);
- // NOTE: we are not setting the path for now .. in doing so we are searching the whole store
+ location.setQueryLanguage(RepositoryLocation.LANGUAGE_PATH);
+ // NOTE: we are not setting the path for now .. in doing so we are searching the root node only
List locations = new ArrayList();
locations.add(location);
@@ -178,7 +176,7 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
* Test the creation of dictionary model nodes
*/
public void testCreateAndUpdateDictionaryModelNodeContent()
- {
+ {
try
{
// Check that the model has not yet been loaded into the dictionary
@@ -192,17 +190,17 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
// Check that the namespace is not yet in the namespace service
String uri = this.namespaceService.getNamespaceURI("test1");
- assertNull(uri);
+ assertNull(uri);
// Create a model node
PropertyMap properties = new PropertyMap(1);
properties.put(ContentModel.PROP_MODEL_ACTIVE, true);
final NodeRef modelNode = this.nodeService.createNode(
- this.rootNodeRef,
- ContentModel.ASSOC_CHILDREN,
+ this.rootNodeRef,
+ ContentModel.ASSOC_CHILDREN,
QName.createQName(NamespaceService.ALFRESCO_URI, "dictionaryModels"),
ContentModel.TYPE_DICTIONARY_MODEL,
- properties).getChildRef();
+ properties).getChildRef();
assertNotNull(modelNode);
// Add the model content to the model node
@@ -271,7 +269,7 @@ public class DictionaryModelTypeTest extends BaseAlfrescoSpringTest
transactionService.getRetryingTransactionHelper().doInTransaction(new RetryingTransactionCallback