Package de.hybris.bootstrap.config
Enum ExtensionModule
- java.lang.Object
-
- java.lang.Enum<ExtensionModule>
-
- de.hybris.bootstrap.config.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
.
Module types which are web related imply that web classes are required on the classpath.
-
-
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 thebackoffice
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.
-
-
-
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 thebackoffice
extension on the classpath.
-
HMC
public static final ExtensionModule HMC
hMC tests in the folder/hmc/testsrc
. Always require thehmc
extension on the classpath.
-
HAC
public static final ExtensionModule HAC
HAC tests in the folder/hac/testsrc
. Always require thehac
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 namejava.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 thebackoffice
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.
-
-