Hallo Miteinander ein kleines Gratismodul, mit dem ihr eine Funktionstaste anlegen könnt, mit dem ihr für euren eigenen, oder fremdem User deren iFMC de-aktivieren könnt.
Lizenzschlüssel: TZKZ5-F55KX-J7MJP-NPAGV-KWQNK
Downloads findet ihr auf: http://module.si-solutions.ch
Wiki-Artikel: http://wiki.si-solutions.ch:8018/ifmc-de-aktivieren
//edit: Source Code:
Java
package nucom.module.ifmc;
import java.util.List;
import org.apache.commons.logging.Log;
import de.starface.core.component.StarfaceComponentProvider;
import de.vertico.starface.module.core.model.VariableType;
import de.vertico.starface.module.core.model.Visibility;
import de.vertico.starface.module.core.runtime.IBaseExecutable;
import de.vertico.starface.module.core.runtime.IRuntimeEnvironment;
import de.vertico.starface.module.core.runtime.annotations.Function;
import de.vertico.starface.module.core.runtime.annotations.InputVar;
import de.vertico.starface.persistence.connector.SipAndPhonesHandler;
import de.vertico.starface.persistence.databean.config.phone.FMCBean;
@Function(visibility=Visibility.Private, rookieFunction=false, description="")
public class ToggleIFMC implements IBaseExecutable
{
@InputVar(label="STARFACE_ACCOUNT", description="",type=VariableType.STARFACE_ACCOUNT)
public Integer STARFACE_ACCOUNT=-1;
@InputVar(label="Enable", description="",type=VariableType.BOOLEAN)
public Boolean Enable=false;
StarfaceComponentProvider componentProvider = StarfaceComponentProvider.getInstance();
@Override
public void execute(IRuntimeEnvironment context) throws Exception
{
Log log = context.getLog();
SipAndPhonesHandler SIPH = (SipAndPhonesHandler)context.provider().fetch((SipAndPhonesHandler.class));
if(STARFACE_ACCOUNT == -1)
{
log.debug("Invalid Starface Account Provided: -1");
return;
}
List<FMCBean> IFMCBeans = SIPH.getFMCBeansForAccount(STARFACE_ACCOUNT);
for(FMCBean FMCB : IFMCBeans)
{
FMCB.setActive(Enable);
}
SIPH.updateFMCBeansForAccount(STARFACE_ACCOUNT, IFMCBeans, true);
}
}
Alles anzeigen
MfG
Fabian