Enum ExtensionModule

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<ExtensionModule>

    public enum ExtensionModule
    extends java.lang.Enum<ExtensionModule>
    Type of known extension module. The following extension modules are known:
    Standard
    Normal extension. Sources are directly in the root folder of the extension.
    Web Module
    Web related. Sources are in the subfolder web.
    hMC module
    Web related. Sources are in the subfolder hmc.
    HAC module
    Web related. Sources are in the subfolder hac.
    An extension may contain more than one module type.

    Module types which are web related imply that web classes are required on the classpath.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      HAC
      HAC tests in the folder /hac/testsrc.
      HMC
      hMC tests in the folder /hmc/testsrc.
      STANDARD
      Standard tests in the folder /testsrc.
      WEB
      Web tests in the folder /web/testsrc.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected static boolean containsBackofficeTests​(ExtensionInfo extensionInfo)
      Check if an extension contains backoffice tests.
      boolean exists​(ExtensionInfo extensionInfo)
      Check if a module of this extension module type exists in the given extension.
      java.io.File getBasePath​(ExtensionInfo extensionInfo)
      Get the path where the sources of a module of this type are located in the given extension.
      java.util.Collection<java.lang.String> getRequiredWebExtensions()
      Return web related extensions required on the classpath by this extension module type.
      java.lang.String getTestClassFileName()
      Get the file name of the XML file where the scanned test classes for modules of this type are stored.
      protected static boolean hacModuleExists​(ExtensionInfo extensionInfo)
      This function checks if a HAC module exists in the given extension, i.e.
      boolean isWebRelated()
      Check if modules of this type are web related and require web libraries on their classpath.
      boolean requiresBackoffice()
      Check if modules of this type may require the backoffice extension.
      static ExtensionModule valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static ExtensionModule[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      static ExtensionModule[] values​(boolean webRelated)
      Get all known extension module types which either are or are not web related.
      protected static boolean webModuleExists​(ExtensionInfo extensionInfo)
      This function checks if a web module exists in the given extension.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • STANDARD

        public static final ExtensionModule STANDARD
        Standard tests in the folder /testsrc. Available in all extensions.
      • WEB

        public static final ExtensionModule WEB
        Web tests in the folder /web/testsrc. May require the backoffice extension on the classpath.
      • HMC

        public static final ExtensionModule HMC
        hMC tests in the folder /hmc/testsrc. Always require the hmc extension on the classpath.
      • HAC

        public static final ExtensionModule HAC
        HAC tests in the folder /hac/testsrc. Always require the hac extension on the classpath.
    • Method Detail

      • values

        public static ExtensionModule[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (ExtensionModule c : ExtensionModule.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static ExtensionModule valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • webModuleExists

        protected static boolean webModuleExists​(ExtensionInfo extensionInfo)
        This function checks if a web module exists in the given extension.
      • containsBackofficeTests

        protected static boolean containsBackofficeTests​(ExtensionInfo extensionInfo)
        Check if an extension contains backoffice tests.
        Parameters:
        extensionInfo - The extension to check.
        Returns:
        true if backoffice tests exist in the given extension.
      • hacModuleExists

        protected static boolean hacModuleExists​(ExtensionInfo extensionInfo)
        This function checks if a HAC module exists in the given extension, i.e. if the given extension is a HAC extension.
      • values

        public static ExtensionModule[] values​(boolean webRelated)
        Get all known extension module types which either are or are not web related.
        Parameters:
        webRelated - true to get only web related module types, false to get only module types which are not web related.
        Returns:
        List of selected module types.
      • exists

        public boolean exists​(ExtensionInfo extensionInfo)
        Check if a module of this extension module type exists in the given extension.
      • getBasePath

        public java.io.File getBasePath​(ExtensionInfo extensionInfo)
        Get the path where the sources of a module of this type are located in the given extension.
      • getTestClassFileName

        public java.lang.String getTestClassFileName()
        Get the file name of the XML file where the scanned test classes for modules of this type are stored.
      • requiresBackoffice

        public boolean requiresBackoffice()
        Check if modules of this type may require the backoffice extension.
      • getRequiredWebExtensions

        public java.util.Collection<java.lang.String> getRequiredWebExtensions()
        Return web related extensions required on the classpath by this extension module type.
      • isWebRelated

        public boolean isWebRelated()
        Check if modules of this type are web related and require web libraries on their classpath.