Class RulesDeployerService

  • All Implemented Interfaces:
    Closeable, AutoCloseable

    public class RulesDeployerService
    extends Object
    implements Closeable
    This class allows to deploy a zip-based project to a production repository.
    Author:
    Vladyslav Pikus
    • Constructor Detail

      • RulesDeployerService

        public RulesDeployerService​(Repository repository,
                                    String baseDeployPath)
      • RulesDeployerService

        @Deprecated
        public RulesDeployerService​(Properties properties)
        Deprecated.
        Initializes repository using target properties
        Parameters:
        properties - repository settings
    • Method Detail

      • deploy

        public void deploy​(String name,
                           InputStream in,
                           boolean ignoreIfExists)
                    throws IOException
        Deploys or redeploys target zip input stream
        Parameters:
        name - original ZIP file name
        in - zip input stream
        ignoreIfExists - if deployment was exist before and overridable is false, it will not be deployed, if true, it will be overridden.
        Throws:
        IOException
      • isReady

        public boolean isReady()
      • read

        public void read​(String deployPath,
                         Set<String> projectsPath,
                         OutputStream output)
                  throws IOException
        Read a service by the given path name.
        Parameters:
        deployPath - deployPath of the service to read.
        Throws:
        IOException - if not possible to read the file.
      • delete

        public boolean delete​(String deployPath,
                              Set<String> projectsPath)
                       throws IOException
        Delete a file or mark it as deleted.
        Parameters:
        deployPath - deployPath of the file to delete.
        Returns:
        true if file has been deleted successfully or false if the file is absent or cannot be deleted.
        Throws:
        IOException