mirror of
https://github.com/Alfresco/alfresco-sdk.git
synced 2025-05-19 17:15:24 +00:00
fix demo to work
This commit is contained in:
parent
fe2fdd3c06
commit
f3df237cf0
@ -38,7 +38,7 @@ public class Demo
|
||||
WebElement ticket = driver.findElement(By.tagName("ticket"));
|
||||
String token =String.format("?alf_ticket=%s",ticket.getText());
|
||||
//Navigate to sample page with token
|
||||
driver.get("http://localhost:8080/alfresco/service/summit/hello" + token);
|
||||
driver.get("http://localhost:8080/alfresco/service/sample/helloworld" + token);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -22,13 +22,8 @@
|
||||
<bean id="changeme.exampleBean" class="org.alfresco.demoamp.Demo" init-method="init" />
|
||||
|
||||
<!-- A simple module component that will be executed once -->
|
||||
<bean id="changeme.exampleComponent" class="org.alfresco.demoamp.DemoComponent" parent="module.baseComponent" >
|
||||
<property name="moduleId" value="${project.artifactId}" /> <!-- See module.properties -->
|
||||
<property name="name" value="exampleComponent" />
|
||||
<property name="description" value="A demonstration component" />
|
||||
<property name="sinceVersion" value="2.0" />
|
||||
<property name="appliesFromVersion" value="2.0" />
|
||||
<property name="nodeService" ref="NodeService" />
|
||||
<bean id="webscript.webscript.get" class="org.alfresco.demoamp.DemoComponent" parent="webscript">
|
||||
<property name="nodeService" ref="NodeService"/>
|
||||
<property name="nodeLocatorService" ref="nodeLocatorService" />
|
||||
</bean>
|
||||
|
||||
|
@ -19,12 +19,12 @@ import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.module.AbstractModuleComponent;
|
||||
import org.alfresco.repo.nodelocator.NodeLocatorService;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.extensions.webscripts.DeclarativeWebScript;
|
||||
import org.springframework.extensions.webscripts.Status;
|
||||
import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||
|
||||
@ -38,12 +38,10 @@ import org.springframework.extensions.webscripts.WebScriptRequest;
|
||||
* @author Maurizio Pillitu
|
||||
* @author Michael Suzuki
|
||||
*/
|
||||
public class DemoComponent extends AbstractModuleComponent
|
||||
public class DemoComponent extends DeclarativeWebScript
|
||||
{
|
||||
Log log = LogFactory.getLog(DemoComponent.class);
|
||||
|
||||
private NodeService nodeService;
|
||||
|
||||
private NodeLocatorService nodeLocatorService;
|
||||
|
||||
public void setNodeService(NodeService nodeService)
|
||||
@ -56,17 +54,6 @@ public class DemoComponent extends AbstractModuleComponent
|
||||
this.nodeLocatorService = nodeLocatorService;
|
||||
}
|
||||
|
||||
/**
|
||||
* Bogus component execution
|
||||
*/
|
||||
@Override
|
||||
protected void executeInternal() throws Throwable
|
||||
{
|
||||
System.out.println("DemoComponent has been executed");
|
||||
log.debug("Test debug logging. Congratulation your AMP is working");
|
||||
log.info("This is only for information purposed. Better remove me from the log in Production");
|
||||
}
|
||||
|
||||
/**
|
||||
* This is a demo service interaction with Alfresco Foundation API.
|
||||
* This sample method returns the number of child nodes of a certain type
|
||||
|
Loading…
x
Reference in New Issue
Block a user