Search in sources :

Example 31 with ICallerManager

use of de.janrufmonitor.repository.ICallerManager in project janrufmonitor by tbrandt77.

the class ReIdentifyAction method getAllActiveCallerManagers.

private List getAllActiveCallerManagers(IRuntime r) {
    List allManagers = r.getCallerManagerFactory().getAllCallerManagers();
    List activeManager = new ArrayList();
    Object o = null;
    ICallerManager cm = null;
    for (int i = 0; i < allManagers.size(); i++) {
        o = allManagers.get(i);
        if (o != null && o instanceof ICallerManager) {
            cm = (ICallerManager) o;
            if (cm.isActive() && cm.isSupported(IIdentifyCallerRepository.class)) {
                activeManager.add(cm);
            }
        }
    }
    activeManager.remove(r.getCallerManagerFactory().getDefaultCallerManager());
    Collections.sort(activeManager, new RepositoryManagerComparator());
    m_logger.info("List with all active caller managers: " + allManagers.toString());
    return activeManager;
}
Also used : ArrayList(java.util.ArrayList) IIdentifyCallerRepository(de.janrufmonitor.repository.types.IIdentifyCallerRepository) RepositoryManagerComparator(de.janrufmonitor.repository.RepositoryManagerComparator) ArrayList(java.util.ArrayList) List(java.util.List) ICallerManager(de.janrufmonitor.repository.ICallerManager)

Aggregations

ICallerManager (de.janrufmonitor.repository.ICallerManager)31 List (java.util.List)15 ArrayList (java.util.ArrayList)14 ICallerList (de.janrufmonitor.framework.ICallerList)13 ICaller (de.janrufmonitor.framework.ICaller)12 IIdentifyCallerRepository (de.janrufmonitor.repository.types.IIdentifyCallerRepository)11 CallerNotFoundException (de.janrufmonitor.repository.CallerNotFoundException)9 IWriteCallerRepository (de.janrufmonitor.repository.types.IWriteCallerRepository)7 IAttribute (de.janrufmonitor.framework.IAttribute)6 HandlerException (de.janrufmonitor.service.commons.http.handler.HandlerException)6 IPhonenumber (de.janrufmonitor.framework.IPhonenumber)5 IFilter (de.janrufmonitor.repository.filter.IFilter)4 RepositoryManagerComparator (de.janrufmonitor.repository.RepositoryManagerComparator)3 ILocalRepository (de.janrufmonitor.repository.types.ILocalRepository)3 IReadCallerRepository (de.janrufmonitor.repository.types.IReadCallerRepository)3 File (java.io.File)3 OutputStream (java.io.OutputStream)3 StringTokenizer (java.util.StringTokenizer)3 Shell (org.eclipse.swt.widgets.Shell)3 IConfigurable (de.janrufmonitor.framework.configuration.IConfigurable)2