Methods Summary |
---|
public boolean | addAddress(org.apache.mailet.MailAddress address)Add an address to the list.
members.addUser(address.toString(), "");
return true;
|
public boolean | existsAddress(org.apache.mailet.MailAddress address)
return members.contains(address.toString());
|
public java.lang.String | getMailetInfo()Return a string describing this mailet.
return "AvalonListservManager Mailet";
|
public void | init()Initialize the mailet
ServiceManager compMgr = (ServiceManager)getMailetContext().getAttribute(Constants.AVALON_COMPONENT_MANAGER);
try {
UsersStore usersStore = (UsersStore) compMgr.lookup(UsersStore.ROLE);
String repName = getInitParameter("repositoryName");
members = (UsersRepository) usersStore.getRepository(repName);
} catch (ServiceException cnfe) {
log("Failed to retrieve Store component:" + cnfe.getMessage());
} catch (Exception e) {
log("Failed to retrieve Store component:" + e.getMessage());
}
|
public boolean | removeAddress(org.apache.mailet.MailAddress address)Remove an address from the list.
members.removeUser(address.toString());
return true;
|