Class AbstractDeployablewithSettableName

  • All Implemented Interfaces:
    Deployable, Loggable
    Direct Known Subclasses:
    EAR, RAR

    public abstract class AbstractDeployablewithSettableName
    extends AbstractDeployable
    Common class for easy Deployable implementations with settable names.
    • Constructor Detail

      • AbstractDeployablewithSettableName

        public AbstractDeployablewithSettableName​(String file)
        Parameters:
        file - the location of the deployable file being wrapped.
    • Method Detail

      • setName

        public void setName​(String name)
        Sets the name of this deployable. It can be anything (there's no special rule), except null or an empty string.
        Parameters:
        name - the name of this deployable
      • getName

        public String getName()
        Returns the name of this deployable. Default value is computed from the Deployable file name (removing the filename extension).
        Specified by:
        getName in interface Deployable
        Overrides:
        getName in class AbstractDeployable
        Returns:
        the name of this deployable
      • getFilename

        public String getFilename()
        Deployable file name, taking into account the Deployable.getName(), including any deployable-specific aspects of it, and the escaping in order to avoid unwanted file system actions (for example, ensuring the file name contains no slashes).

        Default value is the Deployable file name.

        Default value is the Deployable sanitized getName() with the deployable type as extension.
        Specified by:
        getFilename in interface Deployable
        Overrides:
        getFilename in class AbstractDeployable
        Returns:
        The file or directory name for this deployable.