Fill out CMIS Web Service query result set:

- result set driven from select columns (not fixed set of doc/folder props)
- support for multi-valued properties (to v0.5 spec, will have to change for v0.6)

To support AIIM demo.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13728 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2009-03-23 17:22:24 +00:00
parent 43e9338c53
commit cac4d6497e
12 changed files with 662 additions and 67 deletions

View File

@@ -60,11 +60,16 @@ import org.apache.commons.httpclient.params.HttpClientParams;
*/
public abstract class BaseWebScriptTest extends TestCase
{
// Test Listener
private WebScriptTestListener listener = null;
private boolean traceReqRes = false;
/** Local / Remote Server access */
// Local Server access
private static String customContext = null;
private static TestWebScriptServer server = null;
// Remote Server access
private String defaultRunAs = null;
private RemoteServer remoteServer = null;
private HttpClient httpClient = null;
@@ -144,7 +149,17 @@ public abstract class BaseWebScriptTest extends TestCase
this.getWriter().println(log);
}
}
/**
* Sets custom context for Test Web Script Server (in-process only)
* @param customContext
*/
public static void setCustomContext(String customContext)
{
BaseWebScriptTest.customContext = customContext;
}
/**
* Sets Test Listener
*
@@ -186,7 +201,7 @@ public abstract class BaseWebScriptTest extends TestCase
}
/**
* Set Local Run As User
* Set Default Local Run As User
*
* @param localRunAs
*/
@@ -194,7 +209,17 @@ public abstract class BaseWebScriptTest extends TestCase
{
this.defaultRunAs = localRunAs;
}
/**
* Get Default Local Run As User
*
* @return localRunAs
*/
public String getDefaultRunAs()
{
return defaultRunAs;
}
@Override
protected void setUp() throws Exception
{
@@ -208,31 +233,22 @@ public abstract class BaseWebScriptTest extends TestCase
}
}
/** Test web script server */
private static TestWebScriptServer server = null;
protected static TestWebScriptServer getServer()
{
if (BaseWebScriptTest.server == null)
{
BaseWebScriptTest.server = TestWebScriptRepoServer.getTestServer();
if (BaseWebScriptTest.customContext == null)
{
BaseWebScriptTest.server = TestWebScriptRepoServer.getTestServer();
}
else
{
BaseWebScriptTest.server = TestWebScriptRepoServer.getTestServer(customContext);
}
}
return BaseWebScriptTest.server;
}
protected static TestWebScriptServer initServer()
{
return getServer();
}
protected static TestWebScriptServer initServer(String appendTestConfigLocation)
{
if (BaseWebScriptTest.server == null)
{
BaseWebScriptTest.server = TestWebScriptRepoServer.getTestServer(appendTestConfigLocation);
}
return BaseWebScriptTest.server;
}
/**
* Is Log Enabled?

View File

@@ -85,10 +85,9 @@ public class AssetTest extends BaseWebScriptTest {
@Override
protected void setUp() throws Exception
{
setCustomContext(SUBMIT_CONFIG_LOCATION);
super.setUp();
initServer(SUBMIT_CONFIG_LOCATION);
this.authenticationService = (AuthenticationService)getServer().getApplicationContext().getBean("AuthenticationService");
this.authenticationComponent = (AuthenticationComponent)getServer().getApplicationContext().getBean("authenticationComponent");
this.personService = (PersonService)getServer().getApplicationContext().getBean("PersonService");