eXo Kernel :: Container 2.5.0-GA

org.exoplatform.container.ar
Class Archive

java.lang.Object
  extended by org.exoplatform.container.ar.Archive

public class Archive
extends Object

Defines an archive with all its properties

Version:
$Id$
Author:
Nicolas Filotto

Field Summary
static Archive EAR
          The most common description of a Enterprise Application ARchive
static String PROTOCOL
          The protocol used to define an URL that defines a resource into an archive
static Archive WAR
          The most common description of a Web Application ARchive
 
Constructor Summary
Archive(String type, boolean useDirWoExt, boolean allowsDir, Set<Archive> subArchives)
          The default constructor
 
Method Summary
static URL createArchiveURL(String url)
          Creates an archive URL from a String representation of that URL
 boolean equals(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 suffixes
 Set<Archive> getSubArchives()
           
 String getType()
           
 int hashCode()
           
 boolean isAllowsDir()
          Indicates whether the archive can be a directory
static boolean isArchiveURL(String url)
          Indicates whether or not the provided URL is an archive URL
 boolean isUseDirWoExt()
          Indicates whether the archive is replaceable with a directory without extension
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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

Constructor Detail

Archive

public Archive(String type,
               boolean useDirWoExt,
               boolean allowsDir,
               Set<Archive> subArchives)
The default constructor

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:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Overrides:
toString in class Object
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 scan
appDeployArchives - the list of archives to scan
configuration - 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:
true if it is an archive URL, false otherwise

eXo Kernel :: Container 2.5.0-GA

Copyright © 2014 eXo Platform SAS. All Rights Reserved.