- * Copies the actioned upon node to a specified folder in a specified Web
- * Project.
- *
- * @author gavinc
- */
-public class CopyToWebProjectActionExecuter extends ActionExecuterAbstractBase
-{
- public static final String ERR_OVERWRITE = "Unable to overwrite copy because more than one have been found.";
-
- public static final String NAME = "copy-to-web-project";
-
- public static final String PARAM_DESTINATION_FOLDER = "destination-folder";
-
- public static final String PARAM_OVERWRITE_COPY = "overwrite-copy";
-
- private static final Log logger = LogFactory.getLog(CopyToWebProjectActionExecuter.class);
-
- /**
- * Cross repository copy service
- */
- private CrossRepositoryCopyService crCopyService;
-
- /**
- * The node service
- */
- private NodeService nodeService;
-
- /**
- * Sets the node service
- *
- * @param nodeService the node service
- */
- public void setNodeService(NodeService nodeService)
- {
- this.nodeService = nodeService;
- }
-
- /**
- * Sets the cross repository copy service
- *
- * @param crCopyService the cross repository copy service
- */
- public void setCrossRepositoryCopyService(CrossRepositoryCopyService crCopyService)
- {
- this.crCopyService = crCopyService;
- }
-
- /**
- * @see org.alfresco.repo.action.ParameterizedItemAbstractBase#addParameterDefinitions(java.util.List)
- */
- @Override
- protected void addParameterDefinitions(List paramList)
- {
- paramList.add(new ParameterDefinitionImpl(PARAM_DESTINATION_FOLDER,
- DataTypeDefinition.NODE_REF, true,
- getParamDisplayLabel(PARAM_DESTINATION_FOLDER)));
- }
-
- /**
- * @see org.alfresco.repo.action.executer.ActionExecuter#execute(org.alfresco.repo.ref.NodeRef,
- * org.alfresco.repo.ref.NodeRef)
- */
- public void executeImpl(Action ruleAction, NodeRef actionedUponNodeRef)
- {
- if (this.nodeService.exists(actionedUponNodeRef) == true)
- {
- // get the destination, note this will be a NodeRef representing an AVM path
- NodeRef destinationParent = (NodeRef) ruleAction
- .getParameterValue(PARAM_DESTINATION_FOLDER);
-
- // get the name of the source
- String name = (String)this.nodeService.getProperty(actionedUponNodeRef, ContentModel.PROP_NAME);
-
- if (logger.isDebugEnabled())
- {
- logger.debug("Copying " + actionedUponNodeRef.toString() + "(" + name + ") to " +
- destinationParent.toString());
- }
-
- // copy the node being actioned to the destination AVM path
- this.crCopyService.copy(actionedUponNodeRef, destinationParent, name);
- }
- else
- {
- if (logger.isWarnEnabled())
- {
- logger.warn("Not copying " + actionedUponNodeRef.toString() + " as it no longer exists!");
- }
- }
- }
-}
diff --git a/source/java/org/alfresco/repo/admin/IndexConfigurationCheckerImpl.java b/source/java/org/alfresco/repo/admin/IndexConfigurationCheckerImpl.java
index bf45a6cfbe..b944e6d889 100644
--- a/source/java/org/alfresco/repo/admin/IndexConfigurationCheckerImpl.java
+++ b/source/java/org/alfresco/repo/admin/IndexConfigurationCheckerImpl.java
@@ -49,7 +49,6 @@ public class IndexConfigurationCheckerImpl implements IndexConfigurationChecker
private RecoveryMode indexRecoveryMode;
private NodeService nodeService;
private SearchService searchService;
- //private AVMSnapShotTriggeredIndexingMethodInterceptor avmSnapShotTriggeredIndexingMethodInterceptor;
/**
* Set the index recovert mode
diff --git a/source/java/org/alfresco/repo/admin/Log4JHierarchyInit.java b/source/java/org/alfresco/repo/admin/Log4JHierarchyInit.java
index edd0eebb53..08ac3197ff 100644
--- a/source/java/org/alfresco/repo/admin/Log4JHierarchyInit.java
+++ b/source/java/org/alfresco/repo/admin/Log4JHierarchyInit.java
@@ -49,15 +49,15 @@ import org.springframework.core.io.support.ResourcePatternResolver;
* Where {module.id} is whatever value is set within the AMP's module.properties file. For details, see: Developing an Alfresco Module
*
- * For example, if {module.id} is "org.alfresco.module.avmCompare", then within your source code you'll have:
+ * For example, if {module.id} is "org.alfresco.module.someModule", then within your source code you'll have:
*
*
*/
public class Log4JHierarchyInit implements ApplicationContextAware
@@ -85,29 +85,22 @@ public class Log4JHierarchyInit implements ApplicationContextAware
}
}
-
-
- /* (non-Javadoc)
- * @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
- */
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
{
this.resolver = applicationContext;
}
- @SuppressWarnings("unchecked")
public void init()
{
importLogSettings();
}
- @SuppressWarnings("unchecked")
private void importLogSettings()
{
try
{
// Get the PropertyConfigurator
- Class clazz = Class.forName("org.apache.log4j.PropertyConfigurator");
+ Class> clazz = Class.forName("org.apache.log4j.PropertyConfigurator");
Method method = clazz.getMethod("configure", URL.class);
// Import using this method
for (String url : extraLog4jUrls)
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/AuthorityDefaultZonesPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/AuthorityDefaultZonesPatch.java
index 1ed0ac13bd..2024347e2c 100644
--- a/source/java/org/alfresco/repo/admin/patch/impl/AuthorityDefaultZonesPatch.java
+++ b/source/java/org/alfresco/repo/admin/patch/impl/AuthorityDefaultZonesPatch.java
@@ -105,10 +105,6 @@ public class AuthorityDefaultZonesPatch extends AbstractPatch
defaultZones.add(AuthorityService.ZONE_APP_DEFAULT);
defaultZones.add(AuthorityService.ZONE_AUTH_ALFRESCO);
- Set wcmZones = new HashSet(2, 1.0f);
- wcmZones.add(AuthorityService.ZONE_APP_WCM);
- wcmZones.add(AuthorityService.ZONE_AUTH_ALFRESCO);
-
Set shareZones = new HashSet(2, 1.0f);
shareZones.add(AuthorityService.ZONE_APP_SHARE);
shareZones.add(AuthorityService.ZONE_AUTH_ALFRESCO);
diff --git a/source/java/org/alfresco/repo/admin/patch/impl/ContentUrlConverterPatch.java b/source/java/org/alfresco/repo/admin/patch/impl/ContentUrlConverterPatch.java
index 7afb36729e..29b61a5ea8 100644
--- a/source/java/org/alfresco/repo/admin/patch/impl/ContentUrlConverterPatch.java
+++ b/source/java/org/alfresco/repo/admin/patch/impl/ContentUrlConverterPatch.java
@@ -66,7 +66,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
* to the newer alf_content_url storage.
*
* The {@link ServiceRegistry} is used to record progress. The component picks up ranges of node IDs
- * (DM and AVM) and records the progress. Since new nodes will not need converting, the converter
+ * (DM) and records the progress. Since new nodes will not need converting, the converter
* will stop once it hits the largest node ID that it found upon first initiation. Once completed,
* the content store reader will start to pick up orphaned content and schedule it for deletion.
*
@@ -85,12 +85,6 @@ public class ContentUrlConverterPatch extends AbstractPatch
NamespaceService.SYSTEM_MODEL_1_0_URI, "ContentUrlConverter", "adm", "range-start-id");
private static final RegistryKey KEY_ADM_DONE = new RegistryKey(
NamespaceService.SYSTEM_MODEL_1_0_URI, "ContentUrlConverter", "adm", "done");
- private static final RegistryKey KEY_AVM_MAX_ID = new RegistryKey(
- NamespaceService.SYSTEM_MODEL_1_0_URI, "ContentUrlConverter", "avm", "max-id");
- private static final RegistryKey KEY_AVM_RANGE_START_ID = new RegistryKey(
- NamespaceService.SYSTEM_MODEL_1_0_URI, "ContentUrlConverter", "avm", "range-start-id");
- private static final RegistryKey KEY_AVM_DONE = new RegistryKey(
- NamespaceService.SYSTEM_MODEL_1_0_URI, "ContentUrlConverter", "avm", "done");
private static final RegistryKey KEY_STORE_DONE = new RegistryKey(
NamespaceService.SYSTEM_MODEL_1_0_URI, "ContentUrlConverter", "store", "done");
@@ -313,16 +307,10 @@ public class ContentUrlConverterPatch extends AbstractPatch
logger.info(I18NUtil.getMessage("patch.convertContentUrls.adm.start"));
boolean admCompleted = applyADMLooping(running);
- /* Sparta: remove WCM/AVM
- logger.info(I18NUtil.getMessage("patch.convertContentUrls.avm.start"));
- boolean avmCompleted = applyAVMLooping(running);
- */
- boolean avmCompleted = true;
-
logger.info(I18NUtil.getMessage("patch.convertContentUrls.store.start", contentStore));
boolean urlLiftingCompleted = applyUrlLifting(running);
- completed = admCompleted && avmCompleted && urlLiftingCompleted;
+ completed = admCompleted && urlLiftingCompleted;
}
catch (RuntimeException e)
{
@@ -469,106 +457,6 @@ public class ContentUrlConverterPatch extends AbstractPatch
return false;
}
- /*
- private boolean applyAVMLooping(final AtomicBoolean running)
- {
- RetryingTransactionCallback callback = new RetryingTransactionCallback()
- {
- public Boolean execute() throws Throwable
- {
- return applyAVM();
- }
- };
- boolean done = false;
- while (running.get())
- {
- done = transactionHelper.doInTransaction(callback, false, true);
- if (done)
- {
- break;
- }
- }
- return done;
- }
- */
-
- /**
- * Do the AVM conversion work
- */
- /*
- private boolean applyAVM() throws Exception
- {
- Long maxId = (Long) registryService.getProperty(KEY_AVM_MAX_ID);
-
- // Must we run at all?
- Boolean done = (Boolean) registryService.getProperty(KEY_AVM_DONE);
- if (done != null && done.booleanValue())
- {
- logger.info(I18NUtil.getMessage("patch.convertContentUrls.avm.done", maxId));
- return true;
- }
-
- if (maxId == null)
- {
- maxId = patchDAO.getMaxAvmNodeID();
- registryService.addProperty(KEY_AVM_MAX_ID, maxId);
- }
- Long startId = (Long) registryService.getProperty(KEY_AVM_RANGE_START_ID);
- if (startId == null)
- {
- startId = 1L;
- registryService.addProperty(KEY_AVM_RANGE_START_ID, startId);
- }
- Long endId = startId + (batchSize * (long) threadCount * 10L);
-
- final List nodeIds = patchDAO.getAvmNodesWithOldContentProperties(startId, endId);
- BatchProcessWorkerAdaptor batchProcessorWorker = new BatchProcessWorkerAdaptor()
- {
- public void process(Long nodeId) throws Throwable
- {
- // Convert it
- PlainFileNode node = (PlainFileNode) AVMDAOs.Instance().fAVMNodeDAO.getByID(nodeId);
- ContentData contentData = node.getContentData();
- node.setContentData(contentData);
- AVMDAOs.Instance().fAVMNodeDAO.update(node);
- }
- };
- BatchProcessor batchProcessor = new BatchProcessor(
- "ContentUrlConverter.AVM (" + maxId + ")",
- transactionHelper,
- nodeIds, threadCount, batchSize,
- applicationEventPublisher, null, 1);
- batchProcessor.process(batchProcessorWorker, true);
- if (batchProcessor.getTotalErrors() > 0)
- {
- // Something went wrong. We don't advance the start range so that the patch re-execution will
- // start at the start of the range that failed.
- throw AlfrescoRuntimeException.create("patch.convertContentUrls.error", batchProcessor.getLastError());
- }
-
- // Advance
- startId = endId;
- // Have we
- if (startId > maxId)
- {
- startId = maxId + 1;
- // We're past the max ID that we're interested in
- done = Boolean.TRUE;
- registryService.addProperty(KEY_AVM_DONE, done);
- logger.info(I18NUtil.getMessage("patch.convertContentUrls.avm.done", maxId));
- return true;
- }
- // Progress
- super.reportProgress(maxId, startId);
-
- // Move the start ID on
- registryService.addProperty(KEY_AVM_RANGE_START_ID, startId);
-
- // More to do
- return false;
- }
- */
-
private boolean applyUrlLifting(final AtomicBoolean running) throws Exception
{
RetryingTransactionCallback callback = new RetryingTransactionCallback()
@@ -591,9 +479,8 @@ public class ContentUrlConverterPatch extends AbstractPatch
}
Boolean admDone = (Boolean) registryService.getProperty(KEY_ADM_DONE);
- Boolean avmDone = (Boolean) registryService.getProperty(KEY_AVM_DONE);
- if ((admDone == null || !admDone.booleanValue()) || (avmDone == null || !avmDone.booleanValue()))
+ if ((admDone == null || !admDone.booleanValue()))
{
logger.info(I18NUtil.getMessage("patch.convertContentUrls.store.pending"));
return false;
diff --git a/source/java/org/alfresco/repo/dictionary/TestModel.java b/source/java/org/alfresco/repo/dictionary/TestModel.java
index 946e27017f..7188031472 100644
--- a/source/java/org/alfresco/repo/dictionary/TestModel.java
+++ b/source/java/org/alfresco/repo/dictionary/TestModel.java
@@ -64,10 +64,8 @@ public class TestModel
bootstrapModels.add("alfresco/model/systemModel.xml");
bootstrapModels.add("org/alfresco/repo/security/authentication/userModel.xml");
bootstrapModels.add("alfresco/model/contentModel.xml");
- bootstrapModels.add("alfresco/model/wcmModel.xml");
bootstrapModels.add("alfresco/model/applicationModel.xml");
bootstrapModels.add("alfresco/model/bpmModel.xml");
- bootstrapModels.add("alfresco/model/wcmAppModel.xml");
// include models specified on command line
for (String arg: args)
diff --git a/source/java/org/alfresco/repo/domain/PropertyValue.java b/source/java/org/alfresco/repo/domain/PropertyValue.java
deleted file mode 100644
index 3b7d4a8f27..0000000000
--- a/source/java/org/alfresco/repo/domain/PropertyValue.java
+++ /dev/null
@@ -1,1124 +0,0 @@
-/*
- * 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.domain;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-
-import org.alfresco.error.AlfrescoRuntimeException;
-import org.alfresco.repo.domain.schema.SchemaBootstrap;
-import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
-import org.alfresco.service.cmr.repository.AssociationRef;
-import org.alfresco.service.cmr.repository.ChildAssociationRef;
-import org.alfresco.service.cmr.repository.ContentData;
-import org.alfresco.service.cmr.repository.MLText;
-import org.alfresco.service.cmr.repository.NodeRef;
-import org.alfresco.service.cmr.repository.Path;
-import org.alfresco.service.cmr.repository.Period;
-import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
-import org.alfresco.service.namespace.QName;
-import org.alfresco.util.EqualsHelper;
-import org.alfresco.util.VersionNumber;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * Immutable property value storage class.
- *
- * As of 2.2.1, this class is only used by the AVM persistence layers.
- *
- * @author Derek Hulley
- */
-public class PropertyValue implements Cloneable, Serializable
-{
- private static final long serialVersionUID = -497902497351493075L;
-
- /** used to take care of empty strings being converted to nulls by the database */
- private static final String STRING_EMPTY = "";
-
- private static Log logger = LogFactory.getLog(PropertyValue.class);
- private static Log loggerOracle = LogFactory.getLog(PropertyValue.class.getName() + ".oracle");
-
- /** potential value types */
- private static enum ValueType
- {
- NULL
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(0);
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return null;
- }
- },
- BOOLEAN
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(1);
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Boolean.class, value);
- }
- },
- INTEGER
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(2);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.LONG;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Integer.class, value);
- }
- },
- LONG
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(3);
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Long.class, value);
- }
- },
- FLOAT
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(4);
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Float.class, value);
- }
- },
- DOUBLE
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(5);
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Double.class, value);
- }
- },
- STRING
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(6);
- }
-
- /**
- * Strings longer than the maximum of {@link PropertyValue#DEFAULT_MAX_STRING_LENGTH}
- * characters will be serialized.
- */
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- if (value instanceof String)
- {
- String valueStr = (String) value;
- // Check how long the String can be
- if (valueStr.length() > SchemaBootstrap.getMaxStringLength())
- {
- return ValueType.SERIALIZABLE;
- }
- }
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(String.class, value);
- }
- },
- DATE
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(7);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Date.class, value);
- }
- },
- /**
- * @deprecated column FK to alf_global_attributes has been removed (3.4)
- */
- DB_ATTRIBUTE
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(8);
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return null;
- }
- },
- SERIALIZABLE
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(9);
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return value;
- }
- },
- MLTEXT
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(10);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- // NOTE: since 2.2.1, PropertyValue is only used by AVM (which does not natively support MLText, other than single/default string)
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- // NOTE: since 2.2.1, PropertyValue is only used by AVM (which does not natively support MLText, other than single/default string)
- MLText mlText = DefaultTypeConverter.INSTANCE.convert(MLText.class, value);
- if (mlText.size() > 1)
- {
- throw new UnsupportedOperationException("PropertyValue MLText is not supported for AVM");
- }
- return DefaultTypeConverter.INSTANCE.convert(String.class, mlText);
- }
- },
- CONTENT
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(11);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(ContentData.class, value);
- }
- },
- NODEREF
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(12);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(NodeRef.class, value);
- }
- },
- CHILD_ASSOC_REF
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(13);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(ChildAssociationRef.class, value);
- }
- },
- ASSOC_REF
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(14);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(AssociationRef.class, value);
- }
- },
- QNAME
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(15);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(QName.class, value);
- }
- },
- PATH
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(16);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.SERIALIZABLE;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Path.class, value);
- }
- },
- LOCALE
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(17);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Locale.class, value);
- }
- },
- VERSION_NUMBER
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(18);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(VersionNumber.class, value);
- }
- },
- PERIOD
- {
- @Override
- public Integer getOrdinalNumber()
- {
- return Integer.valueOf(20);
- }
-
- @Override
- protected ValueType getPersistedType(Serializable value)
- {
- return ValueType.STRING;
- }
-
- @Override
- Serializable convert(Serializable value)
- {
- return DefaultTypeConverter.INSTANCE.convert(Period.class, value);
- }
- };
-
- /**
- * @return Returns the manually-maintained ordinal number for the value
- */
- public abstract Integer getOrdinalNumber();
-
- /**
- * Override if the type gets persisted in a different format.
- *
- * @param value the actual value that is to be persisted. May not be null.
- */
- protected ValueType getPersistedType(Serializable value)
- {
- return this;
- }
-
- /**
- * Converts a value to this type. The implementation must be able to cope with any legitimate
- * source value.
- *
- * @see DefaultTypeConverter.INSTANCE#convert(Class, Object)
- */
- abstract Serializable convert(Serializable value);
-
- protected ArrayList convert(Collection> collection)
- {
- ArrayList arrayList = new ArrayList(collection.size());
- for (Object object : collection)
- {
- Serializable newValue = null;
- if (object != null)
- {
- if (!(object instanceof Serializable))
- {
- throw new AlfrescoRuntimeException("Collection values must contain Serializable instances: \n" +
- " value type: " + this + "\n" +
- " collection: " + collection + "\n" +
- " value: " + object);
- }
- Serializable value = (Serializable) object;
- newValue = convert(value);
- }
- arrayList.add(newValue);
- }
- // done
- return arrayList;
- }
- }
-
- /**
- * Determine the actual value type to aid in more concise persistence.
- *
- * @param value the value that is to be persisted
- * @return Returns the value type equivalent of the
- */
- private static ValueType getActualType(Serializable value)
- {
- if (value == null)
- {
- return ValueType.NULL;
- }
- else if (value instanceof Boolean)
- {
- return ValueType.BOOLEAN;
- }
- else if ((value instanceof Integer) || (value instanceof Long))
- {
- return ValueType.LONG;
- }
- else if (value instanceof Float)
- {
- return ValueType.FLOAT;
- }
- else if (value instanceof Double)
- {
- return ValueType.DOUBLE;
- }
- else if (value instanceof String)
- {
- return ValueType.STRING;
- }
- else if (value instanceof Date)
- {
- return ValueType.DATE;
- }
- else if (value instanceof ContentData)
- {
- return ValueType.CONTENT;
- }
- else if (value instanceof NodeRef)
- {
- return ValueType.NODEREF;
- }
- else if (value instanceof ChildAssociationRef)
- {
- return ValueType.CHILD_ASSOC_REF;
- }
- else if (value instanceof AssociationRef)
- {
- return ValueType.ASSOC_REF;
- }
- else if (value instanceof QName)
- {
- return ValueType.QNAME;
- }
- else if (value instanceof Path)
- {
- return ValueType.PATH;
- }
- else if (value instanceof Locale)
- {
- return ValueType.LOCALE;
- }
- else if (value instanceof VersionNumber)
- {
- return ValueType.VERSION_NUMBER;
- }
- else if (value instanceof MLText)
- {
- return ValueType.MLTEXT;
- }
- else if (value instanceof Period)
- {
- return ValueType.PERIOD;
- }
- else
- {
- // type is not recognised as belonging to any particular slot
- return ValueType.SERIALIZABLE;
- }
- }
-
- /** a mapping from a property type QName to the corresponding value type */
- private static Map valueTypesByPropertyType;
- /**
- * a mapping of {@link ValueType} ordinal number to the enum. This is manually maintained
- * and MUST NOT BE CHANGED FOR EXISTING VALUES.
- */
- private static Map valueTypesByOrdinalNumber;
- static
- {
- valueTypesByPropertyType = new HashMap(37);
- valueTypesByPropertyType.put(DataTypeDefinition.ANY, ValueType.SERIALIZABLE);
- valueTypesByPropertyType.put(DataTypeDefinition.ENCRYPTED, ValueType.SERIALIZABLE);
- valueTypesByPropertyType.put(DataTypeDefinition.BOOLEAN, ValueType.BOOLEAN);
- valueTypesByPropertyType.put(DataTypeDefinition.INT, ValueType.INTEGER);
- valueTypesByPropertyType.put(DataTypeDefinition.LONG, ValueType.LONG);
- valueTypesByPropertyType.put(DataTypeDefinition.DOUBLE, ValueType.DOUBLE);
- valueTypesByPropertyType.put(DataTypeDefinition.FLOAT, ValueType.FLOAT);
- valueTypesByPropertyType.put(DataTypeDefinition.DATE, ValueType.DATE);
- valueTypesByPropertyType.put(DataTypeDefinition.DATETIME, ValueType.DATE);
- valueTypesByPropertyType.put(DataTypeDefinition.CATEGORY, ValueType.NODEREF);
- valueTypesByPropertyType.put(DataTypeDefinition.CONTENT, ValueType.CONTENT);
- valueTypesByPropertyType.put(DataTypeDefinition.TEXT, ValueType.STRING);
- valueTypesByPropertyType.put(DataTypeDefinition.MLTEXT, ValueType.MLTEXT);
- valueTypesByPropertyType.put(DataTypeDefinition.NODE_REF, ValueType.NODEREF);
- valueTypesByPropertyType.put(DataTypeDefinition.CHILD_ASSOC_REF, ValueType.CHILD_ASSOC_REF);
- valueTypesByPropertyType.put(DataTypeDefinition.ASSOC_REF, ValueType.ASSOC_REF);
- valueTypesByPropertyType.put(DataTypeDefinition.PATH, ValueType.PATH);
- valueTypesByPropertyType.put(DataTypeDefinition.QNAME, ValueType.QNAME);
- valueTypesByPropertyType.put(DataTypeDefinition.LOCALE, ValueType.LOCALE);
- valueTypesByPropertyType.put(DataTypeDefinition.PERIOD, ValueType.PERIOD);
-
- valueTypesByOrdinalNumber = new HashMap(37);
- for (ValueType valueType : ValueType.values())
- {
- Integer ordinalNumber = valueType.getOrdinalNumber();
- if (valueTypesByOrdinalNumber.containsKey(ordinalNumber))
- {
- throw new RuntimeException("ValueType has duplicate ordinal number: " + valueType);
- }
- else if (ordinalNumber.intValue() == -1)
- {
- throw new RuntimeException("ValueType doesn't have an ordinal number: " + valueType);
- }
- valueTypesByOrdinalNumber.put(ordinalNumber, valueType);
- }
- }
-
- /** the type of the property, prior to serialization persistence */
- private ValueType actualType;
- /** true if the property values are contained in a collection */
- private boolean isMultiValued;
- /** the type of persistence used */
- private ValueType persistedType;
-
- private Boolean booleanValue;
- private Long longValue;
- private Float floatValue;
- private Double doubleValue;
- private String stringValue;
- private Serializable serializableValue;
-
- /**
- * default constructor
- */
- public PropertyValue()
- {
- }
-
- /**
- * Construct a new property value.
- *
- * @param typeQName the dictionary-defined property type to store the property as.
- * May be null in which case the type will be determined from the value parameter.
- * @param value the value to store. This will be converted into a format compatible
- * with the type given
- *
- * @throws java.lang.UnsupportedOperationException if the value cannot be converted to the
- * type given
- */
- public PropertyValue(QName typeQName, Serializable value)
- {
- this.actualType = PropertyValue.getActualType(value);
- if (value == null)
- {
- setPersistedValue(ValueType.NULL, null);
- setMultiValued(false);
- }
- else if (value instanceof Collection>)
- {
- if(typeQName != null)
- {
- Collection> collection = (Collection>) value;
- ValueType collectionValueType = makeValueType(typeQName);
- // convert the collection values - we need to do this to ensure that the
- // values provided conform to the given type
-
- ArrayList convertedCollection = collectionValueType.convert(collection);
- // the persisted type is, nonetheless, a serializable
- setPersistedValue(ValueType.SERIALIZABLE, convertedCollection);
- }
- else
- {
- setPersistedValue(ValueType.SERIALIZABLE, value);
- }
-
-
- setMultiValued(true);
- }
- else
- {
- // Does the client consider the type to be important?
- if (typeQName != null)
- {
- // Convert the value to the type required. This ensures that any type conversion issues
- // are caught early and prevent the scenario where the data in the DB cannot be given
- // back out because it is unconvertable.
- ValueType valueType = makeValueType(typeQName);
- value = valueType.convert(value);
- }
- // get the persisted type
- ValueType persistedValueType = this.actualType.getPersistedType(value);
- // convert to the persistent type
- value = persistedValueType.convert(value);
- setPersistedValue(persistedValueType, value);
- setMultiValued(false);
- }
- }
-
- /**
- * Helper method to convert the type QName into a ValueType
- *
- * @return Returns the ValueType - never null
- */
- private static ValueType makeValueType(QName typeQName)
- {
- ValueType valueType = valueTypesByPropertyType.get(typeQName);
- if (valueType == null)
- {
- throw new AlfrescoRuntimeException(
- "Property type not recognised: \n" +
- " type: " + typeQName);
- }
- return valueType;
- }
-
- /**
- * Given an actual type qualified name, returns the int ordinal number
- * that represents it in the database.
- *
- * @param typeQName the type qualified name
- * @return Returns the int representation of the type,
- * e.g. CONTENT.getOrdinalNumber() for type d:content.
- */
- public static int convertToTypeOrdinal(QName typeQName)
- {
- ValueType valueType = makeValueType(typeQName);
- return valueType.getOrdinalNumber();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (this == obj)
- {
- return true;
- }
- if (obj == null)
- {
- return false;
- }
- if (obj instanceof PropertyValue)
- {
- PropertyValue that = (PropertyValue) obj;
- return (this.actualType.equals(that.actualType) &&
- EqualsHelper.nullSafeEquals(this.booleanValue, that.booleanValue) &&
- EqualsHelper.nullSafeEquals(this.longValue, that.longValue) &&
- EqualsHelper.nullSafeEquals(this.floatValue, that.floatValue) &&
- EqualsHelper.nullSafeEquals(this.doubleValue, that.doubleValue) &&
- EqualsHelper.nullSafeEquals(this.stringValue, that.stringValue) &&
- EqualsHelper.nullSafeEquals(this.serializableValue, that.serializableValue)
- );
-
- }
- else
- {
- return false;
- }
- }
-
- @Override
- public int hashCode()
- {
- int h = 0;
- if (actualType != null)
- h = actualType.hashCode();
- Serializable persistedValue = getPersistedValue();
- if (persistedValue != null)
- h += 17 * persistedValue.hashCode();
- return h;
- }
-
- @Override
- public Object clone() throws CloneNotSupportedException
- {
- return super.clone();
- }
-
- @Override
- public String toString()
- {
- StringBuilder sb = new StringBuilder(128);
- sb.append("PropertyValue")
- .append("[actual-type=").append(actualType)
- .append(", multi-valued=").append(isMultiValued)
- .append(", value-type=").append(persistedType)
- .append(", value=").append(getPersistedValue())
- .append("]");
- return sb.toString();
- }
-
- public Integer getActualType()
- {
- return actualType == null ? null : actualType.getOrdinalNumber();
- }
-
- /**
- * @return Returns the actual type's String representation
- */
- public String getActualTypeString()
- {
- return actualType == null ? null : actualType.toString();
- }
-
- public void setActualType(Integer actualType)
- {
- ValueType type = PropertyValue.valueTypesByOrdinalNumber.get(actualType);
- if (type == null)
- {
- logger.error("Unknown property actual type ordinal number: " + actualType);
- }
- this.actualType = type;
- }
-
- public boolean isMultiValued()
- {
- return isMultiValued;
- }
-
- public void setMultiValued(boolean isMultiValued)
- {
- this.isMultiValued = isMultiValued;
- }
-
- public Integer getPersistedType()
- {
- return persistedType == null ? null : persistedType.getOrdinalNumber();
- }
- public void setPersistedType(Integer persistedType)
- {
- ValueType type = PropertyValue.valueTypesByOrdinalNumber.get(persistedType);
- if (type == null)
- {
- logger.error("Unknown property persisted type ordinal number: " + persistedType);
- }
- this.persistedType = type;
- }
-
- /**
- * Stores the value in the correct slot based on the type of persistence requested.
- * No conversion is done.
- *
- * @param persistedType the value type
- * @param value the value - it may only be null if the persisted type is {@link ValueType#NULL}
- */
- public void setPersistedValue(ValueType persistedType, Serializable value)
- {
- switch (persistedType)
- {
- case NULL:
- if (value != null)
- {
- throw new AlfrescoRuntimeException("Value must be null for persisted type: " + persistedType);
- }
- break;
- case BOOLEAN:
- this.booleanValue = (Boolean) value;
- break;
- case LONG:
- this.longValue = (Long) value;
- break;
- case FLOAT:
- this.floatValue = (Float) value;
- break;
- case DOUBLE:
- this.doubleValue = (Double) value;
- break;
- case STRING:
- this.stringValue = (String) value;
- break;
- case DB_ATTRIBUTE:
- throw new IllegalArgumentException("DB_ATTRIBUTE is no longer supported.");
- case SERIALIZABLE:
- this.serializableValue = cloneSerializable(value);
- break;
- default:
- throw new AlfrescoRuntimeException("Unrecognised value type: " + persistedType);
- }
- // we store the type that we persisted as
- this.persistedType = persistedType;
- }
-
- /**
- * Clones a serializable object to disconnect the original instance from the persisted instance.
- *
- * @param original the original object
- * @return the new cloned object
- */
- private Serializable cloneSerializable(Serializable original)
- {
- ObjectOutputStream objectOut = null;
- ByteArrayOutputStream byteOut = null;
- ObjectInputStream objectIn = null;
- try
- {
- // Write the object out to a byte array
- byteOut = new ByteArrayOutputStream();
- objectOut = new ObjectOutputStream(byteOut);
- objectOut.writeObject(original);
- objectOut.flush();
-
- objectIn = new ObjectInputStream(new ByteArrayInputStream(byteOut.toByteArray()));
- Object target = objectIn.readObject();
- // Done
- return (Serializable) target;
- }
- catch (Throwable e)
- {
- throw new AlfrescoRuntimeException("Failed to clone serializable object: " + original, e);
- }
- finally
- {
- if (objectOut != null)
- {
- try { objectOut.close(); } catch (Throwable e) {}
- }
- if (byteOut != null)
- {
- try { byteOut.close(); } catch (Throwable e) {}
- }
- if (objectIn != null)
- {
- try { objectIn.close(); } catch (Throwable e) {}
- }
- }
- }
-
- /**
- * @return Returns the persisted value, keying off the persisted value type
- */
- private Serializable getPersistedValue()
- {
- switch (persistedType)
- {
- case NULL:
- return null;
- case BOOLEAN:
- return this.booleanValue;
- case LONG:
- return this.longValue;
- case FLOAT:
- return this.floatValue;
- case DOUBLE:
- return this.doubleValue;
- case STRING:
- // Oracle stores empty strings as 'null'...
- if (this.stringValue == null)
- {
- // We know that we stored a non-null string, but now it is null.
- // It can only mean one thing - Oracle
- if (loggerOracle.isDebugEnabled())
- {
- logger.debug("string_value is 'null'. Forcing to empty String");
- }
- return PropertyValue.STRING_EMPTY;
- }
- else
- {
- return this.stringValue;
- }
- case DB_ATTRIBUTE:
- return null;
- case SERIALIZABLE:
- return this.serializableValue;
- default:
- throw new AlfrescoRuntimeException("Unrecognised value type: " + persistedType);
- }
- }
-
- /**
- * Fetches the value as a desired type. Collections (i.e. multi-valued properties)
- * will be converted as a whole to ensure that all the values returned within the
- * collection match the given type.
- *
- * @param typeQName the type required for the return value
- * @return Returns the value of this property as the desired type, or a Collection
- * of values of the required type
- *
- * @throws AlfrescoRuntimeException
- * if the type given is not recognized
- * @throws org.alfresco.service.cmr.repository.datatype.TypeConversionException
- * if the conversion to the required type fails
- *
- * @see DataTypeDefinition#ANY The static qualified names for the types
- */
- public Serializable getValue(QName typeQName)
- {
- // first check for null
- ValueType requiredType = makeValueType(typeQName);
- if (requiredType == ValueType.SERIALIZABLE)
- {
- // the required type must be the actual type
- requiredType = this.actualType;
- }
-
- // we need to convert
- Serializable ret = null;
- if (persistedType == ValueType.NULL)
- {
- ret = null;
- }
- else if (this.isMultiValued)
- {
- // collections are always stored
- Collection> collection = (Collection>) this.serializableValue;
- // convert the collection values - we need to do this to ensure that the
- // values provided conform to the given type
- ArrayList convertedCollection = requiredType.convert(collection);
- ret = convertedCollection;
- }
- else
- {
- Serializable persistedValue = getPersistedValue();
- // convert the type
- ret = requiredType.convert(persistedValue);
- }
- // done
- if (logger.isDebugEnabled())
- {
- logger.debug("Fetched value: \n" +
- " property value: " + this + "\n" +
- " requested type: " + requiredType + "\n" +
- " result: " + ret);
- }
- return ret;
- }
-
- /**
- * Gets the value or values as a guaranteed collection.
- *
- * @see #getValue(QName)
- */
- @SuppressWarnings("unchecked")
- public Collection getCollection(QName typeQName)
- {
- Serializable value = getValue(typeQName);
- if (value instanceof Collection>)
- {
- return (Collection) value;
- }
- else
- {
- return Collections.singletonList(value);
- }
- }
-
- public boolean getBooleanValue()
- {
- if (booleanValue == null)
- return false;
- else
- return booleanValue.booleanValue();
- }
- public void setBooleanValue(boolean value)
- {
- this.booleanValue = Boolean.valueOf(value);
- }
-
- public long getLongValue()
- {
- if (longValue == null)
- return 0;
- else
- return longValue.longValue();
- }
- public void setLongValue(long value)
- {
- this.longValue = Long.valueOf(value);
- }
-
- public float getFloatValue()
- {
- if (floatValue == null)
- return 0.0F;
- else
- return floatValue.floatValue();
- }
- public void setFloatValue(float value)
- {
- this.floatValue = Float.valueOf(value);
- }
-
- public double getDoubleValue()
- {
- if (doubleValue == null)
- return 0.0;
- else
- return doubleValue.doubleValue();
- }
- public void setDoubleValue(double value)
- {
- this.doubleValue = Double.valueOf(value);
- }
-
- public String getStringValue()
- {
- return stringValue;
- }
- public void setStringValue(String value)
- {
- this.stringValue = value;
- }
-
- public Serializable getSerializableValue()
- {
- return serializableValue;
- }
- public void setSerializableValue(Serializable value)
- {
- this.serializableValue = value;
- }
-}
diff --git a/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java b/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java
index 1bbed247a6..ffe3585a50 100644
--- a/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/node/AbstractNodeDAOImpl.java
@@ -2024,7 +2024,7 @@ public abstract class AbstractNodeDAOImpl implements NodeDAO, BatchingDAO
// Remove ACLs
if (deleteAcl && aclId != null)
{
- aclDAO.deleteAclForNode(aclId, false);
+ aclDAO.deleteAclForNode(aclId);
}
// The node has been cleaned up. Now we recreate the node for index tracking purposes.
diff --git a/source/java/org/alfresco/repo/domain/permissions/AbstractAclCrudDAOImpl.java b/source/java/org/alfresco/repo/domain/permissions/AbstractAclCrudDAOImpl.java
index 31d40cb7d4..0f6f638775 100644
--- a/source/java/org/alfresco/repo/domain/permissions/AbstractAclCrudDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/permissions/AbstractAclCrudDAOImpl.java
@@ -20,7 +20,6 @@ package org.alfresco.repo.domain.permissions;
import java.io.Serializable;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -54,9 +53,9 @@ import org.springframework.extensions.surf.util.ParameterCheck;
* alf_access_control_entry
* alf_permission
* alf_authority
- *
- * Also, following are currently unused:
- *
+ *
+ * Also, following are currently unused:
+ *
* alf_ace_context
* alf_authority_alias
*
@@ -262,13 +261,6 @@ public abstract class AbstractAclCrudDAOImpl implements AclCrudDAO
return getADMNodeEntityIdsByAcl(aclEntityId, maxResults);
}
- public List getAVMNodesByAcl(long aclEntityId, int maxResults)
- {
- // Sparta: remove WCM/AVM
- //return getAVMNodeEntityIdsByAcl(aclEntityId, maxResults);
- return Collections.emptyList();
- }
-
public void updateAcl(AclUpdateEntity entity)
{
ParameterCheck.mandatory("entity", entity);
@@ -368,7 +360,6 @@ public abstract class AbstractAclCrudDAOImpl implements AclCrudDAO
protected abstract int deleteAclEntity(long id);
protected abstract List getADMNodeEntityIdsByAcl(long aclEntityId, int maxResults);
- protected abstract List getAVMNodeEntityIdsByAcl(long aclEntityId, int maxResults);
//
// ACL Member
diff --git a/source/java/org/alfresco/repo/domain/permissions/AclCrudDAO.java b/source/java/org/alfresco/repo/domain/permissions/AclCrudDAO.java
index 5c75484e79..27c7f98207 100644
--- a/source/java/org/alfresco/repo/domain/permissions/AclCrudDAO.java
+++ b/source/java/org/alfresco/repo/domain/permissions/AclCrudDAO.java
@@ -63,7 +63,6 @@ public interface AclCrudDAO
public void updateAcl(AclUpdateEntity entity);
public void deleteAcl(long aclEntityId);
public List getADMNodesByAcl(long aclEntityId, int maxResults);
- public List getAVMNodesByAcl(long aclEntityId, int maxResults);
//
// Access Control Entry (ACE)
//
diff --git a/source/java/org/alfresco/repo/domain/permissions/AclDAO.java b/source/java/org/alfresco/repo/domain/permissions/AclDAO.java
index ce8b5453ad..aa17f5f701 100644
--- a/source/java/org/alfresco/repo/domain/permissions/AclDAO.java
+++ b/source/java/org/alfresco/repo/domain/permissions/AclDAO.java
@@ -151,15 +151,13 @@ public interface AclDAO
public Acl getAclCopy(Long toCopy, Long toInheritFrom, ACLCopyMode mode);
- public List getAVMNodesByAcl(long aclEntityId, int maxResults);
-
public List getADMNodesByAcl(long aclEntityId, int maxResults);
public Acl createLayeredAcl(Long indirectedAcl);
public void renameAuthority(String before, String after);
- public void deleteAclForNode(long aclId, boolean isAVMNode);
+ public void deleteAclForNode(long aclId);
/**
* @param inheritedAclId
diff --git a/source/java/org/alfresco/repo/domain/permissions/AclDAOImpl.java b/source/java/org/alfresco/repo/domain/permissions/AclDAOImpl.java
index 55959d458f..d71357fa39 100644
--- a/source/java/org/alfresco/repo/domain/permissions/AclDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/permissions/AclDAOImpl.java
@@ -767,7 +767,6 @@ public class AclDAOImpl implements AclDAO
// Retrieve dependent nodes
List nodeIds = aclCrudDAO.getADMNodesByAcl(aclId, -1);
- nodeIds.addAll(aclCrudDAO.getAVMNodesByAcl(aclId, -1));
if (nodeIds.size() > 0)
{
@@ -853,7 +852,7 @@ public class AclDAOImpl implements AclDAO
* {@inheritDoc}
*/
@Override
- public void deleteAclForNode(long aclId, boolean isAVMNode)
+ public void deleteAclForNode(long aclId)
{
Acl dbAcl = getAcl(aclId);
if (dbAcl.getAclType() == ACLType.DEFINING)
@@ -868,19 +867,12 @@ public class AclDAOImpl implements AclDAO
Long defining = dbAcl.getInheritsFrom();
if (aclCrudDAO.getAcl(defining) == null)
{
- if (! isAVMNode)
+ // ADM
+ if (getADMNodesByAcl(aclId, 1).size() == 0)
{
- // ADM
- if (getADMNodesByAcl(aclId, 1).size() == 0)
- {
- // delete acl members & acl
- aclCrudDAO.deleteAclMembersByAcl(aclId);
- aclCrudDAO.deleteAcl(aclId);
- }
- }
- else
- {
- // TODO: AVM
+ // delete acl members & acl
+ aclCrudDAO.deleteAclMembersByAcl(aclId);
+ aclCrudDAO.deleteAcl(aclId);
}
}
}
@@ -1544,15 +1536,6 @@ public class AclDAOImpl implements AclDAO
return aclCrudDAO.getAcl(id);
}
- /**
- * {@inheritDoc}
- */
- @Override
- public List getAVMNodesByAcl(long aclEntityId, int maxResults)
- {
- return aclCrudDAO.getAVMNodesByAcl(aclEntityId, maxResults);
- }
-
/**
* {@inheritDoc}
*/
diff --git a/source/java/org/alfresco/repo/domain/permissions/ibatis/AclCrudDAOImpl.java b/source/java/org/alfresco/repo/domain/permissions/ibatis/AclCrudDAOImpl.java
index 8a76e6915b..98b1198980 100644
--- a/source/java/org/alfresco/repo/domain/permissions/ibatis/AclCrudDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/permissions/ibatis/AclCrudDAOImpl.java
@@ -52,7 +52,6 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
private static final String SELECT_ACLS_THAT_INHERIT_FROM_ACL = "alfresco.permissions.select_AclsThatInheritFromAcl";
private static final String SELECT_LATEST_ACL_BY_GUID = "alfresco.permissions.select_LatestAclByGuid";
private static final String SELECT_ADM_NODES_BY_ACL = "alfresco.permissions.select_ADMNodesByAclId";
- private static final String SELECT_AVM_NODES_BY_ACL = "alfresco.permissions.select_AVMNodesByAclId";
private static final String UPDATE_ACL = "alfresco.permissions.update_Acl";
private static final String DELETE_ACL = "alfresco.permissions.delete_Acl";
@@ -161,21 +160,6 @@ public class AclCrudDAOImpl extends AbstractAclCrudDAOImpl
return (List)template.selectList(SELECT_ADM_NODES_BY_ACL, params, new RowBounds(0 , maxResults));
}
- @SuppressWarnings("unchecked")
- @Override
- protected List getAVMNodeEntityIdsByAcl(long aclEntityId, int maxResults)
- {
- if (maxResults < 0)
- {
- maxResults = RowBounds.NO_ROW_LIMIT;
- }
-
- Map params = new HashMap(1);
- params.put("id", aclEntityId);
-
- return (List)template.selectList(SELECT_AVM_NODES_BY_ACL, params, new RowBounds(0 , maxResults));
- }
-
@Override
protected int updateAclEntity(AclEntity updatedAclEntity)
{
diff --git a/source/java/org/alfresco/repo/domain/propval/AbstractPropertyValueDAOImpl.java b/source/java/org/alfresco/repo/domain/propval/AbstractPropertyValueDAOImpl.java
index 24fb6bb2ac..6f78dbd95e 100644
--- a/source/java/org/alfresco/repo/domain/propval/AbstractPropertyValueDAOImpl.java
+++ b/source/java/org/alfresco/repo/domain/propval/AbstractPropertyValueDAOImpl.java
@@ -130,9 +130,7 @@ public abstract class AbstractPropertyValueDAOImpl implements PropertyValueDAO
private SimpleCache propertyUniqueContextCache; // cluster-aware
/**
- * Set the cache to use for avm_version_roots lookups (optional).
- *
- * @param vrEntityCache
+ * Set the cache to use for unique property lookups
*/
public void setPropertyUniqueContextCache(SimpleCache propertyUniqueContextCache)
{
@@ -1464,7 +1462,6 @@ public abstract class AbstractPropertyValueDAOImpl implements PropertyValueDAO
}
else
{
- // reasonable to clear for now (eg. only used by AVMLockingService.removeLocks*)
// note: in future, if we need to support mass removal based on specific key grouping then we need to use more intelligent cache (removal)
propertyUniqueContextCache.clear();
}
diff --git a/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java b/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java
index 8905f36450..a29e10e4c7 100644
--- a/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java
+++ b/source/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java
@@ -69,7 +69,6 @@ import org.alfresco.repo.admin.patch.AppliedPatch;
import org.alfresco.repo.admin.patch.Patch;
import org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch;
import org.alfresco.repo.content.filestore.FileContentWriter;
-import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect;
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect;
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoSybaseAnywhereDialect;
@@ -1833,7 +1832,7 @@ public class SchemaBootstrap extends AbstractLifecycleBean
{
int totalProblems = 0;
- // Discover available reference files (e.g. for prefixes alf_, avm_ etc.)
+ // Discover available reference files (e.g. for prefixes alf_, etc.)
// and process each in turn.
for (String schemaReferenceUrl : schemaReferenceUrls)
{
diff --git a/source/java/org/alfresco/repo/jscript/Search.java b/source/java/org/alfresco/repo/jscript/Search.java
index b10e7ecf81..d278f1edae 100644
--- a/source/java/org/alfresco/repo/jscript/Search.java
+++ b/source/java/org/alfresco/repo/jscript/Search.java
@@ -193,11 +193,7 @@ public class Search extends BaseScopableProcessorExtension implements Initializi
*
* Resolve to node via its display path.
*
- * 3) AVM Path - {store_id}/{path}
- *
- * Resolve to AVM node via its display path
- *
- * @param referenceType one of "node", "path", or "avmpath"
+ * @param referenceType one of "node", "path"
* @param reference array of reference segments (as described above for each reference type)
* @return ScriptNode the script node
*/
diff --git a/source/java/org/alfresco/repo/node/db/DbNodeServiceImpl.java b/source/java/org/alfresco/repo/node/db/DbNodeServiceImpl.java
index 854c170e21..2524a4e43c 100644
--- a/source/java/org/alfresco/repo/node/db/DbNodeServiceImpl.java
+++ b/source/java/org/alfresco/repo/node/db/DbNodeServiceImpl.java
@@ -70,7 +70,6 @@ import org.alfresco.service.cmr.repository.InvalidNodeRefException;
import org.alfresco.service.cmr.repository.InvalidStoreRefException;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeRef.Status;
-import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.repository.Path;
import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
@@ -106,7 +105,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
private NodeDAO nodeDAO;
private PermissionService permissionService;
private StoreArchiveMap storeArchiveMap;
- private NodeService avmNodeService;
private NodeIndexer nodeIndexer;
private BehaviourFilter policyBehaviourFilter;
private boolean enableTimestampPropagation;
@@ -136,11 +134,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
this.storeArchiveMap = storeArchiveMap;
}
- public void setAvmNodeService(NodeService avmNodeService)
- {
- this.avmNodeService = avmNodeService;
- }
-
/**
* @param nodeIndexer the indexer that will be notified of node additions,
* modifications and deletions
@@ -234,9 +227,6 @@ public class DbNodeServiceImpl extends AbstractNodeServiceImpl
}
storeRefs.add(storeRef);
}
- // Now get the AVMStores.
- List avmStores = avmNodeService.getStores();
- storeRefs.addAll(avmStores);
// Return them all.
return storeRefs;
}
diff --git a/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java b/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java
index 53ad3beabb..9afa4f1abf 100644
--- a/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java
+++ b/source/java/org/alfresco/repo/node/index/AbstractReindexComponent.java
@@ -395,13 +395,6 @@ public abstract class AbstractReindexComponent implements IndexRecovery
storeRefs = new HashSet(nodeService.getStores());
Iterator storeRefsIterator = storeRefs.iterator();
while (storeRefsIterator.hasNext())
- {
- // Remove AVM stores
- StoreRef storeRef = storeRefsIterator.next();
- }
-
- storeRefsIterator = storeRefs.iterator();
- while (storeRefsIterator.hasNext())
{
// Remove stores to ignore
StoreRef storeRef = storeRefsIterator.next();
diff --git a/source/java/org/alfresco/repo/search/impl/lucene/index/IndexInfo.java b/source/java/org/alfresco/repo/search/impl/lucene/index/IndexInfo.java
index 4a3bde4de4..c91ee1ec65 100644
--- a/source/java/org/alfresco/repo/search/impl/lucene/index/IndexInfo.java
+++ b/source/java/org/alfresco/repo/search/impl/lucene/index/IndexInfo.java
@@ -2964,228 +2964,6 @@ public class IndexInfo implements IndexMonitor
end = System.nanoTime();
System.out.println("@{http://www.alfresco.org/model/content/1.0}name:be = " + hits.length() + " in " + ((end - start) / 1e9));
searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new WildcardQuery(new Term("@{http://www.travelmuse.com/wcm}DestinationPhoto", "*"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}DestinationPhoto:* = " + hits.length() + " in " + ((end -
- // start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new WildcardQuery(new Term("@{http://www.travelmuse.com/wcm}DestinationPhoto", "*"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}DestinationPhoto:* = " + hits.length() + " in " + ((end -
- // start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}ThemeName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}ThemeName:bambino = " + hits.length() + " in " + ((end -
- // start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}ThemeName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}ThemeName:bambino = " + hits.length() + " in " + ((end -
- // start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}ActivityName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}ActivityName:bambino = " + hits.length() + " in " + ((end
- // - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}ActivityName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}ActivityName:bambino = " + hits.length() + " in " + ((end
- // - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}EditorialItemTitle", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}EditorialItemTitle:bambino = " + hits.length() + " in " +
- // ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}EditorialItemTitle", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}EditorialItemTitle:bambino = " + hits.length() + " in " +
- // ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}PoiName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}PoiName:bambino = " + hits.length() + " in " + ((end -
- // start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}PoiName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}PoiName:bambino = " + hits.length() + " in " + ((end -
- // start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}PropertyName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}PropertyName:bambino = " + hits.length() + " in " + ((end
- // - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.travelmuse.com/wcm}PropertyName", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.travelmuse.com/wcm}PropertyName:bambino = " + hits.length() + " in " + ((end
- // - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.alfresco.org/model/content/1.0}content", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.alfresco.org/model/content/1.0}content:bambino = " + hits.length() + " in "
- // + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = new TermQuery(new Term("@{http://www.alfresco.org/model/content/1.0}content", "bambino"));
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("@{http://www.alfresco.org/model/content/1.0}content:bambino = " + hits.length() + " in "
- // + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/editorial//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/editorial//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/editorial//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/editorial//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/tag//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/tag//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/tag//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/tag//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/poi//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/poi//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/poi//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/poi//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/property//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/property//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/property//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/property//* = " + hits.length() + " in " + ((end - start) / 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/web-reviews//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/web-reviews//* = " + hits.length() + " in " + ((end - start) /
- // 1e9));
- // searcher.close();
- //
- // searcher = new IndexSearcher(reader);
- // query = getPathQuery("/www/avm_webapps/ROOT/web-reviews//*");
- // start = System.nanoTime();
- // hits = searcher.search(query);
- // end = System.nanoTime();
- // System.out.println("/www/avm_webapps/ROOT/web-reviews//* = " + hits.length() + " in " + ((end - start) /
- // 1e9));
- // searcher.close();
-
- // TermEnum terms = reader.terms(new Term("@{http://www.alfresco.org/model/user/1.0}members", ""));
- // while (terms.next() && terms.term().field().equals("@{http://www.alfresco.org/model/user/1.0}members"))
- // {
- // System.out.println("F = " + terms.term().field() + " V = " + terms.term().text() + " F = " +
- // terms.docFreq());
- // if (terms.term().text().equals("xirmsi"))
- // {
- // System.out.println("Matched");
- // }
- // }
- // terms.close();
-
}
/**
diff --git a/source/java/org/alfresco/repo/site/SiteServiceImpl.java b/source/java/org/alfresco/repo/site/SiteServiceImpl.java
index c4465788fd..481658e9ea 100644
--- a/source/java/org/alfresco/repo/site/SiteServiceImpl.java
+++ b/source/java/org/alfresco/repo/site/SiteServiceImpl.java
@@ -120,7 +120,7 @@ import org.springframework.extensions.surf.util.AbstractLifecycleBean;
import org.springframework.extensions.surf.util.ParameterCheck;
/**
- * Site Service Implementation. Also bootstraps the site AVM and DM stores.
+ * Site Service Implementation. Also bootstraps the site DM stores.
*
* @author Roy Wetherall
*/
@@ -173,7 +173,6 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
private FileFolderService fileFolderService;
private SearchService searchService;
private NamespaceService namespaceService;
- private PreferenceService preferenceService;
private PermissionService permissionService;
private ActivityService activityService;
private PersonService personService;
@@ -205,9 +204,10 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
this.sitesXPath = sitesXPath;
}
+ @Deprecated
public void setPreferenceService(PreferenceService preferenceService)
{
- this.preferenceService = preferenceService;
+ // Never used
}
/**
diff --git a/source/java/org/alfresco/repo/template/Workflow.java b/source/java/org/alfresco/repo/template/Workflow.java
index df07b92f19..b4f09ee498 100644
--- a/source/java/org/alfresco/repo/template/Workflow.java
+++ b/source/java/org/alfresco/repo/template/Workflow.java
@@ -27,13 +27,11 @@ import java.util.Map;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
-import org.alfresco.repo.forms.processor.workflow.ExtendedFieldBuilder;
import org.alfresco.repo.workflow.WorkflowModel;
import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.dictionary.DictionaryService;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
-import org.alfresco.service.cmr.repository.StoreRef;
import org.alfresco.service.cmr.repository.TemplateImageResolver;
import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.cmr.workflow.WorkflowTask;
@@ -43,7 +41,6 @@ import org.alfresco.service.namespace.NamespacePrefixResolver;
import org.alfresco.service.namespace.NamespacePrefixResolverProvider;
import org.alfresco.service.namespace.QName;
import org.alfresco.service.namespace.QNameMap;
-import org.alfresco.util.Pair;
/**
* Workflow and task support in FreeMarker templates.
@@ -52,9 +49,6 @@ import org.alfresco.util.Pair;
*/
public class Workflow extends BaseTemplateProcessorExtension
{
- private static final String WCM_WF_MODEL_1_0_URI = "http://www.alfresco.org/model/wcmworkflow/1.0";
- private static final QName PROP_FROM_PATH = QName.createQName(WCM_WF_MODEL_1_0_URI, "fromPath");
-
private ServiceRegistry services;
/**
diff --git a/source/java/org/alfresco/service/cmr/security/AuthorityService.java b/source/java/org/alfresco/service/cmr/security/AuthorityService.java
index 93fec78389..8c5711c65a 100644
--- a/source/java/org/alfresco/service/cmr/security/AuthorityService.java
+++ b/source/java/org/alfresco/service/cmr/security/AuthorityService.java
@@ -49,11 +49,6 @@ public interface AuthorityService
*/
public static String ZONE_APP_DEFAULT = "APP.DEFAULT";
- /**
- * The WCM application zone.
- */
- public static String ZONE_APP_WCM = "APP.WCM";
-
/**
* The SHARE application zone.
*/
diff --git a/source/java/org/alfresco/util/RuntimeSystemPropertiesSetter.java b/source/java/org/alfresco/util/RuntimeSystemPropertiesSetter.java
index a0393bff75..d2896118f9 100644
--- a/source/java/org/alfresco/util/RuntimeSystemPropertiesSetter.java
+++ b/source/java/org/alfresco/util/RuntimeSystemPropertiesSetter.java
@@ -107,13 +107,6 @@ public class RuntimeSystemPropertiesSetter implements BeanFactoryPostProcessor,
//
// $TOMCAT_HOME/webapps/alfresco/WEB-INF/classes/alfresco/alfresco-jmxrmi.password
// or: $TOMCAT_HOME/shared/classes/alfresco/alfresco-jmxrmi.password
- //
- // However, if WCM isn't installed there won't be a JMX password file.
- // Therefore, while it's important to choke on bad paths, a missing
- // password file must be acceptable -- it just means that WCM virtualization
- // will be disabled later when org.alfresco.mbeans.VirtServerRegistry
- // refuses to bring up the serverConnector bean.
-
path = this.resolver.getResource("classpath:alfresco/alfresco-jmxrmi.password").getFile().getCanonicalFile();
}
catch (Exception e )
diff --git a/source/java/org/alfresco/util/schemacomp/MultiFileDumper.java b/source/java/org/alfresco/util/schemacomp/MultiFileDumper.java
index c04de0afbe..86e3dbed05 100644
--- a/source/java/org/alfresco/util/schemacomp/MultiFileDumper.java
+++ b/source/java/org/alfresco/util/schemacomp/MultiFileDumper.java
@@ -28,7 +28,7 @@ import org.alfresco.util.TempFileProvider;
import org.springframework.context.ApplicationContext;
/**
- * Given a set of database object prefixes (e.g. "alf_", "avm_", "jbpm_") and
+ * Given a set of database object prefixes (e.g. "alf_", "jbpm_") and
* a file name template (e.g. "AlfrescoSchema-MySQL-{0}-") will produce a set of files,
* one per database object prefix of the form:
*
@@ -46,7 +46,7 @@ public class MultiFileDumper
private final String fileNameTemplate;
private final DbToXMLFactory dbToXMLFactory;
private final static String fileNameSuffix = ".xml";
- public final static String[] DEFAULT_PREFIXES = new String[] { "alf_", "avm_", "jbpm_", "act_" };
+ public final static String[] DEFAULT_PREFIXES = new String[] { "alf_", "jbpm_", "act_" };
private String defaultSchemaName;
diff --git a/source/test-java/org/alfresco/filesys/FTPServerTest.java b/source/test-java/org/alfresco/filesys/FTPServerTest.java
index 75373e4bf5..62b4c02a04 100644
--- a/source/test-java/org/alfresco/filesys/FTPServerTest.java
+++ b/source/test-java/org/alfresco/filesys/FTPServerTest.java
@@ -248,28 +248,19 @@ public class FTPServerTest extends TestCase
reply = ftp.getReplyCode();
assertTrue(FTPReply.isPositiveCompletion(reply));
- // expect /Alfresco directory
- // /AVM directory - avm removed
assertTrue(files.length == 1);
- boolean foundAVM=false;
boolean foundAlfresco=false;
for(FTPFile file : files)
{
logger.debug("file name=" + file.getName());
assertTrue(file.isDirectory());
- if(file.getName().equalsIgnoreCase("AVM"))
- {
- foundAVM=true;
- }
if(file.getName().equalsIgnoreCase("Alfresco"))
{
foundAlfresco=true;
}
}
- // AVM mount point removed
- //assertTrue(foundAVM);
assertTrue(foundAlfresco);
// Change to Alfresco Dir that we know exists
@@ -568,8 +559,6 @@ public class FTPServerTest extends TestCase
final String TEST_DIR="/Alfresco/User Homes/" + USER_ONE;
- final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();
-
FTPClient ftpOne = connectClient();
FTPClient ftpTwo = connectClient();
try
@@ -666,8 +655,6 @@ public class FTPServerTest extends TestCase
final String TEST_DIR="/Alfresco/User Homes/" + USER_THREE;
- final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();
-
FTPClient ftpOne = connectClient();
try
{
diff --git a/source/test-java/org/alfresco/repo/dictionary/RepoDictionaryDAOTest.java b/source/test-java/org/alfresco/repo/dictionary/RepoDictionaryDAOTest.java
index 2c21e18859..eb693f1f9d 100644
--- a/source/test-java/org/alfresco/repo/dictionary/RepoDictionaryDAOTest.java
+++ b/source/test-java/org/alfresco/repo/dictionary/RepoDictionaryDAOTest.java
@@ -137,7 +137,6 @@ public class RepoDictionaryDAOTest extends TestCase
bootstrapModels.add("alfresco/model/dictionaryModel.xml");
bootstrapModels.add("alfresco/model/systemModel.xml");
bootstrapModels.add("alfresco/model/contentModel.xml");
- bootstrapModels.add("alfresco/model/wcmModel.xml");
bootstrapModels.add("alfresco/model/applicationModel.xml");
bootstrapModels.add("org/alfresco/repo/security/authentication/userModel.xml");
@@ -423,7 +422,6 @@ public class RepoDictionaryDAOTest extends TestCase
models.add("alfresco/model/dictionaryModel.xml");
models.add("alfresco/model/systemModel.xml");
models.add("alfresco/model/contentModel.xml");
- models.add("alfresco/model/wcmModel.xml");
models.add("alfresco/model/applicationModel.xml");
models.add("org/alfresco/repo/security/authentication/userModel.xml");
models.add("org/alfresco/repo/action/actionModel.xml");
diff --git a/source/test-java/org/alfresco/repo/domain/PropertyValueTest.java b/source/test-java/org/alfresco/repo/domain/PropertyValueTest.java
deleted file mode 100644
index 483a157783..0000000000
--- a/source/test-java/org/alfresco/repo/domain/PropertyValueTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * 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.domain;
-
-import java.util.Locale;
-
-import junit.framework.TestCase;
-
-import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
-import org.alfresco.service.ServiceRegistry;
-import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
-import org.alfresco.service.cmr.repository.MLText;
-import org.alfresco.service.transaction.TransactionService;
-import org.alfresco.test_category.OwnJVMTestsCategory;
-import org.alfresco.util.ApplicationContextHelper;
-import org.junit.experimental.categories.Category;
-import org.springframework.context.ApplicationContext;
-
-/**
- * @see PropertyValue
- *
- * @author Derek Hulley
- */
-@Category(OwnJVMTestsCategory.class)
-public class PropertyValueTest extends TestCase
-{
- private static ApplicationContext ctx = ApplicationContextHelper.getApplicationContext();
-
- public void testMLText()
- {
- ServiceRegistry serviceRegistry = (ServiceRegistry) ctx.getBean(ServiceRegistry.SERVICE_REGISTRY);
- TransactionService txnService = serviceRegistry.getTransactionService();
-
- RetryingTransactionCallback