private OurConfiguration createConfiguration() { OurConfiguration config = new OurConfiguration(); config.setHostNameOrIpAddr(HOST_NAME); config.setHostTelnetPortNumber(HOST_TELNET_PORT); config.setConnectionProperties(null); config.setConnectScript(getLoginScript()); config.setDisconnectScript(getLogoffScript()); config.setUserName(SYSTEM_USER); config.setPassword(new GuardedString(SYSTEM_PASSWORD.toCharArray())); config.setEvictionInterval(60000); config.setConnectionClassName(WrqConnection.class.getName()); OurConnectorMessages messages = new OurConnectorMessages(); Map<Locale, Map<String, String>> catalogs = new HashMap<Locale, Map<String, String>>(); Map<String, String> foo = new HashMap<String, String>(); for (String bundleName : new String[] {"org.identityconnectors.rw3270.Messages"}) { ResourceBundle messagesBundle = ResourceBundle.getBundle(bundleName); Enumeration<String> enumeration = messagesBundle.getKeys(); while (enumeration.hasMoreElements()) { String key = enumeration.nextElement(); foo.put(key, messagesBundle.getString(key)); } } catalogs.put(Locale.getDefault(), foo); messages.setCatalogs(catalogs); config.setConnectorMessages(messages); return config; }
private SpmlConfiguration createConfiguration() { SpmlConfiguration config = new SpmlConfiguration( URL, new String[] {CONNECTOR_OBJ_CLASS}, new String[] {SPML_OBJ_CLASS}, new String[] {PSO_TARGET_CLASS}, new String[] {ACCOUNT_ID}, SYSTEM_USER, new GuardedString(SYSTEM_PASSWORD.toCharArray())); config.setPreSendCommand(getPreSendCommand()); config.setPostReceiveCommand(getPostReceiveCommand()); config.setPostConnectCommand(getPostConnectCommand()); config.setPreDisconnectCommand(getPreDisConnectCommand()); config.setMapAttributeCommand(getMapAttributeCommand()); config.setMapSetNameCommand(getMapSetNameCommand()); config.setMapQueryNameCommand(getMapQueryNameCommand()); config.setSchemaCommand(getSchemaCommand()); config.setScriptingLanguage("GROOVY"); OurConnectorMessages messages = new OurConnectorMessages(); Map<Locale, Map<String, String>> catalogs = new HashMap<Locale, Map<String, String>>(); Map<String, String> foo = new HashMap<String, String>(); ResourceBundle messagesBundle = ResourceBundle.getBundle("org.identityconnectors.spml.Messages"); Enumeration<String> enumeration = messagesBundle.getKeys(); while (enumeration.hasMoreElements()) { String key = enumeration.nextElement(); foo.put(key, messagesBundle.getString(key)); } catalogs.put(Locale.getDefault(), foo); messages.setCatalogs(catalogs); config.setConnectorMessages(messages); return config; }