Class RulesDeployerService
- java.lang.Object
-
- org.openl.rules.ruleservice.deployer.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 Summary
Constructors Constructor Description RulesDeployerService(Function<String,String> properties)RulesDeployerService(Properties properties)Deprecated.RulesDeployerService(Repository repository, String baseDeployPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleandelete(String deployPath, Set<String> projectsPath)Delete a file or mark it as deleted.voiddeploy(File file, boolean ignoreIfExists)voiddeploy(InputStream in, boolean ignoreIfExists)voiddeploy(String name, InputStream in, boolean ignoreIfExists)Deploys or redeploys target zip input streambooleanisReady()voidread(String deployPath, Set<String> projectsPath, OutputStream output)Read a service by the given path name.
-
-
-
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 namein- zip input streamignoreIfExists- if deployment was exist before and overridable is false, it will not be deployed, if true, it will be overridden.- Throws:
IOException
-
deploy
public void deploy(InputStream in, boolean ignoreIfExists) throws IOException
- Throws:
IOException
-
deploy
public void deploy(File file, boolean ignoreIfExists) throws IOException
- 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
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
-