}
@Override
public void configurationUpdated(CouchConfig config) {
ReplicationConfiguration c = new ReplicationConfiguration();
c.setReplicationInterval( config.getReplicationInterval() );
// Adjust user name/password
for(ReplicationRequest request : config.getReplications()) {
if( request.getSourceUserName() == ReplicationRequest.REMOTE_USER_NAME ) {
request.setSourceUserName(userName);
}
if( request.getSourcePassword() == ReplicationRequest.REMOTE_USER_PASSWORD ) {
request.setSourcePassword(password);
}
if( request.getTargetUserName() == ReplicationRequest.REMOTE_USER_NAME ) {
request.setTargetUserName(userName);
}
if( request.getTargetPassword() == ReplicationRequest.REMOTE_USER_PASSWORD ) {
request.setTargetPassword(password);
}
c.addReplication(request);
}
replicationWorker.configurationUpdated(c);
}