Package de.valtech.aecu.core.service
Class AecuServiceImpl
- java.lang.Object
-
- de.valtech.aecu.core.service.AecuServiceImpl
-
- All Implemented Interfaces:
de.valtech.aecu.api.service.AecuService
public class AecuServiceImpl extends Object implements de.valtech.aecu.api.service.AecuService
AECU service.- Author:
- Roland Gruber
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringDIR_FALLBACK_SCRIPTprotected static StringDIR_PRECHECKS_SCRIPT
-
Constructor Summary
Constructors Constructor Description AecuServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.valtech.aecu.api.service.HistoryEntrycreateHistoryEntry()protected HookExecutionHistorycreateHookExecutionHistory(javax.jcr.Session session, String path)Creates a hook history entry.de.valtech.aecu.api.service.ExecutionResultexecute(String path)de.valtech.aecu.api.service.ExecutionResultexecute(String path, String data)de.valtech.aecu.api.service.HistoryEntryexecuteWithInstallHookHistory(String path)de.valtech.aecu.api.service.HistoryEntryexecuteWithInstallHookHistory(String path, String data)de.valtech.aecu.api.service.HistoryEntryfinishHistoryEntry(de.valtech.aecu.api.service.HistoryEntry history)protected StringgetFallbackScript(org.apache.sling.api.resource.ResourceResolver resolver, String path)Returns the fallback script name if any exists.List<String>getFiles(String path)List<de.valtech.aecu.api.service.HistoryEntry>getHistory(int startIndex, int count)protected StringgetPrechecksScript(org.apache.sling.api.resource.ResourceResolver resolver, String path)Returns the prechecks script name if any exists.StringgetVersion()booleanisValidScriptName(String name)booleanmatchesRunmodes(String name)de.valtech.aecu.api.service.HistoryEntrystoreExecutionInHistory(de.valtech.aecu.api.service.HistoryEntry history, de.valtech.aecu.api.service.ExecutionResult result)
-
-
-
Field Detail
-
DIR_FALLBACK_SCRIPT
protected static final String DIR_FALLBACK_SCRIPT
- See Also:
- Constant Field Values
-
DIR_PRECHECKS_SCRIPT
protected static final String DIR_PRECHECKS_SCRIPT
- See Also:
- Constant Field Values
-
-
Method Detail
-
getVersion
public String getVersion()
- Specified by:
getVersionin interfacede.valtech.aecu.api.service.AecuService
-
getFiles
public List<String> getFiles(String path) throws de.valtech.aecu.api.service.AecuException
- Specified by:
getFilesin interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
matchesRunmodes
public boolean matchesRunmodes(String name)
- Specified by:
matchesRunmodesin interfacede.valtech.aecu.api.service.AecuService
-
isValidScriptName
public boolean isValidScriptName(String name)
- Specified by:
isValidScriptNamein interfacede.valtech.aecu.api.service.AecuService
-
execute
public de.valtech.aecu.api.service.ExecutionResult execute(String path) throws de.valtech.aecu.api.service.AecuException
- Specified by:
executein interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
execute
public de.valtech.aecu.api.service.ExecutionResult execute(String path, String data) throws de.valtech.aecu.api.service.AecuException
- Specified by:
executein interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
getFallbackScript
protected String getFallbackScript(org.apache.sling.api.resource.ResourceResolver resolver, String path)
Returns the fallback script name if any exists.- Parameters:
resolver- resource resolverpath- original script path- Returns:
- fallback script path
-
getPrechecksScript
protected String getPrechecksScript(org.apache.sling.api.resource.ResourceResolver resolver, String path)
Returns the prechecks script name if any exists.- Parameters:
resolver- resource resolverpath- original script path- Returns:
- prechecks script path
-
createHistoryEntry
public de.valtech.aecu.api.service.HistoryEntry createHistoryEntry() throws de.valtech.aecu.api.service.AecuException- Specified by:
createHistoryEntryin interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
finishHistoryEntry
public de.valtech.aecu.api.service.HistoryEntry finishHistoryEntry(de.valtech.aecu.api.service.HistoryEntry history) throws de.valtech.aecu.api.service.AecuException- Specified by:
finishHistoryEntryin interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
storeExecutionInHistory
public de.valtech.aecu.api.service.HistoryEntry storeExecutionInHistory(de.valtech.aecu.api.service.HistoryEntry history, de.valtech.aecu.api.service.ExecutionResult result) throws de.valtech.aecu.api.service.AecuException- Specified by:
storeExecutionInHistoryin interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
getHistory
public List<de.valtech.aecu.api.service.HistoryEntry> getHistory(int startIndex, int count) throws de.valtech.aecu.api.service.AecuException
- Specified by:
getHistoryin interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
executeWithInstallHookHistory
public de.valtech.aecu.api.service.HistoryEntry executeWithInstallHookHistory(String path) throws de.valtech.aecu.api.service.AecuException
- Specified by:
executeWithInstallHookHistoryin interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
executeWithInstallHookHistory
public de.valtech.aecu.api.service.HistoryEntry executeWithInstallHookHistory(String path, String data) throws de.valtech.aecu.api.service.AecuException
- Specified by:
executeWithInstallHookHistoryin interfacede.valtech.aecu.api.service.AecuService- Throws:
de.valtech.aecu.api.service.AecuException
-
createHookExecutionHistory
protected HookExecutionHistory createHookExecutionHistory(javax.jcr.Session session, String path) throws de.valtech.aecu.api.service.AecuException
Creates a hook history entry.- Parameters:
session- sessionpath- script path- Returns:
- history
- Throws:
de.valtech.aecu.api.service.AecuException- error creating the history node
-
-