Search in sources :

Example 16 with ICallManager

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

the class JournalController method deleteElements.

public synchronized void deleteElements(Object list) {
    if (list instanceof ICallList) {
        ICallManager cm = this._getRepository();
        if (cm != null && cm.isActive() && cm.isSupported(IWriteCallRepository.class)) {
            ((IWriteCallRepository) cm).removeCalls((ICallList) list);
            this.m_data = null;
        }
    }
}
Also used : ICallManager(de.janrufmonitor.repository.ICallManager) ICallList(de.janrufmonitor.framework.ICallList) IWriteCallRepository(de.janrufmonitor.repository.types.IWriteCallRepository)

Example 17 with ICallManager

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

the class JournalController method addElements.

public synchronized void addElements(Object list) {
    if (list instanceof ICallList) {
        ICallManager cm = this._getRepository();
        if (cm != null && list != null && cm.isActive() && cm.isSupported(IWriteCallRepository.class)) {
            ((IWriteCallRepository) cm).setCalls((ICallList) list);
            this.m_data = null;
        }
    }
}
Also used : ICallManager(de.janrufmonitor.repository.ICallManager) ICallList(de.janrufmonitor.framework.ICallList) IWriteCallRepository(de.janrufmonitor.repository.types.IWriteCallRepository)

Example 18 with ICallManager

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

the class Journal method getTitleExtension.

protected String getTitleExtension() {
    String id = this.m_configuration.getProperty(CFG_REPOSITORY, "");
    if (id != null && id.length() > 0) {
        ICallManager cm = getRuntime().getCallManagerFactory().getCallManager(id);
        if (cm != null && cm.isSupported(ILocalRepository.class)) {
            String title = "";
            if (cm instanceof IConfigurable) {
                title = getI18nManager().getString(((IConfigurable) cm).getNamespace(), "title", "label", getLanguage()) + " - ";
            }
            title += ((ILocalRepository) cm).getFile();
            return title;
        }
        if (cm != null && cm.isSupported(IRemoteRepository.class)) {
            String title = "";
            if (cm instanceof IConfigurable) {
                title = getI18nManager().getString(((IConfigurable) cm).getNamespace(), "title", "label", getLanguage());
            }
            return title;
        }
    }
    return null;
}
Also used : ICallManager(de.janrufmonitor.repository.ICallManager) IRemoteRepository(de.janrufmonitor.repository.types.IRemoteRepository) ILocalRepository(de.janrufmonitor.repository.types.ILocalRepository) IConfigurable(de.janrufmonitor.framework.configuration.IConfigurable)

Aggregations

ICallManager (de.janrufmonitor.repository.ICallManager)18 ICallList (de.janrufmonitor.framework.ICallList)12 IWriteCallRepository (de.janrufmonitor.repository.types.IWriteCallRepository)10 IReadCallRepository (de.janrufmonitor.repository.types.IReadCallRepository)8 List (java.util.List)6 IFilter (de.janrufmonitor.repository.filter.IFilter)5 HandlerException (de.janrufmonitor.service.commons.http.handler.HandlerException)5 ICall (de.janrufmonitor.framework.ICall)4 ICaller (de.janrufmonitor.framework.ICaller)3 IEventBroker (de.janrufmonitor.framework.event.IEventBroker)3 OutputStream (java.io.OutputStream)3 UUIDFilter (de.janrufmonitor.repository.filter.UUIDFilter)2 ISearchTerm (de.janrufmonitor.repository.search.ISearchTerm)2 SearchTermSeriarlizer (de.janrufmonitor.repository.search.SearchTermSeriarlizer)2 ILocalRepository (de.janrufmonitor.repository.types.ILocalRepository)2 IRemoteRepository (de.janrufmonitor.repository.types.IRemoteRepository)2 File (java.io.File)2 ArrayList (java.util.ArrayList)2 Properties (java.util.Properties)2 Message (de.janrufmonitor.exception.Message)1