Class ExecutionBase

    • Method Detail

      • checkValidation

        public abstract boolean checkValidation​(CommandType command)
        Every single executor validates their commands and log the missing or wrong values
        Parameters:
        command -
        Returns:
      • createCallable

        protected java.util.concurrent.Callable<java.lang.Boolean> createCallable​(CommandType command)
        Creates Callable to execute one command
        Parameters:
        command -
        Returns:
      • executeCommand

        protected abstract ExecutionResult executeCommand​(CommandType command,
                                                          GemApiClient apiClient)
                                                   throws ApiException,
                                                          javax.xml.datatype.DatatypeConfigurationException
        Function that execute one command and returns the result
        Parameters:
        command -
        apiClient -
        Returns:
        Throws:
        ApiException
        javax.xml.datatype.DatatypeConfigurationException
      • canHandleCommand

        public boolean canHandleCommand​(CommandNamesEnum cmd)
        Checks if the Executor can progress the named Command
        Parameters:
        cmd -
        Returns:
      • preCheck

        public boolean preCheck​(CommandType command)
        Checks the given command for validation and adds it to the queue of commands to execute
        Parameters:
        command -
        Returns:
      • extractExecutorName

        protected java.lang.String extractExecutorName​(ExecutionBase executor)
        Gets the name of the specific executor for logging
        Parameters:
        executor -
        Returns:
      • postCheck

        public boolean postCheck()
        Checks if the execution was successful and logs the result
        Returns:
      • isEntryPresent

        protected boolean isEntryPresent​(CommandType command,
                                         GemApiClient apiClient)
                                  throws ApiException
        This function proceed a read command, to check if a entry without cert is already present
        Parameters:
        command -
        Returns:
        Throws:
        ApiException
      • findTelematiId

        protected java.lang.String findTelematiId​(CommandType command)
      • searchByUserCertificate

        public boolean searchByUserCertificate​(CommandType command,
                                               GemApiClient apiClient)
      • reset

        public void reset()