Class 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
    • Constructor Detail

      • AecuServiceImpl

        public AecuServiceImpl()
    • Method Detail

      • getVersion

        public String getVersion()
        Specified by:
        getVersion in interface de.valtech.aecu.api.service.AecuService
      • getFiles

        public List<String> getFiles​(String path)
                              throws de.valtech.aecu.api.service.AecuException
        Specified by:
        getFiles in interface de.valtech.aecu.api.service.AecuService
        Throws:
        de.valtech.aecu.api.service.AecuException
      • matchesRunmodes

        public boolean matchesRunmodes​(String name)
        Specified by:
        matchesRunmodes in interface de.valtech.aecu.api.service.AecuService
      • isValidScriptName

        public boolean isValidScriptName​(String name)
        Specified by:
        isValidScriptName in interface de.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:
        execute in interface de.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:
        execute in interface de.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 resolver
        path - 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 resolver
        path - 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:
        createHistoryEntry in interface de.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:
        finishHistoryEntry in interface de.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:
        storeExecutionInHistory in interface de.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:
        getHistory in interface de.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:
        executeWithInstallHookHistory in interface de.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:
        executeWithInstallHookHistory in interface de.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 - session
        path - script path
        Returns:
        history
        Throws:
        de.valtech.aecu.api.service.AecuException - error creating the history node