Methods Summary |
---|
public java.lang.String | getInitAttribute(java.lang.String name)Get the value of an (XML) attribute stored in this MailetConfig.
return configuration.getAttribute(name, null);
|
public java.lang.String | getInitParameter(java.lang.String name)Get the value of an parameter stored in this MailetConfig. Multi-valued
parameters are returned as a comma-delineated string.
try {
String result = null;
final Configuration[] values = configuration.getChildren( name );
for ( int i = 0; i < values.length; i++ ) {
if (result == null) {
result = "";
} else {
result += ",";
}
Configuration conf = values[i];
result += conf.getValue();
}
return result;
} catch (ConfigurationException ce) {
throw new RuntimeException("Embedded configuration exception was: " + ce.getMessage());
}
|
public java.util.Iterator | getInitParameterNames()Returns an iterator over the set of configuration parameter names.
return new Iterator () {
Configuration[] children;
int count = 0;
{
children = configuration.getChildren();
}
public boolean hasNext() {
return count < children.length;
}
public Object next() {
return children[count++].getName();
}
public void remove() {
throw new UnsupportedOperationException ("remove not supported");
}
};
|
public org.apache.mailet.MailetContext | getMailetContext()Get the mailet's MailetContext object.
return mailetContext;
|
public java.lang.String | getMailetName()Get the name of the mailet.
return name;
|
public void | setConfiguration(org.apache.avalon.framework.configuration.Configuration newConfiguration)Set the Avalon Configuration object for the mailet.
configuration = newConfiguration;
|
public void | setMailetContext(org.apache.mailet.MailetContext newContext)Get the mailet's Avalon Configuration object.
mailetContext = newContext;
|
public void | setMailetName(java.lang.String newName)Set the name for the mailet.
name = newName;
|