Search in sources :

Example 1 with TCTokenHandler

use of org.openecard.binding.tctoken.TCTokenHandler in project open-ecard by ecsec.

the class ActivateAction method init.

@Override
public void init(Context ctx) {
    tokenHandler = new TCTokenHandler(ctx);
    this.ctx = ctx;
    gui = ctx.getUserConsent();
    dispatcher = ctx.getDispatcher();
    manager = ctx.getManager();
    settingsAndDefaultView = ctx.getViewController();
    try {
        AddonSpecification addonSpecStatus = manager.getRegistry().search("Status");
        statusAction = manager.getAppPluginAction(addonSpecStatus, "getStatus");
        AddonSpecification addonSpecPinMngmt = manager.getRegistry().search("PIN-Plugin");
        pinManAction = manager.getAppExtensionAction(addonSpecPinMngmt, "GetCardsAndPINStatusAction");
    } catch (AddonNotFoundException ex) {
        // this should never happen because the status and pin plugin are always available
        String msg = "Failed to get Status or PIN Plugin.";
        LOG.error(msg, ex);
        throw new RuntimeException(msg, ex);
    }
}
Also used : AddonNotFoundException(org.openecard.addon.AddonNotFoundException) TCTokenHandler(org.openecard.binding.tctoken.TCTokenHandler) AddonSpecification(org.openecard.addon.manifest.AddonSpecification)

Aggregations

AddonNotFoundException (org.openecard.addon.AddonNotFoundException)1 AddonSpecification (org.openecard.addon.manifest.AddonSpecification)1 TCTokenHandler (org.openecard.binding.tctoken.TCTokenHandler)1