Class KeyStoreTask

  • Direct Known Subclasses:
    IssueTokenTask, VerifyTokenTask

    public abstract class KeyStoreTask
    extends org.apache.tools.ant.Task
    Base task for tasks that require a key store. Tasks that inherit from this class inherit two required properties: keystore and options.
    Author:
    Alex Kalderimis
    • Field Summary

      • Fields inherited from class org.apache.tools.ant.Task

        description, location, target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        project
    • Constructor Summary

      Constructors 
      Constructor Description
      KeyStoreTask()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected java.security.KeyStore createKeyStore()
      Create and return the configured key-store.
      protected java.util.Properties getOptions()
      Get the options as configured for this task
      protected void logError​(java.lang.String message)
      Log a message to standard error.
      protected void logMessage​(java.lang.String message)
      Log a message to standard out.
      void setErr​(java.io.OutputStream os)
      Set the error handler
      void setKeystoreFile​(java.lang.String filename)
      Bean-style setter for keystoreFile, as per ant spec.
      void setOptions​(java.lang.String filename)
      Bean-style setter for optionsFile, as per ant spec.
      void setOut​(java.io.OutputStream os)
      Set the output handler.
      • Methods inherited from class org.apache.tools.ant.Task

        execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        getProject, setProject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • KeyStoreTask

        public KeyStoreTask()
    • Method Detail

      • setKeystoreFile

        public void setKeystoreFile​(java.lang.String filename)
        Bean-style setter for keystoreFile, as per ant spec.
        Parameters:
        filename - The name of the file.
      • setOptions

        public void setOptions​(java.lang.String filename)
        Bean-style setter for optionsFile, as per ant spec.
        Parameters:
        filename - The filename.
      • createKeyStore

        protected java.security.KeyStore createKeyStore()
        Create and return the configured key-store.
        Returns:
        The key store.
      • getOptions

        protected java.util.Properties getOptions()
        Get the options as configured for this task
        Returns:
        The project properties.
      • setOut

        public void setOut​(java.io.OutputStream os)
        Set the output handler.
        Parameters:
        os - Where to send output.
      • setErr

        public void setErr​(java.io.OutputStream os)
        Set the error handler
        Parameters:
        os - Where to send error messages.
      • logMessage

        protected void logMessage​(java.lang.String message)
        Log a message to standard out.
        Parameters:
        message - The message to print.
      • logError

        protected void logError​(java.lang.String message)
        Log a message to standard error.
        Parameters:
        message - The message to print.