public abstract class DeploymentDescriptorFile<T extends Descriptor> extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
FULL_VALIDATION |
static String |
PARSING_VALIDATION |
| Constructor and Description |
|---|
DeploymentDescriptorFile()
Creates a new instance of DeploymentDescriptorFile
|
| Modifier and Type | Method and Description |
|---|---|
ArchiveType |
getArchiveType() |
protected String |
getDefaultSchemaSource() |
abstract String |
getDeploymentDescriptorPath() |
Document |
getDocument(T descriptor) |
DocumentBuilder |
getDocumentBuilder(boolean validating) |
abstract RootXMLNode<T> |
getRootXMLNode(T descriptor) |
SAXParser |
getSAXParser() |
SAXParser |
getSAXParser(boolean validating) |
protected boolean |
getXMLValidation() |
String |
getXMLValidationLevel() |
T |
read(InputStream is)
read and parse a J2EE Deployment Descriptor input file and
return the constructed DOL descriptors for the J2EE Module
|
T |
read(T descriptor,
File in)
read and parse a J2EE Deployment Descriptor input file and
return the constructed DOL descriptors for the J2EE Module
|
T |
read(T descriptor,
InputStream is)
read and parse a J2EE Deployment Descriptor input file and
return the constructed DOL descriptors for the J2EE Module
|
T |
read(T descriptor,
ReadableArchive in)
read and parse a J2EE Deployment Descriptor input file and
return the constructed DOL descriptors for the J2EE Module
|
void |
setArchiveType(ArchiveType type) |
void |
setErrorReportingString(String s)
Sets the error reporting string
|
void |
setXMLValidation(boolean validate)
sets wether XML validation should be performed at load time
|
void |
setXMLValidationLevel(String level)
Sets the xml validation error reporting/recovering level.
|
void |
write(T descriptor,
File out)
writes the descriptor classes into a new XML file
|
void |
write(T descriptor,
OutputStream os)
writes the descriptor to an output stream
|
void |
write(T descriptor,
String path)
writes the descriptor classes into a new XML file
|
public static final String FULL_VALIDATION
public static final String PARSING_VALIDATION
public DeploymentDescriptorFile()
public SAXParser getSAXParser()
public SAXParser getSAXParser(boolean validating)
validating - true if the parser should excercise DTD validationpublic DocumentBuilder getDocumentBuilder(boolean validating)
validating - true if validation should happenpublic T read(InputStream is) throws IOException, SAXParseException
is - the input stream for the XML fileIOExceptionSAXParseExceptionpublic T read(T descriptor, File in) throws IOException, SAXParseException
descriptor - the read is incremental, the descriptor to apply the DDs toin - the input stream for the XML fileIOExceptionSAXParseExceptionpublic T read(T descriptor, ReadableArchive in) throws IOException, SAXParseException
descriptor - the read is incremental, the descriptor to apply the DDs toin - the input archive abstraction for the XML fileIOExceptionSAXParseExceptionpublic T read(T descriptor, InputStream is) throws IOException, SAXParseException
descriptor - if the read is incremental, the descriptor to apply the DDs tois - the input stream for the XML fileIOExceptionSAXParseExceptionpublic Document getDocument(T descriptor)
descriptor - public void write(T descriptor, OutputStream os) throws IOException
descriptor - the descriptoros - the output streamIOExceptionpublic void write(T descriptor, String path) throws IOException
descriptor - the DOL descriptor to writepath - the file to useIOExceptionpublic void write(T descriptor, File out) throws IOException
descriptor - the DOL descriptor to writeout - the file to useIOExceptionpublic abstract String getDeploymentDescriptorPath()
public abstract RootXMLNode<T> getRootXMLNode(T descriptor)
descriptor - the descriptor for which we need the nodeprotected boolean getXMLValidation()
public void setXMLValidation(boolean validate)
validate - true to validatepublic void setXMLValidationLevel(String level)
public String getXMLValidationLevel()
protected String getDefaultSchemaSource()
public void setErrorReportingString(String s)
public ArchiveType getArchiveType()
public void setArchiveType(ArchiveType type)
the - archive type to set on this deployment descriptor fileCopyright © 2019. All rights reserved.