public class ModuleDef
extends java.lang.Object
implements java.io.Externalizable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_SCRIPT_FILE
If the module is written as a script this attribute is a path to the script file from UNION_HOME/modules.
|
static java.lang.String |
CLASS
Denotes that the module is written as a Java class.
|
static java.lang.String |
SCRIPT
Denotes that the module is written using a scripting language.
|
Constructor and Description |
---|
ModuleDef() |
Modifier and Type | Method and Description |
---|---|
void |
addAttribute(java.lang.String name,
java.lang.String value)
Add an attribute to the module.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
Get the attributes that have been set for the module.
|
java.lang.String |
getID()
Gets the ID of the module.
|
java.lang.String |
getSource()
Get the source (the Java class or script name) for the module.
|
java.lang.String |
getType()
Gets the module type (SCRIPT or CLASS)
|
void |
readExternal(java.io.ObjectInput in) |
void |
setID(java.lang.String moduleID)
Set the ID of the module.
|
void |
setSource(java.lang.String code)
Set the source (the Java class or script name) for the module.
|
void |
setType(java.lang.String type)
Set the module type (SCRIPT or CLASS)
|
void |
validate() |
void |
writeExternal(java.io.ObjectOutput out) |
public static final java.lang.String CLASS
public static final java.lang.String SCRIPT
public static final java.lang.String ATTR_SCRIPT_FILE
public void setID(java.lang.String moduleID)
moduleID
- - the ID of the modulepublic java.lang.String getID()
public java.lang.String getType()
public void setType(java.lang.String type)
type
- - the module typepublic void setSource(java.lang.String code)
code
- - the source for the modulepublic java.lang.String getSource()
public void addAttribute(java.lang.String name, java.lang.String value)
name
- - the name of the attributevalue
- - the value of the attributepublic java.util.Map<java.lang.String,java.lang.String> getAttributes()
public void validate() throws java.lang.Exception
java.lang.Exception
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
java.io.IOException
java.lang.ClassNotFoundException
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
java.io.IOException