mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.1 to HEAD
13853: Merged V3.0 to V3.1 13008: Merged V2.2 to V3.0 12824: (record only) Change admin access to the web project staging store to be read-only in the virtualization view - ETWOTWO-933 13031: (Record only) AMP fix for ETWOTWO-968: Space rules are not run when saving from MS Word 13040: Merged V2.2 to V3.0 12824: (record-only) - already done via r13005 (ETWOTWO-933) 13145: Merged V2.2 to V3.0: 13089: (record-only) Fix "Read-Write transaction started within read-only transaction" exception. ETWOTWO-1055. 13091: (record-only) Fix for NFS server "Read-Write transaction started within read-only transaction" exception. ETWOTWO-1054. 13508: ETHREEOH-1548 - allow config to reset (even if null/cache) 13514: ETHREEOH-1548 (follow-on fix) - to allow config to reset (even if null/cache) and also reduce 5 caches to 1 13848: Merged V2.2 to V3.0 13188: *RECORD ONLY* Using correct ooo startup context - does not work for *nix. Fixed in 3.0sp1 13212: *RECORD ONLY* AMP for ETWOTWO-984 13342: *RECORD ONLY* Merge info stuff 13435: Merged V2.1 to V2.2 12307: Merged DEV/V2.1SP7 to 2.1 11927: ETWOONE-396 12112: ETWOONE-396 13442: *RECORD ONLY* Updated version to 2.2.4dev 13468: *RECORD ONLY* Removed svn:mergeinfo crud 13470: I18NUtil doesn't cause NPE if message key doesn't exist 13471: Fixed ETWOTWO-1133: Incorrect CRC32 Values for non-ASCII names 13475: Test fix: I18NUtil.getMessage() no longer returns null, leading to NPEs if message bundle is missing 13476: Reverted back to null return values. Will save for fixing on HEAD. 13749: Fixed ALFCOM-2655: MLTranslationInterceptor doesn't handle getType method 13803: ETWOTWO-710 13819: *RECORD ONLY* ACT-6420 - Office 2003 "Install for all users" - DO NOT MERGE 13827: ETWOTWO-1172 - authority exists now checks nodeRef result ___________________________________________________________________ Modified: svn:mergeinfo Merged /alfresco/BRANCHES/V3.0:r12824,13008,13031,13040,13089,13091,13145,13848 Merged /alfresco/BRANCHES/V2.2:r12824,13188,13212,13342,13442,13468,13470-13471,13475-13476,13749,13803,13827 Merged /alfresco/BRANCHES/V3.1:r13853 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14763 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -27,6 +27,7 @@ package org.alfresco.repo.exporter;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -350,7 +351,23 @@ import org.alfresco.service.namespace.QName;
|
||||
exporter.endReference(nodeRef);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void startValueMLText(NodeRef nodeRef, Locale locale)
|
||||
{
|
||||
for (Exporter exporter : exporters)
|
||||
{
|
||||
exporter.startValueMLText(nodeRef, locale);
|
||||
}
|
||||
}
|
||||
|
||||
public void endValueMLText(NodeRef nodeRef)
|
||||
{
|
||||
for (Exporter exporter : exporters)
|
||||
{
|
||||
exporter.endValueMLText(nodeRef);
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.view.Exporter#warning(java.lang.String)
|
||||
*/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -34,10 +34,12 @@ import java.util.Collection;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.node.MLPropertyInterceptor;
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
|
||||
@@ -46,6 +48,7 @@ import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.MLText;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
@@ -427,7 +430,9 @@ public class ExporterComponent
|
||||
|
||||
// Export node properties
|
||||
exporter.startProperties(nodeRef);
|
||||
boolean aware = MLPropertyInterceptor.setMLAware(true);
|
||||
Map<QName, Serializable> properties = nodeService.getProperties(nodeRef);
|
||||
MLPropertyInterceptor.setMLAware(aware);
|
||||
for (QName property : properties.keySet())
|
||||
{
|
||||
// filter out properties whose namespace is excluded
|
||||
@@ -459,7 +464,27 @@ public class ExporterComponent
|
||||
}
|
||||
else
|
||||
{
|
||||
walkProperty(nodeRef, property, value, -1, parameters, exporter);
|
||||
if (value instanceof MLText)
|
||||
{
|
||||
MLText valueMLT = (MLText) value;
|
||||
Set<Locale> locales = valueMLT.getLocales();
|
||||
for (Locale locale : locales)
|
||||
{
|
||||
String localeValue = valueMLT.getValue(locale);
|
||||
if (localeValue == null)
|
||||
{
|
||||
walkProperty(nodeRef, property, localeValue, -1, parameters, exporter);
|
||||
continue;
|
||||
}
|
||||
exporter.startValueMLText(nodeRef, locale);
|
||||
walkProperty(nodeRef, property, localeValue, -1, parameters, exporter);
|
||||
exporter.endValueMLText(nodeRef);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
walkProperty(nodeRef, property, value, -1, parameters, exporter);
|
||||
}
|
||||
}
|
||||
|
||||
// end export of property
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -28,7 +28,9 @@ import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.alfresco.i18n.I18NUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.service.ServiceRegistry;
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
@@ -96,7 +98,10 @@ public class ExporterComponentTest extends BaseSpringTest
|
||||
InputStream test = getClass().getClassLoader().getResourceAsStream("org/alfresco/repo/importer/importercomponent_test.xml");
|
||||
InputStreamReader testReader = new InputStreamReader(test, "UTF-8");
|
||||
importerService.importView(testReader, location, null, null);
|
||||
System.out.println(NodeStoreInspector.dumpNodeStore((NodeService)applicationContext.getBean("NodeService"), storeRef));
|
||||
|
||||
dumpNodeStore(Locale.ENGLISH);
|
||||
dumpNodeStore(Locale.FRENCH);
|
||||
dumpNodeStore(Locale.GERMAN);
|
||||
|
||||
// now export
|
||||
location.setPath("/system");
|
||||
@@ -108,6 +113,13 @@ public class ExporterComponentTest extends BaseSpringTest
|
||||
output.close();
|
||||
}
|
||||
|
||||
private void dumpNodeStore(Locale locale)
|
||||
{
|
||||
|
||||
System.out.println(locale.getDisplayLanguage() + " LOCALE: ");
|
||||
I18NUtil.setLocale(locale);
|
||||
System.out.println(NodeStoreInspector.dumpNodeStore((NodeService) applicationContext.getBean("NodeService"), storeRef));
|
||||
}
|
||||
|
||||
private static class TestProgress
|
||||
implements Exporter
|
||||
@@ -253,6 +265,16 @@ public class ExporterComponentTest extends BaseSpringTest
|
||||
// System.out.println("TestProgress: endReference: " + nodeRef);
|
||||
}
|
||||
|
||||
public void endValueMLText(NodeRef nodeRef)
|
||||
{
|
||||
System.out.println("TestProgress: end MLValue.");
|
||||
}
|
||||
|
||||
public void startValueMLText(NodeRef nodeRef, Locale locale)
|
||||
{
|
||||
System.out.println("TestProgress: start MLValue for locale: " + locale);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -25,6 +25,7 @@
|
||||
package org.alfresco.repo.exporter;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.alfresco.service.cmr.repository.ContentData;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
@@ -276,6 +277,16 @@ import org.alfresco.util.ParameterCheck;
|
||||
exporter.endReference(nodeRef);
|
||||
}
|
||||
|
||||
public void startValueMLText(NodeRef nodeRef, Locale locale)
|
||||
{
|
||||
exporter.startValueMLText(nodeRef, locale);
|
||||
}
|
||||
|
||||
public void endValueMLText(NodeRef nodeRef)
|
||||
{
|
||||
exporter.endValueMLText(nodeRef);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.view.Exporter#warning(java.lang.String)
|
||||
*/
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2007 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -26,6 +26,7 @@ package org.alfresco.repo.exporter;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
|
||||
import org.alfresco.service.cmr.dictionary.DictionaryService;
|
||||
@@ -74,6 +75,8 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||
private static final String EXPORTEDDATE_LOCALNAME = "exportDate";
|
||||
private static final String EXPORTERVERSION_LOCALNAME = "exporterVersion";
|
||||
private static final String EXPORTOF_LOCALNAME = "exportOf";
|
||||
private static final String MLVALUE_LOCALNAME = "mlvalue";
|
||||
private static final String LOCALE_LOCALNAME = "locale";
|
||||
private static final String ACL_LOCALNAME = "acl";
|
||||
private static final String ACE_LOCALNAME = "ace";
|
||||
private static final String ACCESS_LOCALNAME = "access";
|
||||
@@ -106,6 +109,8 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||
private static QName REFERENCE_QNAME;
|
||||
private static QName PATHREF_QNAME;
|
||||
private static QName NODEREF_QNAME;
|
||||
private static QName LOCALE_QNAME;
|
||||
private static QName MLVALUE_QNAME;
|
||||
private static final AttributesImpl EMPTY_ATTRIBUTES = new AttributesImpl();
|
||||
|
||||
// Service dependencies
|
||||
@@ -164,6 +169,9 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||
REFERENCE_QNAME = QName.createQName(NamespaceService.REPOSITORY_VIEW_PREFIX, REFERENCE_LOCALNAME, namespaceService);
|
||||
PATHREF_QNAME = QName.createQName(NamespaceService.REPOSITORY_VIEW_PREFIX, PATHREF_LOCALNAME, namespaceService);
|
||||
NODEREF_QNAME = QName.createQName(NamespaceService.REPOSITORY_VIEW_PREFIX, NODEREF_LOCALNAME, namespaceService);
|
||||
LOCALE_QNAME = QName.createQName(NamespaceService.REPOSITORY_VIEW_PREFIX, LOCALE_LOCALNAME, namespaceService);
|
||||
MLVALUE_QNAME = QName.createQName(NamespaceService.REPOSITORY_VIEW_PREFIX, MLVALUE_LOCALNAME, namespaceService);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -718,7 +726,34 @@ import org.xml.sax.helpers.AttributesImpl;
|
||||
throw new ExporterException("Failed to process end reference", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void startValueMLText(NodeRef nodeRef, Locale locale)
|
||||
{
|
||||
AttributesImpl attrs = new AttributesImpl();
|
||||
attrs.addAttribute(NamespaceService.REPOSITORY_VIEW_PREFIX, LOCALE_LOCALNAME, LOCALE_QNAME.toPrefixString(), null, locale.toString());
|
||||
try
|
||||
{
|
||||
contentHandler.startElement(NamespaceService.REPOSITORY_VIEW_PREFIX, MLVALUE_LOCALNAME, MLVALUE_QNAME.toPrefixString(), attrs);
|
||||
}
|
||||
catch (SAXException e)
|
||||
{
|
||||
throw new ExporterException("Failed to process start mlvalue", e);
|
||||
}
|
||||
}
|
||||
|
||||
public void endValueMLText(NodeRef nodeRef)
|
||||
{
|
||||
try
|
||||
{
|
||||
contentHandler.endElement(NamespaceService.REPOSITORY_VIEW_PREFIX, MLVALUE_LOCALNAME, MLVALUE_QNAME.toPrefixString());
|
||||
}
|
||||
catch (SAXException e)
|
||||
{
|
||||
throw new ExporterException("Failed to process end mltext", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.alfresco.service.cmr.view.Exporter#warning(java.lang.String)
|
||||
*/
|
||||
|
Reference in New Issue
Block a user