Package org.jboss.modules
Class ModuleXmlUtil
java.lang.Object
org.jboss.modules.ModuleXmlUtil
Utility class for default module file names.
Date: 10.05.2011
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbaseDirectory(ModuleIdentifier identifier) Creates a path name from the module identifier with the defaultFile.separatorcharacter.static StringbaseDirectory(ModuleIdentifier identifier, String separator) Creates a path name from the module identifier.static StringbaseFilename(String name, String separator, ModuleIdentifier identifier) Creates a path name to the module XMLstatic StringbaseFilename(String name, ModuleIdentifier identifier) Creates a path name to the module XML file from the module identifier.static StringbaseFilename(ModuleIdentifier identifier) Creates a path name to the module XML file from the module identifier.static FiletoFile(File dir, String name, ModuleIdentifier identifier) Creates a file based on the directory and the module identifier.static FiletoFile(File dir, ModuleIdentifier identifier) Creates a file based on the directory and the module identifier.
-
Field Details
-
DEFAULT_FILENAME
- See Also:
-
-
Constructor Details
-
ModuleXmlUtil
private ModuleXmlUtil()Private constructor.
-
-
Method Details
-
toFile
Creates a file based on the directory and the module identifier. Thedirparameter must be a directory and theidentifiercannot benull.- Parameters:
dir- the base directory where the file should be located.identifier- the module identifier.- Returns:
- the module XML file.
- Throws:
IllegalArgumentException- if thedirparameter is not a directory or an argument isnull.
-
toFile
Creates a file based on the directory and the module identifier. Thedirparameter must be a directory and theidentifiercannot benull.- Parameters:
dir- the base directory where the file should be located.name- the name of the XML file.identifier- the module identifier.- Returns:
- the module XML file.
- Throws:
IllegalArgumentException- if thedirparameter is not a directory or an argument isnull.
-
baseDirectory
Creates a path name from the module identifier. The name always ends with the separator character. Anullidentifier will result in no separator being used.- Parameters:
identifier- the module identifier.separator- the directory separator.- Returns:
- a path name of the module identifier.
- Throws:
IllegalArgumentException- if the module identifier isnull.
-
baseDirectory
Creates a path name from the module identifier with the defaultFile.separatorcharacter.- Parameters:
identifier- the module identifier.- Returns:
- a path name of the module identifier.
- Throws:
IllegalArgumentException- if the module identifier isnull.- See Also:
-
baseFilename
Creates a path name to the module XML file from the module identifier. Uses theDEFAULT_FILENAMEfor the XML file name.- Parameters:
identifier- the module identifier.- Returns:
- a path name to the module XML file.
- Throws:
IllegalArgumentException- if the module identifier isnull.
-
baseFilename
Creates a path name to the module XML file from the module identifier.- Parameters:
name- the XML file name.identifier- the module identifier.- Returns:
- a path name to the module XML file.
- Throws:
IllegalArgumentException- if the module identifier isnull.
-
baseFilename
Creates a path name to the module XML- Parameters:
name- the XML file name. file from the module identifier.separator- the directory separator.identifier- the module identifier.- Returns:
- a path name to the module XML file.
- Throws:
IllegalArgumentException- if the module identifier isnull.
-