public class IlrRulesetArchive
extends java.lang.Object
implements java.io.Serializable
IlrRulesetArchiveBuilderBase,
IlrRulesetArchiveBuilder,
IlrRulesetArchiveParser,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
class |
IlrRulesetArchive.Element
Model of an archive element.
|
static class |
IlrRulesetArchive.RulesetArchiveException
The class of the exception obtained when a problem occurs during the construction or parsing of a ruleset archive.
|
| Modifier and Type | Field and Description |
|---|---|
static int |
B2X
A constant used to type an archive element as an element that contains a mapping between a business object model
and an executable object model.
|
static int |
BOM
A constant used to type an archive element as an element that contains a business object model.
|
static int |
ENGINE_CONF
A constant used to type an archive element as an element that contains an engine configuration file.
|
static int |
GENERATED
A constant used to type an archive element as an element whose content has been generated by the archive builder.
|
static int |
IRL
A constant used to type an archive element as an element that contains IRL code.
|
static int |
MISC
A constant used to type an archive element as an element that contains miscellaneous data.
|
static int |
USER_DATA
A constant used to type an archive element as an element that contains user data.
|
static java.lang.String |
VARIABLES
The base name of the IRL element that contains the variables declaration for a given package.
|
static int |
WSDL
A constant used to type an archive element as an element that contains a WSDL.
|
static int |
XOM
A constant used to type an archive element as an element that contains an executable object model.
|
static int |
XSD
A constant used to type an archive element as an element that contains an XSD.
|
| Constructor and Description |
|---|
IlrRulesetArchive()
Creates an empty ruleset archive based on UTF-8 encoding.
|
IlrRulesetArchive(java.lang.String encoding)
Creates an empty ruleset archive based on the given encoding.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
compare(IlrRulesetArchive archive)
Compares two ruleset archives to determine if they have the same content.
|
static IlrRulesetArchive |
extractArchive(IlrRulesetArchiveLoader loader)
Obtains a ruleset archive object filled from the archive given through the archive loader.
|
java.lang.String |
getContent(java.lang.String entryName)
Returns the contents of an archive element as a string.
|
IlrRulesetArchive.Element |
getElement(java.lang.String key)
Returns the element in the archive whose name is specified by the parameter.
|
java.util.Collection |
getElements()
Returns the elements that compose the archive.
|
java.util.Collection |
getElements(int kind)
Returns the elements of a given type contained in the archive.
|
java.lang.String |
getEncoding()
Returns the encoding used in the archive.
|
java.lang.String |
getIRL(java.lang.String pkgName,
java.lang.String artifactName)
Returns the IRL code stored in the archive for the specified artifact name and package.
|
java.lang.String |
getRulesetSignature()
Returns the part of the descriptor that contains the ruleset signature, in XML.
|
java.lang.Object |
getSchema(java.lang.String namespace,
java.lang.String name)
Returns a schema as an input stream or a URL depending on what is present inside the archive.
|
java.util.Map |
getSchemaNames(boolean onlyContained)
Returns a map that associates to a namespace all the schema's file names declared or contained inside this archive.
|
java.lang.String |
getXmlEncoding()
Returns the encoding used for the XML parts in the archive.
|
boolean |
isBusiness()
Indicates whether the archive is a business archive or not.
|
boolean |
isBusinessDataXmlServiceEnable()
Allows you to determine if this ruleset archive parsed will produce a ruleset that could have parameters set with
XML BOM objects.
|
void |
reset()
Resets the archive.
|
void |
setBusinessDataXmlServiceEnable(boolean businessDataXmlServiceEnable)
Enables the use of XML BOM objects as parameters on the ruleset resulting from the parsing of this ruleset
archive.
|
void |
write(java.util.jar.JarOutputStream jarOutputStream)
Writes the ruleset archive contents in the given jar stream.
|
public static final java.lang.String VARIABLES
public static final int IRL
0.public static final int BOM
1.public static final int B2X
2.public static final int XOM
3.public static final int ENGINE_CONF
4.public static final int USER_DATA
5.public static final int XSD
6.public static final int WSDL
7.public static final int MISC
8.public static final int GENERATED
20.public IlrRulesetArchive(java.lang.String encoding)
encoding - The encoding used to store the archive contents.public IlrRulesetArchive()
public java.util.Collection getElements()
public void reset()
public java.lang.String getEncoding()
public java.lang.String getXmlEncoding()
public java.util.Collection getElements(int kind)
kind are:
IRL, BOM, B2X, XOM, XSD, WSDL, USER_DATA, ENGINE_CONF, MISCkind - The type of the required elements.public java.lang.String getRulesetSignature()
public java.lang.Object getSchema(java.lang.String namespace,
java.lang.String name)
Returns a schema as an input stream or a URL depending on what is present inside the archive.
namespace - schema's namespacename - schema's file name.IlrRulesetArchiveBuilderBase.addSchema(String, String, java.io.InputStream),
IlrRulesetArchiveBuilderBase.addSchema(String, String, java.net.URL)public java.util.Map getSchemaNames(boolean onlyContained)
Returns a map that associates to a namespace all the schema's file names declared or contained inside this archive.
onlyContained - true if only the schema contained inside this archive should be consideredIlrRulesetArchiveBuilderBase.addSchema(String, String, java.net.URL),
IlrRulesetArchiveBuilderBase.addSchema(String, String, java.io.InputStream)public IlrRulesetArchive.Element getElement(java.lang.String key)
key - The name of the element we are looking for.null if there is no such
element in the archive.public boolean isBusiness()
true if the archive is a business archive, else it returns false.public void write(java.util.jar.JarOutputStream jarOutputStream)
throws java.io.IOException
java.io.IOExceptionjarOutputStream - The stream in which the archive is persisted.public boolean compare(IlrRulesetArchive archive)
archive - The archive to compare with this.true if the archives have the same content, else it returns false.public static IlrRulesetArchive extractArchive(IlrRulesetArchiveLoader loader)
loader - The loader in charge of archive loading.public java.lang.String getIRL(java.lang.String pkgName,
java.lang.String artifactName)
IlrRulesetArchive.VARIABLES.pkgName - The name of the package given when the artifact was inserted in the archive.artifactName - The name of the artifact given when the artifact was inserted in the archive.public java.lang.String getContent(java.lang.String entryName)
entryName - The name of the element whose contents are to be returned.null if no such element is found
in the archive.public boolean isBusinessDataXmlServiceEnable()
true if XML BOM objects could be passed to the parsed ruleset.public void setBusinessDataXmlServiceEnable(boolean businessDataXmlServiceEnable)
businessDataXmlServiceEnable - © Copyright IBM Corp. 1987, 2017