Package org.codehaus.cargo.module.ejb
Class EjbJarXmlVersion
- java.lang.Object
-
- org.codehaus.cargo.module.ejb.EjbJarXmlVersion
-
- All Implemented Interfaces:
Comparable<EjbJarXmlVersion>
public final class EjbJarXmlVersion extends Object implements Comparable<EjbJarXmlVersion>
Enumerated type that represents the version of the deployment descriptor of a ejb descriptor (ejb-jar.xml).
-
-
Field Summary
Fields Modifier and Type Field Description static EjbJarXmlVersion
V2_0
Instance for version 2.0.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(EjbJarXmlVersion other)
String
getPublicId()
Returns the public ID of the document type corresponding to the descriptor version.String
getSystemId()
Returns the system ID of the document type corresponding to the descriptor version.String
getVersion()
Returns the tag name.String
toString()
static EjbJarXmlVersion
valueOf(String publicId)
Returns the version corresponding to the given public ID.static EjbJarXmlVersion
valueOf(DocumentType docType)
Returns the version corresponding to the given document type.
-
-
-
Field Detail
-
V2_0
public static final EjbJarXmlVersion V2_0
Instance for version 2.0.
-
-
Method Detail
-
compareTo
public int compareTo(EjbJarXmlVersion other)
- Specified by:
compareTo
in interfaceComparable<EjbJarXmlVersion>
-
getVersion
public String getVersion()
Returns the tag name.- Returns:
- The tag name
-
getPublicId
public String getPublicId()
Returns the public ID of the document type corresponding to the descriptor version.- Returns:
- The public ID
-
getSystemId
public String getSystemId()
Returns the system ID of the document type corresponding to the descriptor version.- Returns:
- The system ID
-
valueOf
public static EjbJarXmlVersion valueOf(DocumentType docType) throws NullPointerException
Returns the version corresponding to the given document type.- Parameters:
docType
- The document type- Returns:
- The version that matches the document type, or
null
if the doctype is not recognized - Throws:
NullPointerException
- If the document type isnull
-
valueOf
public static EjbJarXmlVersion valueOf(String publicId)
Returns the version corresponding to the given public ID.- Parameters:
publicId
- The public ID- Returns:
- The version that matches the public ID, or
null
if the ID is not recognized
-
-