Upgrade Spring (REPO-1295), Quartz (REPO-3049) and remove Hibernate (REPO-2873) (#45)

* Change context file schemas
* Change quartz related usages
This commit is contained in:
Alex Mukha
2018-03-04 16:58:48 +00:00
committed by GitHub
parent dbe4c07bd6
commit b2b0c9e660
21 changed files with 284 additions and 568 deletions

View File

@@ -35,16 +35,16 @@
<dir.root>${project.build.directory}/alf_data</dir.root>
<img.exe>convert</img.exe>
<dependency.alfresco-repository.version>6.27</dependency.alfresco-repository.version>
<dependency.alfresco-core.version>6.18</dependency.alfresco-core.version>
<dependency.alfresco-data-model.version>7.3</dependency.alfresco-data-model.version>
<dependency.alfresco-repository.version>6.28</dependency.alfresco-repository.version>
<dependency.alfresco-core.version>7.0</dependency.alfresco-core.version>
<dependency.alfresco-data-model.version>8.0</dependency.alfresco-data-model.version>
<dependency.alfresco-pdf-renderer.version>1.1</dependency.alfresco-pdf-renderer.version>
<dependency.jackson.version>2.8.10</dependency.jackson.version>
<dependency.webscripts.version>6.13</dependency.webscripts.version>
<dependency.opencmis.version>1.0.0</dependency.opencmis.version>
<dependency.spring.version>3.2.17.RELEASE</dependency.spring.version>
<dependency.spring.version>5.0.4.RELEASE</dependency.spring.version>
<dependency.postgresql.version>9.4.1212</dependency.postgresql.version>
<dependency.mysql.version>5.1.40</dependency.mysql.version>
</properties>

View File

@@ -1,28 +1,28 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.framework.core;
import java.lang.annotation.Annotation;
@@ -31,12 +31,12 @@ import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import org.alfresco.rest.framework.Operation;
import org.alfresco.rest.framework.Operation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.core.BridgeMethodResolver;
import org.springframework.core.GenericCollectionTypeResolver;
import org.springframework.core.GenericTypeResolver;
import org.springframework.core.ResolvableType;
import org.springframework.core.annotation.AnnotationUtils;
/**
@@ -57,56 +57,56 @@ public class ResourceInspectorUtil
protected static Class determineType(Class resource, Method method)
{
Method resolvedMethod = BridgeMethodResolver.findBridgedMethod(method);
/*
* The api is consistent that the object passed in must match the object passed out
* however, operations are different, if the param is supplied it doesn't have to match
* the return type.
* So we need special logic for operations
*/
Annotation annot = AnnotationUtils.findAnnotation(resolvedMethod, Operation.class);
if (annot != null)
/*
* The api is consistent that the object passed in must match the object passed out
* however, operations are different, if the param is supplied it doesn't have to match
* the return type.
* So we need special logic for operations
*/
Annotation annot = AnnotationUtils.findAnnotation(resolvedMethod, Operation.class);
if (annot != null)
{
return determineOperationType(resource, method);
return determineOperationType(resource, method);
}
else
{
Class returnType = GenericTypeResolver.resolveReturnType(resolvedMethod, resource);
if (List.class.isAssignableFrom(returnType))
{
return ResolvableType.forMethodReturnType(method).asCollection().getGeneric(0).resolve();
}
return returnType;
}
else
{
Class returnType = GenericTypeResolver.resolveReturnType(resolvedMethod, resource);
if (List.class.isAssignableFrom(returnType))
{
return GenericCollectionTypeResolver.getCollectionReturnType(method);
}
return returnType;
}
}
protected static Class determineOperationType(Class resource, Method method)
{
//Its an operation annotated method and its a bit special
Class<?>[] paramTypes = method.getParameterTypes();
if (paramTypes!= null)
{
switch (paramTypes.length)
{
case 4:
//EntityResource operation by id, same logic as RelationshipEntityResource operation by id
case 5:
int position = paramTypes.length-3;
if (Void.class.equals(paramTypes[position]))
{
return null;
}
else
{
return paramTypes[position];
}
}
}
throw new IllegalArgumentException("Your method signature should have 4 parameters (uniqueId, typePassedin, Parameters, WithResponse)," +
" use Void if you are not interested in the second argument. "+resource.getName()+ " "+ method.getName());
}
protected static Class determineOperationType(Class resource, Method method)
{
//Its an operation annotated method and its a bit special
Class<?>[] paramTypes = method.getParameterTypes();
if (paramTypes!= null)
{
switch (paramTypes.length)
{
case 4:
//EntityResource operation by id, same logic as RelationshipEntityResource operation by id
case 5:
int position = paramTypes.length-3;
if (Void.class.equals(paramTypes[position]))
{
return null;
}
else
{
return paramTypes[position];
}
}
}
throw new IllegalArgumentException("Your method signature should have 4 parameters (uniqueId, typePassedin, Parameters, WithResponse)," +
" use Void if you are not interested in the second argument. "+resource.getName()+ " "+ method.getName());
}
/**
* Finds methods for the given annotation
*
@@ -121,7 +121,7 @@ public class ResourceInspectorUtil
* @return - the List of Method or an empty List
*/
@SuppressWarnings("rawtypes")
public static List<Method> findMethodsByAnnotation(Class objClass, Class<? extends Annotation> annotationType)
public static List<Method> findMethodsByAnnotation(Class objClass, Class<? extends Annotation> annotationType)
{
List<Method> annotatedMethods = new ArrayList<Method>();
@@ -139,24 +139,24 @@ public class ResourceInspectorUtil
return annotatedMethods;
}
/**
* Invokes a no arg method and returns the result
* @param annotatedMethod Method
* @param obj Object
* @return result of method call
*/
public static Object invokeMethod(Method annotatedMethod, Object obj)
{
try
{
return invokeMethod(annotatedMethod, obj, null);
}
catch (Throwable error)
{
logger.error("Invocation failure", error);
return null;
}
}
/**
* Invokes a no arg method and returns the result
* @param annotatedMethod Method
* @param obj Object
* @return result of method call
*/
public static Object invokeMethod(Method annotatedMethod, Object obj)
{
try
{
return invokeMethod(annotatedMethod, obj, null);
}
catch (Throwable error)
{
logger.error("Invocation failure", error);
return null;
}
}
/**
* Invokes a method and returns the result
@@ -164,13 +164,13 @@ public class ResourceInspectorUtil
* @param obj Object
* @return result of method call
*/
public static Object invokeMethod(Method annotatedMethod, Object obj, Object... args) throws Throwable
public static Object invokeMethod(Method annotatedMethod, Object obj, Object... args) throws Throwable
{
if (annotatedMethod != null)
{
try
{
return annotatedMethod.invoke(obj, args);
return annotatedMethod.invoke(obj, args);
}
catch (IllegalArgumentException error)
{
@@ -183,7 +183,7 @@ public class ResourceInspectorUtil
catch (InvocationTargetException error)
{
logger.warn("InvocationTargetException", error);
throw error.getCause();
throw error.getCause();
}
}
return null;

View File

@@ -139,9 +139,9 @@ public class ResourceWebScriptPut extends AbstractResourceWebScript implements P
{
MediaType media = MediaType.parseMediaType(req.getContentType());
contentType = media.getType()+'/'+media.getSubtype();
if (media.getCharSet() != null)
if (media.getCharset() != null)
{
encoding = media.getCharSet().toString();
encoding = media.getCharset().toString();
}
}

View File

@@ -1,7 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN 2.0//EN' 'http://www.springframework.org/dtd/spring-beans-2.0.dtd'>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<beans>
<bean id="abstractBlogWebScript" parent="webscript" abstract="true">
<property name="repository" ref="repositoryHelper"/>
<property name="blogService" ref="BlogService"/>

View File

@@ -2,8 +2,8 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="publicapi.webscripts.store" parent="webscripts.repoclasspathstore">
<property name="mustExist"><value>true</value></property>
@@ -42,7 +42,7 @@
<bean name="publicapi.webScriptsRegistryCache" class="org.alfresco.repo.web.scripts.RegistryAsynchronouslyRefreshedCache" parent="abstractAsynchronouslyRefreshedCache">
<property name="registryFactory">
<bean class="org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean">
<property name="targetBeanName"><idref local="publicapi.registry.prototype"/></property>
<property name="targetBeanName"><idref bean="publicapi.registry.prototype"/></property>
</bean>
</property>
<property name="retryingTransactionHelper" ref="retryingTransactionHelper" />

View File

@@ -1,7 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="webdav.initParams" class="org.alfresco.repo.webdav.WebDAVServlet$WebDAVInitParameters">
<property name="enabled" value="${system.webdav.servlet.enabled}" />

View File

@@ -1,7 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN 2.0//EN' 'http://www.springframework.org/dtd/spring-beans-2.0.dtd'>
<beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- -->
<!-- Web Script Configuration -->
@@ -185,7 +186,7 @@
<bean name="webScriptsRegistryCache" class="org.alfresco.repo.web.scripts.RegistryAsynchronouslyRefreshedCache" parent="abstractAsynchronouslyRefreshedCache">
<property name="registryFactory">
<bean class="org.springframework.beans.factory.config.ObjectFactoryCreatingFactoryBean">
<property name="targetBeanName"><idref local="webscripts.registry.prototype"/></property>
<property name="targetBeanName"><idref bean="webscripts.registry.prototype"/></property>
</bean>
</property>
<property name="retryingTransactionHelper" ref="retryingTransactionHelper" />

View File

@@ -68,10 +68,6 @@ import org.junit.runners.Suite;
// these tests run very fast once the context is up
org.alfresco.repo.remoteticket.RemoteAlfrescoTicketServiceTest.class,
org.alfresco.repo.web.scripts.servlet.RemoteAuthenticatorFactoryTest.class,
// [classpath:alfresco/application-context.xml, classpath:subsystem-test-context.xml]
org.alfresco.repo.management.subsystems.test.SubsystemsTest.class,
// [classpath:alfresco/application-context.xml]
org.alfresco.repo.webdav.GetMethodRegressionTest.class,

View File

@@ -1,228 +0,0 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.management.subsystems.test;
import java.io.IOException;
import java.net.InetAddress;
import java.net.ServerSocket;
import java.net.SocketTimeoutException;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.repo.management.subsystems.ApplicationContextFactory;
import org.alfresco.repo.management.subsystems.ChildApplicationContextFactory;
import org.alfresco.repo.management.subsystems.InvalidPropertyValueException;
import org.alfresco.repo.management.subsystems.SubsystemEarlyPropertyChecker;
import org.alfresco.test_category.OwnJVMTestsCategory;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.BaseSpringTest;
import org.apache.commons.logging.LogFactory;
import org.junit.experimental.categories.Category;
import org.springframework.context.ConfigurableApplicationContext;
/**
* Ensures the following features of subsystems are working:
* <ul>
* <li>Subsystem default properties
* <li>Global property overrides (via alfresco-global.properties)
* <li>Subsystem instance specific property overrides (via extension classpath)
* <li>Subsystem instance specific Spring overrides (via extension classpath)
* <li>Composite property defaults
* <li>Composite property instance overrides
* </ul>
*
* @see ChildApplicationContextFactory
* @author dward
*/
@Category(OwnJVMTestsCategory.class)
public class SubsystemsTest extends BaseSpringTest
{
volatile boolean shouldBlockPort;
/*
* (non-Javadoc)
* @see org.alfresco.util.BaseSpringTest#getConfigLocations()
*/
@Override
protected String[] getConfigLocations()
{
return new String[]
{
ApplicationContextHelper.CONFIG_LOCATIONS[0], "classpath:subsystem-test-context.xml"
};
}
/**
* Test subsystems.
*
* @throws Exception
* the exception
*/
public void testSubsystems() throws Exception
{
ApplicationContextFactory subsystem = (ApplicationContextFactory) getApplicationContext().getBean(
"testsubsystem");
ConfigurableApplicationContext childContext = (ConfigurableApplicationContext) subsystem
.getApplicationContext();
assertTrue("Subsystem not started", childContext.isActive());
TestService testService = (TestService) childContext.getBean("testService");
// Make sure subsystem defaults work
assertEquals("Subsystem Default1", testService.getSimpleProp1());
// Make sure global property overrides work
assertEquals(true, testService.getSimpleProp2().booleanValue());
// Make sure extension classpath property overrides work
assertEquals("Instance Override3", testService.getSimpleProp3());
// Make sure extension classpath Spring overrides work
assertEquals("An extra bean I changed", childContext.getBean("anotherBean"));
// Make sure composite properties and their defaults work
TestBean[] testBeans = testService.getTestBeans();
assertNotNull("Composite property not set", testBeans);
assertEquals(3, testBeans.length);
assertEquals("inst1", testBeans[0].getId());
assertEquals(false, testBeans[0].isBoolProperty());
assertEquals(123456789123456789L, testBeans[0].getLongProperty());
assertEquals("Global Default", testBeans[0].getAnotherStringProperty());
assertEquals("inst2", testBeans[1].getId());
assertEquals(true, testBeans[1].isBoolProperty());
assertEquals(123456789123456789L, testBeans[1].getLongProperty());
assertEquals("Global Default", testBeans[1].getAnotherStringProperty());
assertEquals("inst3", testBeans[2].getId());
assertEquals(false, testBeans[2].isBoolProperty());
assertEquals(123456789123456789L, testBeans[2].getLongProperty());
assertEquals("Global Instance Default", testBeans[2].getAnotherStringProperty());
}
public void testAbstractPropertyBackedBean_performEarlyPropertyChecks_PortEarlyPropertyChecker()
{
int testPortNumber = (Integer) getApplicationContext().getBean("testPortNumber");
String testHost = (String) getApplicationContext().getBean("testHost");
ChildApplicationContextFactory testBean = (ChildApplicationContextFactory) getApplicationContext().getBean("testsubsystem");
Map<String, String> testProperties = new HashMap<String, String>();
// Check for empty port value error:
testProperties.put("test1.port", "");
// Check for "unable to parse" error:
testProperties.put("test2.port", "123xy");
// Check for "out-of-bounds" (less than) error:
testProperties.put("test3.port", "0");
// Check for "out of bounds" (greater than) error:
testProperties.put("test4.port", "65536");
// Check for "port in use" error:
testProperties.put("test5.port", "" + testPortNumber);
String errorMessage = testBean.performEarlyPropertyChecks(testProperties);
assertTrue(errorMessage.contains("The value for TestSubsystem port property cannot be empty."));
assertTrue(errorMessage.contains("Unable to parse value for TestSubsystem port property: 123xy."));
assertTrue(errorMessage.contains("The port chosen for TestSubsystem is outside the required range (1, 65535): 0."));
assertTrue(errorMessage.contains("The port chosen for TestSubsystem is outside the required range (1, 65535): 65536."));
assertTrue(errorMessage.contains(
"The port chosen for TestSubsystem is already in use or you don't have permission to use it: " + testPortNumber + "."));
testProperties.clear();
testProperties.put("test_with_host.port", "" + testPortNumber);
// Check for unknown host:
testProperties.put("test.subsystem.host", testHost);
errorMessage = testBean.performEarlyPropertyChecks(testProperties);
assertTrue(errorMessage.contains(
"The hostname chosen for TestSubsystem is unknown or misspelled: " + testProperties.get("test.subsystem.host") + "."));
}
public void testAbstractPropertyBackedBean_performEarlyPropertyChecks_CustomEarlyPropertyChecker()
{
ChildApplicationContextFactory testBean = new ChildApplicationContextFactory();
SubsystemEarlyPropertyChecker testEarlyPropertyChecker = new SubsystemEarlyPropertyChecker()
{
@Override
public void checkPropertyValue(String propertyName, String propertyValue, String pairedPropertyValue) throws InvalidPropertyValueException
{
if (propertyValue == null || propertyValue.isEmpty())
{
throw new InvalidPropertyValueException("Property value cannot be empty.");
}
if (pairedPropertyValue == null)
{
if (propertyValue.equals("Bad value"))
{
throw new InvalidPropertyValueException("Property value cannot be a 'Bad value'.");
}
}
else if ((propertyValue + pairedPropertyValue).contains("bad value"))
{
throw new InvalidPropertyValueException("No 'bad value's allowed!");
}
}
@Override
public String getPairedPropertyName()
{
return "testPairedPropertyName";
}
};
Map<String, SubsystemEarlyPropertyChecker> earlyPropertyCheckersMap = new HashMap<String, SubsystemEarlyPropertyChecker>();
earlyPropertyCheckersMap.put("test1.property", testEarlyPropertyChecker);
earlyPropertyCheckersMap.put("test2.property", testEarlyPropertyChecker);
testBean.setEarlyPropertyCheckers(earlyPropertyCheckersMap);
Map<String, String> testProperties = new HashMap<String, String>();
// Test empty value error:
testProperties.put("test1.property", "");
// Test "Bad value" error:
testProperties.put("test2.property", "Bad value");
String errorMessage = testBean.performEarlyPropertyChecks(testProperties);
assertTrue(errorMessage.contains("Property value cannot be empty."));
assertTrue(errorMessage.contains("Property value cannot be a 'Bad value'."));
earlyPropertyCheckersMap.clear();
earlyPropertyCheckersMap.put("test3.property", testEarlyPropertyChecker);
testProperties.clear();
testProperties.put("testPairedPropertyName", "Test paired property bad value");
testProperties.put("test3.property", "Test property value");
errorMessage = testBean.performEarlyPropertyChecks(testProperties);
assertTrue(errorMessage.contains("No 'bad value's allowed!"));
}
}

View File

@@ -1,72 +0,0 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.management.subsystems.test;
import java.io.IOException;
import org.alfresco.repo.management.subsystems.PortEarlyPropertyChecker;
public class TestPortEarlyPropertyChecker extends PortEarlyPropertyChecker
{
private int blockedPort = -1;
private String wrongHost = "";
public TestPortEarlyPropertyChecker(String subsystemName, boolean hasMultiplePorts,
boolean shouldCheckForBlockedPort)
{
super(subsystemName, hasMultiplePorts, shouldCheckForBlockedPort);
}
public TestPortEarlyPropertyChecker(String subsystemName, String requiredPairedPropertyName,
boolean hasMultiplePorts, boolean shouldCheckForBlockedPort)
{
super(subsystemName, requiredPairedPropertyName, hasMultiplePorts,
shouldCheckForBlockedPort);
}
public void setBlockedPort(int blockedPort)
{
this.blockedPort = blockedPort;
}
public void setWrongHost(String wrongHost)
{
this.wrongHost = wrongHost;
}
@Override
public void checkPort(int portNumber, String host) throws IOException
{
if (portNumber == blockedPort)
{
throw new java.net.BindException();
}
if (wrongHost.equals(host))
{
throw new java.net.UnknownHostException();
}
}
}

View File

@@ -1,28 +1,28 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.repo.web.scripts;
import java.sql.SQLException;
@@ -42,11 +42,12 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.service.cmr.repository.ContentIOException;
import org.alfresco.service.cmr.security.MutableAuthenticationService;
import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.util.CronTriggerBean;
import org.alfresco.util.PropertyMap;
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.quartz.CronTrigger;
import org.quartz.Scheduler;
import org.springframework.extensions.webscripts.Authenticator;
import org.springframework.extensions.webscripts.TestWebScriptServer.GetRequest;
import org.springframework.extensions.webscripts.TestWebScriptServer.PutRequest;
@@ -161,13 +162,12 @@ public class RepositoryContainerTest extends BaseWebScriptTest
assertEquals(SUCCESS, response.getContentAsString());
// trigger the webscript temp folder cleaner job
CronTriggerBean webscriptsTempFileCleanerJobTrigger = (CronTriggerBean) getServer().getApplicationContext().getBean("webscripts.tempFileCleanerTrigger");
webscriptsTempFileCleanerJobTrigger.getScheduler().triggerJobWithVolatileTrigger(
webscriptsTempFileCleanerJobTrigger.getJobDetail().getName(),
webscriptsTempFileCleanerJobTrigger.getJobDetail().getGroup(),
webscriptsTempFileCleanerJobTrigger.getJobDetail().getJobDataMap());
CronTrigger webscriptsTempFileCleanerJobTrigger = (CronTrigger) getServer().getApplicationContext().getBean("webscripts.tempFileCleanerTrigger");
Scheduler scheduler = (Scheduler) getServer().getApplicationContext().getBean("schedulerFactory");
scheduler.triggerJob(webscriptsTempFileCleanerJobTrigger.getJobKey());
// check that we still can upload file larger than 4 mb, i.e. ensure that cleaner has not deleted temp folder
response = sendRequest(new PutRequest("/test/largecontenttest", content, "text/plain"), STATUS_OK);
assertEquals(SUCCESS, response.getContentAsString());

View File

@@ -25,11 +25,15 @@
*/
package org.alfresco.repo.webdav;
import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.action.executer.ContentMetadataExtracter;
import org.alfresco.repo.model.Repository;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.permissions.AccessDeniedException;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.rest.api.tests.client.data.Action;
import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.coci.CheckOutCheckInService;
import org.alfresco.service.cmr.lock.LockService;
import org.alfresco.service.cmr.lock.LockStatus;
@@ -78,6 +82,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
/**
* Unit tests for the {@link PutMethod} class.
@@ -114,6 +120,7 @@ public class PutMethodTest
private ContentService contentService;
private CheckOutCheckInService checkOutCheckInService;
private PermissionService permissionService;
private ActionService actionService;
private Repository repositoryHelper;
private NodeRef companyHomeNodeRef;
@@ -148,6 +155,7 @@ public class PutMethodTest
checkOutCheckInService = ctx.getBean("CheckOutCheckInService", CheckOutCheckInService.class);
permissionService = ctx.getBean("PermissionService", PermissionService.class);
namespaceService = ctx.getBean("namespaceService", NamespaceService.class);
actionService = ctx.getBean("ActionService", ActionService.class);
AuthenticationUtil.setFullyAuthenticatedUser(AuthenticationUtil.getAdminUserName());
@@ -805,8 +813,14 @@ public class PutMethodTest
String lockHeaderValue = "(<" + WebDAV.OPAQUE_LOCK_TOKEN + lockToken + ">)";
HashMap<String, String> headers = new HashMap<String, String>();
headers.put(WebDAV.HEADER_IF, lockHeaderValue);
// Simulate any failure during the content write
// null content is no longer null in MockHttpServletRequest (Spring 5)
ActionService mockActionService = mock(ActionService.class);
when(mockActionService.createAction(ContentMetadataExtracter.EXECUTOR_NAME))
.thenThrow(new AlfrescoRuntimeException("Negative test"));
try
{
webDAVHelper.setActionService(mockActionService);
// setting a null content
executeMethod(WebDAV.METHOD_PUT, fileName, null, headers);
@@ -824,6 +838,10 @@ public class PutMethodTest
{
throw new RuntimeException("Failed to upload a file", e);
}
finally
{
webDAVHelper.setActionService(actionService);
}
if (fileNoderef != null && nodeService.exists(fileNoderef))
{

View File

@@ -145,10 +145,11 @@ import org.apache.commons.logging.LogFactory;
import org.json.JSONException;
import org.json.simple.JSONObject;
import org.json.simple.JSONValue;
import org.quartz.CronTrigger;
import org.quartz.JobDetail;
import org.quartz.JobExecutionException;
import org.quartz.Scheduler;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.quartz.JobDetailBean;
import com.google.common.collect.AbstractIterator;
@@ -185,11 +186,11 @@ public class RepoService
protected TenantService tenantService;
protected TenantAdminService tenantAdminService;
protected ActivityPostDAO postDAO;
protected JobDetailBean feedGeneratorJobDetail;
protected JobDetailBean postLookupJobDetail;
protected JobDetailBean feedCleanerJobDetail;
protected JobDetailBean postCleanerJobDetail;
protected JobDetailBean feedNotifierJobDetail;
protected JobDetail feedGeneratorJobDetail;
protected JobDetail postLookupJobDetail;
protected JobDetail feedCleanerJobDetail;
protected JobDetail postCleanerJobDetail;
protected JobDetail feedNotifierJobDetail;
protected ContentStoreCleaner contentStoreCleaner;
protected FeedCleaner feedCleaner;
protected PersonService personService;
@@ -264,27 +265,27 @@ public class RepoService
this.transactionHelper = (RetryingTransactionHelper)applicationContext.getBean("retryingTransactionHelper");
Scheduler scheduler = (Scheduler)applicationContext.getBean("schedulerFactory");
JobDetailBean contentStoreCleanerJobDetail = (JobDetailBean)applicationContext.getBean("contentStoreCleanerJobDetail");
scheduler.pauseJob(contentStoreCleanerJobDetail.getName(), contentStoreCleanerJobDetail.getGroup());
CronTrigger contentStoreCleanerTrigger = (CronTrigger)applicationContext.getBean("contentStoreCleanerTrigger");
scheduler.pauseJob(contentStoreCleanerTrigger.getJobKey());
ChildApplicationContextFactory activitiesFeed = (ChildApplicationContextFactory)applicationContext.getBean("ActivitiesFeed");
ApplicationContext activitiesFeedCtx = activitiesFeed.getApplicationContext();
this.postLookup = (PostLookup)activitiesFeedCtx.getBean("postLookup");
this.feedGenerator = (FeedGenerator)activitiesFeedCtx.getBean("feedGenerator");
this.feedGeneratorJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedGeneratorJobDetail");
this.postLookupJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("postLookupJobDetail");
this.feedCleanerJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedCleanerJobDetail");
this.postCleanerJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("postCleanerJobDetail");
this.feedNotifierJobDetail = (JobDetailBean)activitiesFeedCtx.getBean("feedNotifierJobDetail");
this.feedGeneratorJobDetail = (JobDetail)activitiesFeedCtx.getBean("feedGeneratorJobDetail");
this.postLookupJobDetail = (JobDetail)activitiesFeedCtx.getBean("postLookupJobDetail");
this.feedCleanerJobDetail = (JobDetail)activitiesFeedCtx.getBean("feedCleanerJobDetail");
this.postCleanerJobDetail = (JobDetail)activitiesFeedCtx.getBean("postCleanerJobDetail");
this.feedNotifierJobDetail = (JobDetail)activitiesFeedCtx.getBean("feedNotifierJobDetail");
this.feedCleaner = (FeedCleaner)activitiesFeedCtx.getBean("feedCleaner");
// Pause activities jobs so that we aren't competing with their scheduled versions
scheduler.pauseJob(feedGeneratorJobDetail.getName(), feedGeneratorJobDetail.getGroup());
scheduler.pauseJob(postLookupJobDetail.getName(), postLookupJobDetail.getGroup());
scheduler.pauseJob(feedCleanerJobDetail.getName(), feedCleanerJobDetail.getGroup());
scheduler.pauseJob(postCleanerJobDetail.getName(), postCleanerJobDetail.getGroup());
scheduler.pauseJob(feedNotifierJobDetail.getName(), feedNotifierJobDetail.getGroup());
scheduler.pauseJob(feedGeneratorJobDetail.getKey());
scheduler.pauseJob(postLookupJobDetail.getKey());
scheduler.pauseJob(feedCleanerJobDetail.getKey());
scheduler.pauseJob(postCleanerJobDetail.getKey());
scheduler.pauseJob(feedNotifierJobDetail.getKey());
this.systemNetwork = new TestNetwork(TenantService.DEFAULT_DOMAIN, true);
}

View File

@@ -35,7 +35,6 @@ import org.alfresco.opencmis.OpenCMISClientContext;
import org.alfresco.opencmis.tck.tests.query.QueryForObjectCustom;
import org.alfresco.opencmis.tck.tests.query.QueryInFolderTestCustom;
import org.alfresco.opencmis.tck.tests.query.QueryLikeTestCustom;
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect;
import org.alfresco.rest.api.tests.RepoService.TestNetwork;
import org.alfresco.util.testing.category.LuceneTests;
import org.alfresco.util.testing.category.RedundantTests;
@@ -52,7 +51,6 @@ import org.apache.chemistry.opencmis.tck.tests.query.QuerySmokeTest;
import org.apache.chemistry.opencmis.tck.tests.versioning.VersioningTestGroup;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.dialect.Dialect;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.Test;
@@ -72,9 +70,10 @@ public class TestPublicApiAtomPub10TCK extends AbstractEnterpriseOpenCMIS10TCKTe
@Before
public void before() throws Exception
{
//see REPO-1524
Dialect dialect = (Dialect) applicationContext.getBean("dialect");
assumeFalse(dialect instanceof AlfrescoOracle9Dialect);
// see REPO-1524
// the tests are always run on PostgreSQL only
// Dialect dialect = (Dialect) applicationContext.getBean("dialect");
// assumeFalse(dialect instanceof Oracle9Dialect);
int port = getTestFixture().getJettyComponent().getPort();
TestNetwork network = getTestFixture().getRandomNetwork();

View File

@@ -1,44 +1,42 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.api.tests;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeFalse;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.opencmis.OpenCMISClientContext;
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect;
import org.alfresco.opencmis.OpenCMISClientContext;
import org.alfresco.rest.api.tests.RepoService.TestNetwork;
import org.apache.chemistry.opencmis.commons.enums.BindingType;
import org.apache.chemistry.opencmis.tck.impl.TestParameters;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.dialect.Dialect;
import org.apache.commons.logging.LogFactory;
import org.junit.AfterClass;
import org.junit.Before;
@@ -55,10 +53,11 @@ public class TestPublicApiAtomPub11TCK extends AbstractEnterpriseOpenCMIS11TCKTe
@Before
public void before() throws Exception
{
//see REPO-1524
Dialect dialect = (Dialect) applicationContext.getBean("dialect");
assumeFalse(dialect instanceof AlfrescoOracle9Dialect);
{
// see REPO-1524
// the tests are always run on PostgreSQL only
// Dialect dialect = (Dialect) applicationContext.getBean("dialect");
// assumeFalse(dialect instanceof Oracle9Dialect);
int port = getTestFixture().getJettyComponent().getPort();
TestNetwork network = getTestFixture().getRandomNetwork();

View File

@@ -1,44 +1,42 @@
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
/*
* #%L
* Alfresco Remote API
* %%
* Copyright (C) 2005 - 2016 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* 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 <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.api.tests;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeFalse;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Map;
import org.alfresco.opencmis.OpenCMISClientContext;
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoOracle9Dialect;
import org.alfresco.opencmis.OpenCMISClientContext;
import org.alfresco.rest.api.tests.RepoService.TestNetwork;
import org.apache.chemistry.opencmis.commons.enums.BindingType;
import org.apache.chemistry.opencmis.tck.impl.TestParameters;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.dialect.Dialect;
import org.apache.commons.logging.LogFactory;
import org.junit.Before;
/**
@@ -54,10 +52,11 @@ public class TestPublicApiBrowser11TCK extends AbstractEnterpriseOpenCMIS11TCKTe
@Before
public void before() throws Exception
{
//see REPO-1524
Dialect dialect = (Dialect) applicationContext.getBean("dialect");
assumeFalse(dialect instanceof AlfrescoOracle9Dialect);
{
// see REPO-1524
// the tests are always run on PostgreSQL only
// Dialect dialect = (Dialect) applicationContext.getBean("dialect");
// assumeFalse(dialect instanceof Oracle9Dialect);
int port = getTestFixture().getJettyComponent().getPort();
TestNetwork network = getTestFixture().getRandomNetwork();

View File

@@ -34,7 +34,6 @@ import java.util.Map;
import javax.transaction.Status;
import javax.transaction.UserTransaction;
import org.alfresco.repo.domain.hibernate.dialect.AlfrescoSQLServerDialect;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.workflow.WorkflowModel;
import org.alfresco.rest.framework.resource.parameters.CollectionWithPagingInfo;
@@ -55,7 +54,6 @@ import org.alfresco.service.cmr.workflow.WorkflowService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.ApplicationContextHelper;
import org.alfresco.util.testing.category.LuceneTests;
import org.hibernate.dialect.Dialect;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -211,15 +209,16 @@ public class ProcessesImplTest extends TestCase implements RecognizedParamsExtra
@Test
public void testGetProcessesMatchesIgnoreCaseNoResults()
{
Dialect dialect = (Dialect) applicationContext.getBean("dialect");
if (dialect instanceof AlfrescoSQLServerDialect)
{
{
// the tests are always run on PostgreSQL only
// Dialect dialect = (Dialect) applicationContext.getBean("dialect");
// if (dialect instanceof AlfrescoSQLServerDialect)
// {
// REPO-1104: we do not run this test on MS SQL server because it will fail
// until the Activiti defect related to REPO-1104 will be fixed
// this test could fail on other DBs where the LIKE operator behaves as case insensitive
return;
}
// return;
// }
CollectionWithPagingInfo<ProcessInfo> result = queryMatchesProcesses("test workflow api calls review and approve");
assertNotNull(result);

View File

@@ -1,7 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<beans>
<import resource="classpath:alfresco/application-context.xml"/>
<import resource="classpath:alfresco/web-scripts-application-context.xml"/>

View File

@@ -1,6 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN 2.0//EN' 'http://www.springframework.org/dtd/spring-beans-2.0.dtd'>
<beans>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="org.alfresco.repository.quickshare.abstract" class="org.alfresco.repo.web.scripts.quickshare.AbstractQuickShareContent" abstract="true">
<property name="quickShareService" ref="QuickShareService" />
<property name="enabled" value="false" />

View File

@@ -1,13 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:mongo="http://www.springframework.org/schema/data/mongo"
xsi:schemaLocation="http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/data/mongo
http://www.springframework.org/schema/data/mongo/spring-mongo-1.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="httpClientProvider" class="org.alfresco.rest.api.tests.client.SharedHttpClientProvider">
<constructor-arg name="alfrescoUrl" value="http://localhost:8081/alfresco/" />
<constructor-arg name="maxNumberOfConnections" value="2" />

View File

@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="apiLookup" class="org.alfresco.rest.framework.core.ResourceLookupDictionary">
</bean>