Search in sources :

Example 1 with AddonRegistry

use of org.openecard.addon.AddonRegistry in project open-ecard by ecsec.

the class TCTokenHandler method getSupportedDIDs.

private List<String> getSupportedDIDs() {
    TreeSet<String> result = new TreeSet<>();
    // check all sal protocols in the
    AddonRegistry registry = manager.getRegistry();
    Set<AddonSpecification> addons = registry.listAddons();
    for (AddonSpecification addon : addons) {
        for (ProtocolPluginSpecification proto : addon.getSalActions()) {
            result.add(proto.getUri());
        }
    }
    return new ArrayList<>(result);
}
Also used : TreeSet(java.util.TreeSet) AddonRegistry(org.openecard.addon.AddonRegistry) ArrayList(java.util.ArrayList) AddonSpecification(org.openecard.addon.manifest.AddonSpecification) ProtocolPluginSpecification(org.openecard.addon.manifest.ProtocolPluginSpecification)

Example 2 with AddonRegistry

use of org.openecard.addon.AddonRegistry in project open-ecard by ecsec.

the class StatusHandler method getProtocolInfo.

@Nonnull
private List<String> getProtocolInfo(AddonManager manager) {
    TreeSet<String> result = new TreeSet<>();
    // check all sal protocols in the
    AddonRegistry registry = manager.getRegistry();
    Set<AddonSpecification> addons = registry.listAddons();
    for (AddonSpecification addon : addons) {
        for (ProtocolPluginSpecification proto : addon.getSalActions()) {
            result.add(proto.getUri());
        }
    }
    return new ArrayList<>(result);
}
Also used : TreeSet(java.util.TreeSet) AddonRegistry(org.openecard.addon.AddonRegistry) ArrayList(java.util.ArrayList) AddonSpecification(org.openecard.addon.manifest.AddonSpecification) ProtocolPluginSpecification(org.openecard.addon.manifest.ProtocolPluginSpecification) Nonnull(javax.annotation.Nonnull)

Aggregations

ArrayList (java.util.ArrayList)2 TreeSet (java.util.TreeSet)2 AddonRegistry (org.openecard.addon.AddonRegistry)2 AddonSpecification (org.openecard.addon.manifest.AddonSpecification)2 ProtocolPluginSpecification (org.openecard.addon.manifest.ProtocolPluginSpecification)2 Nonnull (javax.annotation.Nonnull)1