/** * When instantiating a participant, the participant map calls * this method on it to make it ready to operate. * * @param regex the name (or regular expression) which maps to this * participant implementation * @param params the initialization parameters for this participant, as * found in the participant map */ public void init (String regex, java.util.Map params) { super.init(regex, params); // // archival path this.archivalDir = (String)params.get(P_ARCHIVAL_DIR); if (this.archivalDir == null) this.archivalDir = "archive"; if ( ! this.archivalDir.endsWith(java.io.File.separator)) this.archivalDir += java.io.File.separator; log.info("init() archivalDir is '"+this.archivalDir+"'"); }
private void addGroups() throws NamingException { String[] groups = m_ldapService.getGroups(); for (int i = 0; i < groups.length; i++) { LeafParticipant p = new LeafParticipant(); Map params = new HashMap(); // @todo need to parametrize this as well. params.put("host", "127.0.0.1"); params.put("port", "7008"); params.put("dispatcherClass", "openwfe.org.engine.impl.dispatch.SocketDispatcher"); //p.init(this, groups[i], params); p.init(groups[i], params); if (log.isDebugEnabled()) { log.debug("LDAP adding " + p.getRegex()); } add(p); } }
protected void buildMap() throws NamingException { // add engine // @todo this should come through a composite map. LeafParticipant p = new LeafParticipant(); Map params = new HashMap(); // @todo need to parametrize this as well. params.put("host", "127.0.0.1"); params.put("port", "7007"); params.put("dispatcherClass", "openwfe.org.engine.impl.dispatch.SocketDispatcher"); params.put("workItemCoder", "xmlCoder"); //p.init(this, "mainEngine", params); p.init("mainEngine", params); add(p); // add groups from ldap addGroups(); // add users from ldap addUsers(); }
private void addUsers() throws NamingException { String[] users = m_ldapService.getUsers(); for (int i = 0; i < users.length; i++) { LeafParticipant p = new LeafParticipant(); Map params = new HashMap(); // @todo need to parametrize this as well. params.put("host", "127.0.0.1"); params.put("port", "7008"); params.put("dispatcherClass", "openwfe.org.engine.impl.dispatch.SocketDispatcher"); //p.init(this, users[i], params); p.init(users[i], params); if (log.isDebugEnabled()) { log.debug("LDAP adding " + p.getRegex()); } add(p); } } }
public void init (//final ParticipantMap pMap, final String regex, final java.util.Map params) { //super.init(pMap, regex, params); super.init(regex, params); //this.smtpServer = MapUtils.getAsString // (params, P_SMTP_SERVER, "127.0.0.1"); //this.smtpPort = MapUtils.getAsInt // (params, P_SMTP_PORT, 25); this.recipientField = MapUtils.getAsString (params, P_RECIPIENT_FIELD, DEFAULT_RECIPIENT_FIELD); this.mailFrom = MapUtils.getAsString (params, P_MAIL_FROM); this.mailEncoding = MapUtils.getAsString (params, P_MAIL_ENCODING); this.templateFileName = MapUtils.getAsString (params, P_TEMPLATE); }