Class Bundle
- java.lang.Object
-
- org.esa.snap.core.gpf.descriptor.dependency.Bundle
-
public class Bundle extends Object
Descriptor class for a dependency bundle. A bundle is a set of binaries of the adapted tool. It can be either in the form of an archive or an executable installer. It is mandatory to specify the location where the bundle will be installed/extracted. A bundle must have an entry point. In the case of an installer/executable, it is the name of the executable. In the case of an archive, it will be the name of the archive. The source of the bundle can be either local (i.e. from the local filesystem) or remote (i.e. from an URL)
-
-
Constructor Summary
Constructors Constructor Description Bundle()
Bundle(Bundle original)
Bundle(ToolAdapterOperatorDescriptor descriptor, BundleType bundleType, String targetLocation)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TemplateParameterDescriptor
getArgumentsParameter()
Returns the command line arguments for an installer, if anyBundleType
getBundleType()
Returns the type of the bundle provided with the adapter.String
getCommandLine()
static OSFamily
getCurrentOS()
String
getDownloadURL()
Returns the download URL for this bundle.String
getEntryPoint()
Returns the entry point of the bundle.BundleLocation
getLocation()
Returns the type of the bundle location.OSFamily
getOS()
ToolAdapterOperatorDescriptor
getParent()
File
getSource()
Returns the local source of the bundleString
getTargetLocation()
Returns the target location of the bundle (i.e.String
getUpdateVariable()
Gets the name of the System Variable to be updated after bundle installation.boolean
isInstalled()
Checks if the bundle binaries have been installed.boolean
isLocal()
Checks if the bundle location is local or remote.void
setArgumentsParameter(TemplateParameterDescriptor value)
Sets the command line arguments for an installervoid
setBundleType(BundleType bundleType)
Sets the bundle type of the adapter.void
setDownloadURL(String url)
Sets the download URL for this bundle.void
setLocation(BundleLocation value)
Sets the type of the bundle locationvoid
setOS(OSFamily operatingSystem)
void
setParent(ToolAdapterOperatorDescriptor descriptor)
void
setSource(File value)
Sets the local source of the bundlevoid
setTargetLocation(String targetLocation)
Sets the target location of the bundle (i.e.void
setUpdateVariable(String name)
Sets the name of the System Variable to be updated after bundle installation.
-
-
-
Constructor Detail
-
Bundle
public Bundle()
-
Bundle
public Bundle(ToolAdapterOperatorDescriptor descriptor, BundleType bundleType, String targetLocation)
-
Bundle
public Bundle(Bundle original)
-
-
Method Detail
-
getCurrentOS
public static OSFamily getCurrentOS()
-
getParent
public ToolAdapterOperatorDescriptor getParent()
-
setParent
public void setParent(ToolAdapterOperatorDescriptor descriptor)
-
getBundleType
public BundleType getBundleType()
Returns the type of the bundle provided with the adapter. Can be one ofBundleType
members.
-
setBundleType
public void setBundleType(BundleType bundleType)
Sets the bundle type of the adapter.- Parameters:
bundleType
- The type of the bundle (seeBundleType
)
-
getLocation
public BundleLocation getLocation()
Returns the type of the bundle location.
-
setLocation
public void setLocation(BundleLocation value)
Sets the type of the bundle location- Parameters:
value
- The bundle location type
-
getSource
public File getSource()
Returns the local source of the bundle
-
setSource
public void setSource(File value)
Sets the local source of the bundle- Parameters:
value
- The file representing an archive or an installer
-
getTargetLocation
public String getTargetLocation()
Returns the target location of the bundle (i.e. the location where the bundle is supposed to be either extracted or installed).
-
setTargetLocation
public void setTargetLocation(String targetLocation)
Sets the target location of the bundle (i.e. the location where the bundle is supposed to be either extracted or installed).
-
getDownloadURL
public String getDownloadURL()
Returns the download URL for this bundle.
-
setDownloadURL
public void setDownloadURL(String url)
Sets the download URL for this bundle.
-
isLocal
public boolean isLocal()
Checks if the bundle location is local or remote.
-
isInstalled
public boolean isInstalled()
Checks if the bundle binaries have been installed.
-
getEntryPoint
public String getEntryPoint()
Returns the entry point of the bundle.
-
getArgumentsParameter
public TemplateParameterDescriptor getArgumentsParameter()
Returns the command line arguments for an installer, if any
-
setArgumentsParameter
public void setArgumentsParameter(TemplateParameterDescriptor value)
Sets the command line arguments for an installer
-
getUpdateVariable
public String getUpdateVariable()
Gets the name of the System Variable to be updated after bundle installation. This variable will have as value the location in which the bundle was installed.
-
setUpdateVariable
public void setUpdateVariable(String name)
Sets the name of the System Variable to be updated after bundle installation.
-
getOS
public OSFamily getOS()
-
setOS
public void setOS(OSFamily operatingSystem)
-
getCommandLine
public String getCommandLine()
-
-