@Service public class DefaultMuleDistroService extends Object implements MuleDistroService
MuleDistribution operations.| Modifier and Type | Field and Description |
|---|---|
static Path |
CONFIG_FOLDER |
static Path |
LIB_MULE_JAR_DIRECTORY_PATH |
| Constructor and Description |
|---|
DefaultMuleDistroService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkClusterModeIsActive(Path currentMuleDistroPropertiesFilePath)
Checks if current mule distro is working on cluster mode.
|
boolean |
checkFilesDescriptorsExistencesInsideBothDistributions(Path oldMulePath,
Path newMulePath)
Checks File Descriptor existence inside all mule distros involve in upgrade process and inside the tool.
|
boolean |
checkMisleadingMuleDirName(Path currentMule)
Check if the name of the Mule directory is misleading regarding its content
|
String |
detectMuleVersion(Path muleHome)
Detects Mule Runtime Distribution version.
|
Path |
getConfigFolder()
Gets a relative path to the conf dir where the Mule Runtime distro configs files are placed.
|
Path |
getLibMuleJarDirectoryPath()
Gets a relative path to the lib/mule dir where the mule jars are placed.
|
MuleDistribution |
initMuleDistro(Path muleHome)
Initializes a
MuleDistribution object after validating that the given file path corresponds to a Mule Runtime
distribution. |
boolean |
isClusterModeActive(File propertiesFile,
String currentMuleDistroPropertiesFile)
Checks if a clusterId exists in Mule distribution configuration.
|
void |
looksLikeADistro(Path muleDistroLocation)
Introspects the given directory to determine if it looks like a Mule Runtime distribution.
|
public static final Path LIB_MULE_JAR_DIRECTORY_PATH
public static final Path CONFIG_FOLDER
public MuleDistribution initMuleDistro(Path muleHome) throws IOException
MuleDistribution object after validating that the given file path corresponds to a Mule Runtime
distribution.initMuleDistro in interface MuleDistroServicemuleHome - a path pointing to a Mule Runtime distribution.MuleDistribution instance.NotDirectoryException - if given muleHome path is not a directory.FileNotFoundException - if mule-core jar used for determining the Mule distro version is not found.IOExceptionpublic void looksLikeADistro(Path muleDistroLocation) throws IOException
looksLikeADistro in interface MuleDistroServicemuleDistroLocation - a path pointing to a potential Mule Runtime distribution.IOException - if given muleHome path does not look like a distro.public boolean checkClusterModeIsActive(Path currentMuleDistroPropertiesFilePath) throws IOException
checkClusterModeIsActive in interface MuleDistroServicecurrentMuleDistroPropertiesFilePath - Current mule distro path.IOException - I/O Exception.public boolean isClusterModeActive(File propertiesFile, String currentMuleDistroPropertiesFile) throws IOException
propertiesFile - a cluster properties file.currentMuleDistroPropertiesFile - a path to the cluster properties file.IOExceptionpublic String detectMuleVersion(Path muleHome) throws FileNotFoundException
detectMuleVersion in interface MuleDistroServicemuleHome - Mule Runtime Distribution path.FileNotFoundException - if muleHome path is not found.public boolean checkFilesDescriptorsExistencesInsideBothDistributions(Path oldMulePath, Path newMulePath) throws IOException
checkFilesDescriptorsExistencesInsideBothDistributions in interface MuleDistroServiceoldMulePath - Current Mule Runtime Distribution path.newMulePath - New Mule Runtime Distribution path.FileNotFoundExceptionIOExceptionpublic Path getLibMuleJarDirectoryPath()
MuleDistroServicegetLibMuleJarDirectoryPath in interface MuleDistroServicePath to the lib/mule folderpublic Path getConfigFolder()
MuleDistroServiceConfigFilesService.checkConflicts(Path, Path, boolean) are
placed inside this folder.getConfigFolder in interface MuleDistroServicePath to the conf folderpublic boolean checkMisleadingMuleDirName(Path currentMule)
checkMisleadingMuleDirName in interface MuleDistroServicecurrentMule - Mule Runtime Distribution path.Copyright © 2022 MuleSoft, Inc.. All rights reserved.