org.alfresco.repo.web.scripts
Class TestWebScriptRepoServer

java.lang.Object
  extended by org.springframework.extensions.webscripts.TestWebScriptServer
      extended by org.alfresco.repo.web.scripts.TestWebScriptRepoServer
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

public class TestWebScriptRepoServer
extends org.springframework.extensions.webscripts.TestWebScriptServer

Stand-alone Web Script Test Server


Nested Class Summary
 
Nested classes/interfaces inherited from class org.springframework.extensions.webscripts.TestWebScriptServer
org.springframework.extensions.webscripts.TestWebScriptServer.DeleteRequest, org.springframework.extensions.webscripts.TestWebScriptServer.GetRequest, org.springframework.extensions.webscripts.TestWebScriptServer.MockHttpServletResponseResponse, org.springframework.extensions.webscripts.TestWebScriptServer.PatchRequest, org.springframework.extensions.webscripts.TestWebScriptServer.PostRequest, org.springframework.extensions.webscripts.TestWebScriptServer.PutRequest, org.springframework.extensions.webscripts.TestWebScriptServer.Request, org.springframework.extensions.webscripts.TestWebScriptServer.Response
 
Field Summary
 
Fields inherited from class org.springframework.extensions.webscripts.TestWebScriptServer
applicationContext, authenticatorFactory, configService, container, fIn, headers, lastCommand, m_messages, serverProperties, username
 
Constructor Summary
TestWebScriptRepoServer()
           
 
Method Summary
protected  java.lang.String getDefaultUserName()
          Get default user name
static org.springframework.extensions.webscripts.TestWebScriptServer getTestServer()
          
static org.springframework.extensions.webscripts.TestWebScriptServer getTestServer(java.lang.String appendTestConfigLocation)
          Start up a context and get the server bean.
protected  java.lang.String interpretCommand(java.lang.String line)
          Interpret a single command using the BufferedReader passed in for any data needed.
static void main(java.lang.String[] args)
          Main entry point.
 void setAuthenticationService(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
           
 void setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper retryingTransactionHelper)
          Sets helper that provides transaction callbacks
 
Methods inherited from class org.springframework.extensions.webscripts.TestWebScriptServer
afterPropertiesSet, executeCommand, getApplicationContext, getServerProperties, rep, setApplicationContext, setConfigService, setContainer, setMessages, setServletAuthenticatorFactory, submitRequest, submitRequest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestWebScriptRepoServer

public TestWebScriptRepoServer()
Method Detail

main

public static void main(java.lang.String[] args)
Main entry point.


setTransactionHelper

public void setTransactionHelper(org.alfresco.repo.transaction.RetryingTransactionHelper retryingTransactionHelper)
Sets helper that provides transaction callbacks


setAuthenticationService

public void setAuthenticationService(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
Parameters:
authenticationService -

getDefaultUserName

protected java.lang.String getDefaultUserName()
Get default user name

Overrides:
getDefaultUserName in class org.springframework.extensions.webscripts.TestWebScriptServer

getTestServer

public static org.springframework.extensions.webscripts.TestWebScriptServer getTestServer()


getTestServer

public static org.springframework.extensions.webscripts.TestWebScriptServer getTestServer(java.lang.String appendTestConfigLocation)
Start up a context and get the server bean.

This method will close and restart the application context only if the configuration has changed.

Parameters:
appendTestConfigLocation - additional context file to include in the application context
Returns:
Test Server

interpretCommand

protected java.lang.String interpretCommand(java.lang.String line)
                                     throws java.io.IOException
Interpret a single command using the BufferedReader passed in for any data needed.

Overrides:
interpretCommand in class org.springframework.extensions.webscripts.TestWebScriptServer
Parameters:
line - The unparsed command
Returns:
The textual output of the command.
Throws:
java.io.IOException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.