diff --git a/config/alfresco/messages/action-service_it.properties b/config/alfresco/messages/action-service_it.properties
index 72f8707d1a..2a74475db3 100755
--- a/config/alfresco/messages/action-service_it.properties
+++ b/config/alfresco/messages/action-service_it.properties
@@ -1,9 +1,9 @@
# Action service externalised display strings
-compare_property_value_evaluator.invalid_operation=L'operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 di tipo {1}.
+compare_property_value_evaluator.invalid_operation=L''operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 di tipo {1}.
compare_property_value_evaluator.no_content_property=Per un confronto con una propriet\u00e0 di tipo contenuto, \u00e8 necessario specificare una propriet\u00e0 di contenuto.
-numeric_property_value_comparator.invalid_operation=L'operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 numerica.
-text_property_value_comparator.invalid_operation=L'operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 di testo.
-date_property_value_comparator.invalid_operation=L'operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 di data.
+numeric_property_value_comparator.invalid_operation=L''operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 numerica.
+text_property_value_comparator.invalid_operation=L''operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 di testo.
+date_property_value_comparator.invalid_operation=L''operazione {0} non pu\u00f2 essere applicata a una propriet\u00e0 di data.
compare_mime_type_evaluator.not_a_content_type=Impossibile confrontare il mimetype perch\u00e9 la propriet\u00e0 specificata non \u00e8 di tipo contenuto.
compare_mime_type_evaluator.no_property_definition_found=Impossibile confrontare il mimetype perch\u00e9 non \u00e8 stata trovata alcuna definizione per la propriet\u00e0 specificata.
diff --git a/config/alfresco/messages/email-service_fr.properties b/config/alfresco/messages/email-service_fr.properties
index d919467393..ca5133a630 100755
--- a/config/alfresco/messages/email-service_fr.properties
+++ b/config/alfresco/messages/email-service_fr.properties
@@ -19,6 +19,6 @@ email.server.err.no_to_address=Aucune adresse 'to' n'est sp\u00e9cifi\u00e9e pou
email.server.err.extracting_subject=Impossible d''extraire l''objet du message\u00a0: {0}
email.server.err.extracting_sent_date=Impossible d''extraire la date ''sent on''\u00a0: {0}
email.server.err.parse_message=Impossible d''analyser l''E-mail\u00a0: {0}
-email.server.err.usupported_encoding=L'encodage ''{0}'' n''est pas pris en charge
+email.server.err.usupported_encoding=L''encodage ''{0}'' n''est pas pris en charge
email.server.err.failed_to_read_content_stream=Impossible de lire le contenu partiel du message\u00a0: {0}
email.server.err.incorrect_message_part=Partie incorrecte du message\u00a0: {0}
diff --git a/config/alfresco/messages/email-service_it.properties b/config/alfresco/messages/email-service_it.properties
index c5cd1b375f..592553b7ef 100755
--- a/config/alfresco/messages/email-service_it.properties
+++ b/config/alfresco/messages/email-service_it.properties
@@ -1,22 +1,22 @@
email.server.msg.received_by_smtp=Ricevuto tramite SMTP da ''{0}''.
email.server.msg.default_subject=E-mail-{0}
-email.server.err.sender_blocked=''{0}'' a \u00e8 stato negato l'accesso.
+email.server.err.sender_blocked=''{0}'' a \u00e8 stato negato l''accesso.
email.server.err.inbound_mail_disabled=Il server Alfresco non \u00e8 configurato in modo da accettare e-mail in arrivo.
-email.server.err.access_denied=''{0}'' a \u00e8 stato negato l'accesso per ''{1}''.
-email.server.err.invalid_subject=La riga dell'oggetto deve contenere un nome di file valido.
-email.server.err.unknown_source_address=L'indirizzo e-mail del mittente non \u00e8 stato riconosciuto: {0}.
-email.server.err.user_not_email_contributor=L'utente ''{0}'' non fa parte del gruppo di contributori ai messaggi e-mail.
+email.server.err.access_denied=''{0}'' a \u00e8 stato negato l''accesso per ''{1}''.
+email.server.err.invalid_subject=La riga dell''oggetto deve contenere un nome di file valido.
+email.server.err.unknown_source_address=L''indirizzo e-mail del mittente non \u00e8 stato riconosciuto: {0}.
+email.server.err.user_not_email_contributor=L''utente ''{0}'' non fa parte del gruppo di contributori ai messaggi e-mail.
email.server.err.no_email_contributor_group=Il gruppo di contributori ai messaggi e-mail non esiste.
-email.server.err.invalid_node_address=L'indirizzo e-mail ''{0}'' non referenzia un nodo accessibile valido.
+email.server.err.invalid_node_address=L''indirizzo e-mail ''{0}'' non referenzia un nodo accessibile valido.
email.server.err.handler_not_found=Impossibile trovare il gestore dei messaggi e-mail per il tipo di nodo ''{0}''.
email.server.err.mail_read_error=Si \u00e8 verificato un errore durante la lettura del messaggio e-mail: {0}
email.server.err.failed_to_create_mime_message=Impossibile creare il messaggio MIME dal flusso di input: {0}
-email.server.err.extracting_from_address=Impossibile estrarre l'indirizzo del mittente: {0}
+email.server.err.extracting_from_address=Impossibile estrarre l''indirizzo del mittente: {0}
email.server.err.no_from_address=Il messaggio non contiene un indirizzo del mittente:
email.server.err.extracting_to_address=Impossibile estrarre l'indirizzo del destinatario: {0}
email.server.err.no_to_address=Il messaggio non contiene un indirizzo del destinatario.
-email.server.err.extracting_subject=Impossibile estrarre l'oggetto del messaggio: {0}
+email.server.err.extracting_subject=Impossibile estrarre l''oggetto del messaggio: {0}
email.server.err.extracting_sent_date=Impossibile estrarre la data di invio: {0}
email.server.err.parse_message=Impossibile analizzare il messaggio e-mail: {0}
email.server.err.usupported_encoding=La codifica ''{0}'' non \u00e8 supportata
diff --git a/config/alfresco/messages/invitation-service_it.properties b/config/alfresco/messages/invitation-service_it.properties
index f17dc74281..2f0f2a0d96 100755
--- a/config/alfresco/messages/invitation-service_it.properties
+++ b/config/alfresco/messages/invitation-service_it.properties
@@ -8,7 +8,7 @@ invitation.error.invalid_inviteId_format="Il formato dell''ID di invito non \u00
invitation.invite.already_member="L''utente, {0} \u00e8 gi\u00e0 un membro di {1} e non pu\u00f2 essere invitato di nuovo"
invitation.cancel.not_site_manager="L''utente attuale, {0}, non pu\u00f2 annullare l''invito: {1} perch\u00e9 non \u00e8 un manager del sito: {2}"
invitation.invite.not_site_manager="L''utente attuale, {0}, non \u00e8 un manager del sito: {1}"
-invitation.invite.unable_generate_id="Impossibile generare per l'invitato un nome, utente che non appartiene gi\u00e0 a un altro utente firstName:{0} lastName:{1} email:{2}"
+invitation.invite.unable_generate_id="Impossibile generare per l''invitato un nome utente che non appartenga gi\u00e0 a un altro utente nome:{0} cognome:{1} email:{2}"
invitation.invite.already_finished="L''invito, {0} \u00e8 gi\u00e0 stato accettato, annullato o respinto"
invitation.invite.authentication_chain="La catena di autenticazione non consente la creazione di nuovi account"
diff --git a/config/alfresco/messages/lock-service_it.properties b/config/alfresco/messages/lock-service_it.properties
index 217882fce8..96944d9faf 100755
--- a/config/alfresco/messages/lock-service_it.properties
+++ b/config/alfresco/messages/lock-service_it.properties
@@ -2,5 +2,5 @@
lock_service.insufficent_privileges=Privilegi insufficienti per rilasciare il blocco del nodo (id: {0}). Il nodo \u00e8 bloccato da un altro utente.
lock_service.node_locked=Impossibile bloccare il nodo (id: {0}) perch\u00e9 \u00e8 gi\u00e0 bloccato da un altro utente.
-lock_service.no_op=Impossibile eseguire l'operazione perch\u00e9 il nodo (id:{0}) \u00e8 bloccato.
-lock_service.no_op2=Impossibile eseguire l'operazione {0} perch\u00e9 il nodo (id:{1}) \u00e8 bloccato.
+lock_service.no_op=Impossibile eseguire l''operazione perch\u00e9 il nodo (id:{0}) \u00e8 bloccato.
+lock_service.no_op2=Impossibile eseguire l''operazione {0} perch\u00e9 il nodo (id:{1}) \u00e8 bloccato.
diff --git a/config/alfresco/messages/template-service_it.properties b/config/alfresco/messages/template-service_it.properties
index 446ffcdbf0..8f389bf7c4 100755
--- a/config/alfresco/messages/template-service_it.properties
+++ b/config/alfresco/messages/template-service_it.properties
@@ -1,5 +1,5 @@
# Template Service externalised display strings
-error_no_template=Impossibile trovare il modello ''{0}''. Contattare l'amministratore di sistema.
-error_template_fail=Errore durante l'elaborazione del modello ''{0}''. Contattare l'amministratore di sistema.
-error_template_io=Errore di IO durante l'elaborazione del modello ''{0}''. Contattare l'amministratore di sistema.
+error_no_template=Impossibile trovare il modello ''{0}''. Contattare l''amministratore di sistema.
+error_template_fail=Errore durante l''elaborazione del modello ''{0}''. Contattare l''amministratore di sistema.
+error_template_io=Errore di IO durante l''elaborazione del modello ''{0}''. Contattare l''amministratore di sistema.
diff --git a/config/alfresco/transfer-service-context.xml b/config/alfresco/transfer-service-context.xml
index e3c965e7d2..46945d721d 100644
--- a/config/alfresco/transfer-service-context.xml
+++ b/config/alfresco/transfer-service-context.xml
@@ -30,12 +30,15 @@
+
+
+
/${spaces.company_home.childname}/${spaces.dictionary.childname}/${spaces.transfers.childname}/${spaces.transfer_groups.childname}
- Default Group
+ cm:default
diff --git a/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java b/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java
index 24242d360e..f08052452c 100644
--- a/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java
+++ b/source/java/org/alfresco/filesys/repo/ContentDiskDriver.java
@@ -3450,9 +3450,6 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
if ( permissionService.hasPermission(nodeRef, PermissionService.WRITE) == AccessStatus.DENIED)
throw new org.alfresco.repo.security.permissions.AccessDeniedException("No write access to " + name);
- if ( permissionService.hasPermission(nodeRef, PermissionService.DELETE) == AccessStatus.DENIED && fstate.findAttribute(CanDeleteWithoutPerms) == null)
- throw new org.alfresco.repo.security.permissions.AccessDeniedException("No delete access to " + name);
-
// Inhibit versioning for this transaction
getPolicyFilter().disableBehaviour( ContentModel.ASPECT_VERSIONABLE);
@@ -3461,6 +3458,12 @@ public class ContentDiskDriver extends AlfrescoDiskDriver implements DiskInterfa
if ( info.hasSetFlag(FileInfo.SetDeleteOnClose) && info.hasDeleteOnClose())
{
+ // Check deleting permissions on the node if action of deleting was configured only
+ if ((AccessStatus.DENIED == permissionService.hasPermission(nodeRef, PermissionService.DELETE)) && (null == fstate.findAttribute(CanDeleteWithoutPerms)))
+ {
+ throw new org.alfresco.repo.security.permissions.AccessDeniedException("No delete access to " + name);
+ }
+
// Check if the node is locked
if ( nodeService.hasAspect( nodeRef, ContentModel.ASPECT_LOCKABLE))
diff --git a/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java b/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java
index 7d74a1b1bd..7dcdd8163a 100644
--- a/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java
@@ -3294,6 +3294,19 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
List nodeStatuses = new ArrayList(nodes.size());
for (NodeEntity node : nodes)
{
+ Long nodeId = node.getId();
+ Node cached = nodesCache.getValue(nodeId);
+ if (cached != null && !txnId.equals(cached.getTransaction().getId()))
+ {
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Stale cached node #" + nodeId
+ + " detected during transaction tracking. Cached transaction ID: "
+ + cached.getTransaction().getId() + ", actual transaction ID: " + txnId);
+ }
+ invalidateCachesByNodeId(null, nodeId, nodesCache);
+ invalidateCachesByNodeId(null, nodeId, parentAssocsCache);
+ }
nodeStatuses.add(node.getNodeStatus());
}
// Done
diff --git a/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java b/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java
index e4a544be4b..3d94ebb13d 100644
--- a/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java
+++ b/source/java/org/alfresco/repo/forms/processor/node/ContentModelFormProcessor.java
@@ -38,6 +38,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.alfresco.model.ContentModel;
+import org.alfresco.model.RenditionModel;
import org.alfresco.repo.forms.Field;
import org.alfresco.repo.forms.Form;
import org.alfresco.repo.forms.FormData;
@@ -208,10 +209,13 @@ public abstract class ContentModelFormProcessor extends
ArrayList fields = new ArrayList(8);
// ignore system properties by default
- fields.add("sys:node-dbid");
- fields.add("sys:store-identifier");
- fields.add("sys:node-uuid");
- fields.add("sys:store-protocol");
+ fields.add(ContentModel.PROP_NODE_DBID.toPrefixString(this.namespaceService));
+ fields.add(ContentModel.PROP_NODE_UUID.toPrefixString(this.namespaceService));
+ fields.add(ContentModel.PROP_STORE_IDENTIFIER.toPrefixString(this.namespaceService));
+ fields.add(ContentModel.PROP_STORE_PROTOCOL.toPrefixString(this.namespaceService));
+
+ // ignore associations that are system maintained
+ fields.add(RenditionModel.ASSOC_RENDITION.toPrefixString(this.namespaceService));
return fields;
}
diff --git a/source/java/org/alfresco/repo/forms/processor/workflow/TaskFormProcessorTest.java b/source/java/org/alfresco/repo/forms/processor/workflow/TaskFormProcessorTest.java
index aff66b25a4..b61151e8f7 100644
--- a/source/java/org/alfresco/repo/forms/processor/workflow/TaskFormProcessorTest.java
+++ b/source/java/org/alfresco/repo/forms/processor/workflow/TaskFormProcessorTest.java
@@ -702,6 +702,8 @@ public class TaskFormProcessorTest extends TestCase
private NamespaceService makeNamespaceService()
{
NamespaceServiceMemoryImpl nsService = new NamespaceServiceMemoryImpl();
+ nsService.registerNamespace(NamespaceService.SYSTEM_MODEL_PREFIX, NamespaceService.SYSTEM_MODEL_1_0_URI);
+ nsService.registerNamespace(NamespaceService.RENDITION_MODEL_PREFIX, NamespaceService.RENDITION_MODEL_1_0_URI);
nsService.registerNamespace(NamespaceService.BPM_MODEL_PREFIX, NamespaceService.BPM_MODEL_1_0_URI);
return nsService;
}
diff --git a/source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessorTest.java b/source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessorTest.java
index a69bb7bc41..73ef6549be 100644
--- a/source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessorTest.java
+++ b/source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessorTest.java
@@ -569,6 +569,8 @@ public class WorkflowFormProcessorTest extends TestCase
private NamespaceService makeNamespaceService()
{
NamespaceServiceMemoryImpl nsService = new NamespaceServiceMemoryImpl();
+ nsService.registerNamespace(NamespaceService.SYSTEM_MODEL_PREFIX, NamespaceService.SYSTEM_MODEL_1_0_URI);
+ nsService.registerNamespace(NamespaceService.RENDITION_MODEL_PREFIX, NamespaceService.RENDITION_MODEL_1_0_URI);
nsService.registerNamespace(NamespaceService.BPM_MODEL_PREFIX, NamespaceService.BPM_MODEL_1_0_URI);
nsService.registerNamespace(NamespaceService.WORKFLOW_MODEL_PREFIX, NamespaceService.WORKFLOW_MODEL_1_0_URI);
return nsService;
diff --git a/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java b/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java
index 39cea77b48..72d7ef960e 100644
--- a/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java
+++ b/source/java/org/alfresco/repo/node/index/IndexTransactionTracker.java
@@ -512,21 +512,35 @@ found:
// If the batch is full or if there are no more voids, fire the query
if (voidTxnIdBatch.size() == VOID_BATCH_SIZE || !voidTxnIdIterator.hasNext())
{
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Checking void txn batch " + voidTxnIdBatch);
+ }
List filledTxns = nodeDAO.getTxnsByCommitTimeAscending(voidTxnIdBatch);
for (Transaction txn : filledTxns)
{
+ InIndex inIndex;
if (txn.getCommitTimeMs() == null) // Just coping with Hibernate mysteries
{
continue;
}
- else if (isTxnPresentInIndex(txn) != InIndex.NO)
+ else if ((inIndex = isTxnPresentInIndex(txn)) != InIndex.NO)
{
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Expiring indexed void txn " + txn.getId() + " (inIndex = " + inIndex + ")");
+ }
// It is in the index so expire it from the voids.
// This can happen if void was committed locally.
toExpireTxnIds.add(txn.getId());
}
else
{
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Found unindexed void txn " + txn.getId() + " (inIndex = " + inIndex + ")");
+ }
+
// It's not in the index so we have a timespamp from which to kick off
// It is a bone fide first transaction. A void has been filled.
long txnCommitTimeMs = txn.getCommitTimeMs().longValue();
@@ -547,6 +561,11 @@ found:
TxnRecord voidTxnRecord = voids.get(voidTxnId);
if (voidTxnRecord.txnCommitTime < maxHistoricalTime)
{
+ if (logger.isDebugEnabled())
+ {
+ logger.debug("Expiring void txn " + voidTxnId + " ("
+ + (maxHistoricalTime - voidTxnRecord.txnCommitTime) + " ms too old)");
+ }
// It's too late for this void whether or not it has become live
toExpireTxnIds.add(voidTxnId);
}
@@ -622,10 +641,11 @@ found:
processedTxnRecord.txnCommitTime = txnCommitTimeMs;
processedTxnRecords.put(txnId, processedTxnRecord);
// Remove this entry from the void list - it is not void
- voids.remove(txnId);
+ boolean previouslyVoid = voids.remove(txnId) != null;
// Reindex the transaction if we are forcing it or if it isn't in the index already
- if (forceReindex || isTxnPresentInIndex(txn) == InIndex.NO)
+ InIndex inIndex = InIndex.INDETERMINATE;
+ if (forceReindex || (inIndex = isTxnPresentInIndex(txn)) == InIndex.NO)
{
// From this point on, until the tracker has caught up, all transactions need to be indexed
forceReindex = true;
@@ -633,14 +653,29 @@ found:
txnIdBuffer.add(txnId);
if (logger.isDebugEnabled())
{
- logger.debug("Reindexing transaction: " + txn);
+ if (previouslyVoid)
+ {
+ logger.debug("Reindexing previously void transaction: " + txn + " (inIndex = " + inIndex + ")");
+ }
+ else
+ {
+ logger.debug("Reindexing transaction: " + txn + " (inIndex = " + inIndex + ")");
+ }
}
}
else
{
if (logger.isDebugEnabled())
{
- logger.debug("Reindex skipping transaction: " + txn);
+ if (previouslyVoid)
+ {
+ logger.debug("Reindex skipping previously void transaction: " + txn + " (inIndex = " + inIndex
+ + ")");
+ }
+ else
+ {
+ logger.debug("Reindex skipping transaction: " + txn + " (inIndex = " + inIndex + ")");
+ }
}
}
diff --git a/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneIndexerImpl.java b/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneIndexerImpl.java
index d5889087f8..808fb02729 100644
--- a/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneIndexerImpl.java
+++ b/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneIndexerImpl.java
@@ -74,6 +74,7 @@ import org.alfresco.service.cmr.repository.datatype.TypeConversionException;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.CachingDateFormat;
import org.alfresco.util.EqualsHelper;
+import org.alfresco.util.GUID;
import org.alfresco.util.ISO9075;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -428,7 +429,9 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl imp
for (Helper helper : toFTSIndex)
{
+ // Delete both the document and the supplementary FTSSTATUS document (if there is one)
deletions.add(helper.ref);
+ deletions.add(helper.id);
}
}
@@ -745,20 +748,24 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl imp
xdoc.add(new Field("ISROOT", "F", Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
xdoc.add(new Field("ISNODE", "T", Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
- if (isAtomic || indexAllProperties)
- {
- xdoc.add(new Field("FTSSTATUS", "Clean", Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
- }
- else
+
+ // Record the need for FTS on this node and transaction with a supplementary document. That way we won't
+ // forget about it if FTS is already in progress for an earlier transaction!
+ if (!isAtomic && !indexAllProperties)
{
+ Document ftsStatus = new Document();
+ ftsStatus.add(new Field("ID", GUID.generate(), Field.Store.YES, Field.Index.NO_NORMS, Field.TermVector.NO));
+ ftsStatus.add(new Field("FTSREF", nodeRef.toString(), Field.Store.YES, Field.Index.NO_NORMS, Field.TermVector.NO));
+ ftsStatus.add(new Field("TX", nodeStatus.getChangeTxnId(), Field.Store.YES, Field.Index.NO_NORMS, Field.TermVector.NO));
if (isNew)
{
- xdoc.add(new Field("FTSSTATUS", "New", Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
+ ftsStatus.add(new Field("FTSSTATUS", "New", Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
}
else
{
- xdoc.add(new Field("FTSSTATUS", "Dirty", Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
+ ftsStatus.add(new Field("FTSSTATUS", "Dirty", Field.Store.NO, Field.Index.NO_NORMS, Field.TermVector.NO));
}
+ docs.add(ftsStatus);
}
// {
@@ -1544,7 +1551,22 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl imp
for (int i = 0; i < hits.length(); i++)
{
Document doc = hits.doc(i);
- Helper helper = new Helper(doc.getField("ID").stringValue(), doc.getField("TX").stringValue());
+
+ // For backward compatibility with existing indexes, cope with FTSSTATUS being stored directly on
+ // the real document without an FTSREF
+ Field ftsRef = doc.getField("FTSREF");
+ Field id = doc.getField("ID");
+ Helper helper;
+ if (ftsRef == null)
+ {
+ // Old style - we only have a node ref
+ helper = new Helper(id.stringValue(), id.stringValue(), doc.getField("TX").stringValue());
+ }
+ else
+ {
+ // New style - we have a unique FTS ID and a noderef
+ helper = new Helper(id.stringValue(), ftsRef.stringValue(), doc.getField("TX").stringValue());
+ }
toFTSIndex.add(helper);
if (++count >= size)
{
@@ -1586,6 +1608,13 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl imp
{
continue;
}
+
+ // bypass out of date transactions
+ NodeRef.Status nodeStatus = nodeService.getNodeStatus(ref);
+ if (nodeStatus == null || !helper.tx.equals(nodeStatus.getChangeTxnId()))
+ {
+ continue;
+ }
List docs = createDocuments(ref.toString(), false, true, false);
for (Document doc : docs)
@@ -1654,12 +1683,15 @@ public class ADMLuceneIndexerImpl extends AbstractLuceneIndexerImpl imp
private static class Helper
{
+ String id;
+
String ref;
String tx;
- Helper(String ref, String tx)
+ Helper(String id, String ref, String tx)
{
+ this.id = id;
this.ref = ref;
this.tx = tx;
}
diff --git a/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneTest.java b/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneTest.java
index c9087493f2..2c2b244148 100644
--- a/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneTest.java
+++ b/source/java/org/alfresco/repo/search/impl/lucene/ADMLuceneTest.java
@@ -233,7 +233,6 @@ public class ADMLuceneTest extends TestCase implements DictionaryListener
{
super();
}
-
/**
* @param arg0
*/
@@ -4624,7 +4623,7 @@ public class ADMLuceneTest extends TestCase implements DictionaryListener
// {
// continue;
// }
-
+
// String sDate = df.getSimpleDateFormat().format(date);
// results = searcher.query(rootNodeRef.getStoreRef(), "lucene", "\\@" + escapeQName(QName.createQName(TEST_NAMESPACE, "DATE-ista")) + ":\"" + sDate + "\"", null);
// assertEquals(1, results.length());
@@ -4666,7 +4665,7 @@ public class ADMLuceneTest extends TestCase implements DictionaryListener
assertTrue("n15 not in results", (results.getNodeRef(0).equals(n15) || results.getNodeRef(1).equals(n15)));
results.close();
-
+
results = searcher.query(rootNodeRef.getStoreRef(), "lucene", "\\@cm\\:created:[MIN TO NOW]", null);
assertEquals(2, results.length());
assertTrue("n14 not in results", (results.getNodeRef(0).equals(n14) || results.getNodeRef(1).equals(n14)));
diff --git a/source/java/org/alfresco/repo/transfer/TransferServiceImpl2.java b/source/java/org/alfresco/repo/transfer/TransferServiceImpl2.java
index 58785fa3f5..f1015d0004 100644
--- a/source/java/org/alfresco/repo/transfer/TransferServiceImpl2.java
+++ b/source/java/org/alfresco/repo/transfer/TransferServiceImpl2.java
@@ -21,9 +21,9 @@ package org.alfresco.repo.transfer;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
+import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
@@ -92,6 +92,7 @@ import org.alfresco.service.cmr.transfer.TransferTarget;
import org.alfresco.service.cmr.transfer.TransferVersion;
import org.alfresco.service.descriptor.Descriptor;
import org.alfresco.service.descriptor.DescriptorService;
+import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.RegexQNamePattern;
import org.alfresco.service.transaction.TransactionService;
@@ -166,6 +167,7 @@ public class TransferServiceImpl2 implements TransferService2
private TenantService tenantService;
private DescriptorService descriptorService;
private TransferVersionChecker transferVersionChecker;
+ private NamespaceService namespaceService;
/**
* How long to delay while polling for commit status.
@@ -255,12 +257,19 @@ public class TransferServiceImpl2 implements TransferService2
return retVal;
}
- private NodeRef getDefaultGroup()
+ protected NodeRef getDefaultGroup()
{
NodeRef home = getTransferHome();
- NodeRef defaultGroup = nodeService.getChildByName(home, ContentModel.ASSOC_CONTAINS,
- defaultTransferGroup);
- return defaultGroup;
+ List refs = nodeService.getChildAssocs(home, ContentModel.ASSOC_CONTAINS, QName.createQName(defaultTransferGroup, namespaceService));
+ if (refs.isEmpty())
+ {
+ // No transfer group.
+ throw new TransferException(MSG_NO_GROUP, new Object[]
+ {
+ defaultTransferGroup
+ });
+ }
+ return refs.get(0).getChildRef();
}
/**
@@ -1477,6 +1486,11 @@ public class TransferServiceImpl2 implements TransferService2
{
return transferVersionChecker;
}
+
+ public void setNamespaceService(NamespaceService namespaceService)
+ {
+ this.namespaceService = namespaceService;
+ }
private class TransferStatus
{
diff --git a/source/java/org/alfresco/repo/transfer/TransferServiceImplTest.java b/source/java/org/alfresco/repo/transfer/TransferServiceImplTest.java
index 7eac2e4bea..463d500982 100644
--- a/source/java/org/alfresco/repo/transfer/TransferServiceImplTest.java
+++ b/source/java/org/alfresco/repo/transfer/TransferServiceImplTest.java
@@ -367,8 +367,7 @@ public class TransferServiceImplTest extends BaseAlfrescoSpringTest
TransferTarget targetB = transferService.createAndSaveTransferTarget(nameB, title, description, endpointProtocol, endpointHost, endpointPort, endpointPath, username, password);
NodeRef transferHome = transferServiceImpl.getTransferHome();
- NodeRef defaultGroup = nodeService.getChildByName(transferHome, ContentModel.ASSOC_CONTAINS,
- transferServiceImpl.getDefaultTransferGroup());
+ NodeRef defaultGroup = transferServiceImpl.getDefaultGroup();
assertNotNull(defaultGroup);
copyService.copyAndRename(defaultGroup, transferHome, ContentModel.ASSOC_CONTAINS, QName.createQName("test"), true);
diff --git a/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJavaScript.java b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJavaScript.java
index e0b8c5a5c3..1c20075093 100644
--- a/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJavaScript.java
+++ b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJavaScript.java
@@ -201,7 +201,7 @@ public class AlfrescoJavaScript extends JBPMSpringActionHandler
private String getExpression(boolean isTextOnly) {
if (isTextOnly)
{
- return script.getTextTrim();
+ return script.getText().trim();
}
else
{
@@ -210,7 +210,7 @@ public class AlfrescoJavaScript extends JBPMSpringActionHandler
{
throw new WorkflowException("Script expression has not been provided");
}
- return expressionElement.getTextTrim();
+ return expressionElement.getText().trim();
}
}
diff --git a/source/java/org/alfresco/repo/workflow/jbpm/JBPMNode.java b/source/java/org/alfresco/repo/workflow/jbpm/JBPMNode.java
index e6794d3f64..502d50fc58 100644
--- a/source/java/org/alfresco/repo/workflow/jbpm/JBPMNode.java
+++ b/source/java/org/alfresco/repo/workflow/jbpm/JBPMNode.java
@@ -25,6 +25,7 @@ import org.alfresco.repo.jscript.ScriptNode;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.QName;
+import org.mozilla.javascript.Context;
import org.mozilla.javascript.Scriptable;
@@ -49,7 +50,7 @@ public class JBPMNode extends ScriptNode
*/
public JBPMNode(NodeRef nodeRef, ServiceRegistry services)
{
- super(nodeRef, services, null);
+ super(nodeRef, services, NullScope.instance());
}
/**
diff --git a/source/java/org/alfresco/repo/workflow/jbpm/NullScope.java b/source/java/org/alfresco/repo/workflow/jbpm/NullScope.java
new file mode 100644
index 0000000000..b6aa12a107
--- /dev/null
+++ b/source/java/org/alfresco/repo/workflow/jbpm/NullScope.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2005-2010 Alfresco Software Limited.
+ *
+ * This file is part of Alfresco
+ *
+ * Alfresco is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Alfresco is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with Alfresco. If not, see .
+ */
+
+package org.alfresco.repo.workflow.jbpm;
+
+import org.mozilla.javascript.NativeObject;
+
+/**
+ * @since 3.4
+ * @author Nick Smith
+ *
+ */
+public class NullScope extends NativeObject
+{
+ private static final long serialVersionUID = 423800883354854893L;
+
+ private static final NullScope INSTANCE = new NullScope();
+
+ public static NullScope instance()
+ {
+ return INSTANCE;
+ }
+
+}