Package org.exoplatform.container.ar
Class Archive
- java.lang.Object
-
- org.exoplatform.container.ar.Archive
-
public class Archive extends Object
Defines an archive with all its properties- Version:
- $Id$
- Author:
- Nicolas Filotto
-
-
Field Summary
Fields Modifier and Type Field Description static ArchiveEARThe most common description of a Enterprise Application ARchivestatic StringPROTOCOLThe protocol used to define an URL that defines a resource into an archivestatic ArchiveWARThe most common description of a Web Application ARchive
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static URLcreateArchiveURL(String url)Creates an archive URL from a String representation of that URLbooleanequals(Object obj)static Collection<URL>getConfigurationURL(List<String> appDeployDirectories, Set<Archive> appDeployArchives, String configuration)Gives a Collection of URL corresponding to the configuration files that could be found under the given directories inside archives with the given suffixesSet<Archive>getSubArchives()StringgetType()inthashCode()booleanisAllowsDir()Indicates whether the archive can be a directorystatic booleanisArchiveURL(String url)Indicates whether or not the provided URL is an archive URLbooleanisUseDirWoExt()Indicates whether the archive is replaceable with a directory without extensionStringtoString()
-
-
-
Field Detail
-
PROTOCOL
public static final String PROTOCOL
The protocol used to define an URL that defines a resource into an archive- See Also:
- Constant Field Values
-
WAR
public static final Archive WAR
The most common description of a Web Application ARchive
-
EAR
public static final Archive EAR
The most common description of a Enterprise Application ARchive
-
-
Method Detail
-
getType
public String getType()
- Returns:
- the type of the archive
-
isUseDirWoExt
public boolean isUseDirWoExt()
Indicates whether the archive is replaceable with a directory without extension
-
isAllowsDir
public boolean isAllowsDir()
Indicates whether the archive can be a directory
-
getSubArchives
public Set<Archive> getSubArchives()
- Returns:
- the archives that can be included in the current archive
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObject- See Also:
Object.hashCode()
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classObject- See Also:
Object.equals(java.lang.Object)
-
toString
public String toString()
- Overrides:
toStringin classObject- See Also:
Object.toString()
-
getConfigurationURL
public static Collection<URL> getConfigurationURL(List<String> appDeployDirectories, Set<Archive> appDeployArchives, String configuration) throws IOException
Gives a Collection of URL corresponding to the configuration files that could be found under the given directories inside archives with the given suffixes- Parameters:
appDeployDirectories- the list of directory to scanappDeployArchives- the list of archives to scanconfiguration- the relative path to the configuration file- Returns:
- the URL of the configuration files that could be found
- Throws:
IOException- If we cannot access to the content of the archives for some reasons
-
createArchiveURL
public static URL createArchiveURL(String url) throws MalformedURLException
Creates an archive URL from a String representation of that URL- Parameters:
url- the String representation- Returns:
- the corresponding
URL - Throws:
MalformedURLException- If the URL is incorrect
-
isArchiveURL
public static boolean isArchiveURL(String url)
Indicates whether or not the provided URL is an archive URL- Parameters:
url- the String representation of the URL to check- Returns:
trueif it is an archive URL, false otherwise
-
-