Search in sources :

Example 1 with ProcessDefinition

use of com.adobe.acs.commons.mcp.ProcessDefinition in project acs-aem-commons by Adobe-Consulting-Services.

the class FactoryInjectionTest method testAssetReportFactory.

@Test
public void testAssetReportFactory() throws Exception {
    ProcessDefinition def = cpm.findDefinitionByNameOrPath("Asset Report");
    assertNotNull(def);
    assertTrue(def instanceof AssetReport);
}
Also used : AssetReport(com.adobe.acs.commons.mcp.impl.processes.AssetReport) ProcessDefinition(com.adobe.acs.commons.mcp.ProcessDefinition) Test(org.junit.Test)

Example 2 with ProcessDefinition

use of com.adobe.acs.commons.mcp.ProcessDefinition in project acs-aem-commons by Adobe-Consulting-Services.

the class FactoryInjectionTest method testFolderRelocatorFactory.

@Test
public void testFolderRelocatorFactory() throws Exception {
    ProcessDefinition def = cpm.findDefinitionByNameOrPath("Folder Relocator");
    assertNotNull(def);
    assertTrue(def instanceof FolderRelocator);
}
Also used : FolderRelocator(com.adobe.acs.commons.mcp.impl.processes.FolderRelocator) ProcessDefinition(com.adobe.acs.commons.mcp.ProcessDefinition) Test(org.junit.Test)

Example 3 with ProcessDefinition

use of com.adobe.acs.commons.mcp.ProcessDefinition in project acs-aem-commons by Adobe-Consulting-Services.

the class ControlledProcessManagerServlet method doStartProcess.

private ProcessInstance doStartProcess(SlingHttpServletRequest request) throws RepositoryException, ReflectiveOperationException, DeserializeException {
    String def = request.getParameter("definition");
    String description = request.getParameter("description");
    ProcessDefinition definition = manager.findDefinitionByNameOrPath(def);
    ProcessInstance instance = manager.createManagedProcessInstance(definition, description);
    instance.init(request.getResourceResolver(), convertRequestMap(request.getRequestParameterMap()));
    instance.run(request.getResourceResolver());
    return instance;
}
Also used : ProcessDefinition(com.adobe.acs.commons.mcp.ProcessDefinition) ProcessInstance(com.adobe.acs.commons.mcp.ProcessInstance)

Example 4 with ProcessDefinition

use of com.adobe.acs.commons.mcp.ProcessDefinition in project acs-aem-commons by Adobe-Consulting-Services.

the class FactoryInjectionTest method testProcessCleanupFactory.

@Test
public void testProcessCleanupFactory() throws Exception {
    ProcessDefinition def = cpm.findDefinitionByNameOrPath("Process Cleanup");
    assertNotNull(def);
    assertTrue(def instanceof ProcessCleanup);
}
Also used : ProcessDefinition(com.adobe.acs.commons.mcp.ProcessDefinition) ProcessCleanup(com.adobe.acs.commons.mcp.impl.processes.ProcessCleanup) Test(org.junit.Test)

Example 5 with ProcessDefinition

use of com.adobe.acs.commons.mcp.ProcessDefinition in project acs-aem-commons by Adobe-Consulting-Services.

the class FactoryInjectionTest method testFileIngestorFactory.

@Test
public void testFileIngestorFactory() throws Exception {
    ProcessDefinition def = cpm.findDefinitionByNameOrPath("Asset Ingestor");
    assertNotNull(def);
    assertTrue(def instanceof FileAssetIngestor);
}
Also used : FileAssetIngestor(com.adobe.acs.commons.mcp.impl.processes.FileAssetIngestor) ProcessDefinition(com.adobe.acs.commons.mcp.ProcessDefinition) Test(org.junit.Test)

Aggregations

ProcessDefinition (com.adobe.acs.commons.mcp.ProcessDefinition)7 Test (org.junit.Test)6 ProcessInstance (com.adobe.acs.commons.mcp.ProcessInstance)1 AssetReport (com.adobe.acs.commons.mcp.impl.processes.AssetReport)1 DeepPrune (com.adobe.acs.commons.mcp.impl.processes.DeepPrune)1 FileAssetIngestor (com.adobe.acs.commons.mcp.impl.processes.FileAssetIngestor)1 FolderRelocator (com.adobe.acs.commons.mcp.impl.processes.FolderRelocator)1 ProcessCleanup (com.adobe.acs.commons.mcp.impl.processes.ProcessCleanup)1 S3AssetIngestor (com.adobe.acs.commons.mcp.impl.processes.S3AssetIngestor)1