use of de.janrufmonitor.repository.filter.CallerFilter in project janrufmonitor by tbrandt77.
the class JournalController method updateElement.
public synchronized void updateElement(Object call, boolean isUpdateAll) {
if (call instanceof ICall) {
ICallManager cm = this._getRepository();
if (cm != null && cm.isActive() && cm.isSupported(IReadCallRepository.class) && cm.isSupported(IWriteCallRepository.class)) {
ICaller caller = ((ICall) call).getCaller();
if (!caller.getPhoneNumber().isClired() && isUpdateAll) {
ICallList cl = ((IReadCallRepository) cm).getCalls(new CallerFilter(caller));
ICall aCall = null;
for (int i = cl.size() - 1; i >= 0; i--) {
aCall = cl.get(i);
aCall.setCaller(caller);
}
((IWriteCallRepository) cm).updateCalls(cl);
} else {
// update a single CLIR call or isUpdateAll == false
if (cm.isSupported(IWriteCallRepository.class))
((IWriteCallRepository) cm).updateCall((ICall) call);
}
}
}
}
use of de.janrufmonitor.repository.filter.CallerFilter in project janrufmonitor by tbrandt77.
the class FilterWizard method getCallerFilters.
private List getCallerFilters(IPhonenumber[] phones) {
List l = new ArrayList();
if (phones == null || phones.length == 0)
return l;
for (int i = 0; i < phones.length; i++) {
ICaller c = getRuntime().getCallerFactory().createCaller(getRuntime().getCallerFactory().createName("", ""), phones[i]);
l.add(new CallerFilter(c));
}
return l;
}
Aggregations