Package net.pterodactylus.sone.freenet.wot

Examples of net.pterodactylus.sone.freenet.wot.OwnIdentity


    templateContext.set("sones", localSones);
    List<OwnIdentity> ownIdentitiesWithoutSone = getOwnIdentitiesWithoutSone(webInterface.getCore());
    templateContext.set("identitiesWithoutSone", ownIdentitiesWithoutSone);
    if (request.getMethod() == Method.POST) {
      String id = request.getHttpRequest().getPartAsStringFailsafe("identity", 44);
      OwnIdentity selectedIdentity = null;
      for (OwnIdentity ownIdentity : ownIdentitiesWithoutSone) {
        if (ownIdentity.getId().equals(id)) {
          selectedIdentity = ownIdentity;
          break;
        }
View Full Code Here


   * @param ownIdentityAddedEvent
   *            The event
   */
  @Subscribe
  public void ownIdentityAdded(OwnIdentityAddedEvent ownIdentityAddedEvent) {
    OwnIdentity ownIdentity = ownIdentityAddedEvent.ownIdentity();
    logger.log(Level.FINEST, String.format("Adding OwnIdentity: %s", ownIdentity));
    if (ownIdentity.hasContext("Sone")) {
      addLocalSone(ownIdentity);
    }
  }
View Full Code Here

   * @param ownIdentityRemovedEvent
   *            The event
   */
  @Subscribe
  public void ownIdentityRemoved(OwnIdentityRemovedEvent ownIdentityRemovedEvent) {
    OwnIdentity ownIdentity = ownIdentityRemovedEvent.ownIdentity();
    logger.log(Level.FINEST, String.format("Removing OwnIdentity: %s", ownIdentity));
    trustedIdentities.removeAll(ownIdentity);
  }
View Full Code Here

   * @param identityRemovedEvent
   *            The event
   */
  @Subscribe
  public void identityRemoved(IdentityRemovedEvent identityRemovedEvent) {
    OwnIdentity ownIdentity = identityRemovedEvent.ownIdentity();
    Identity identity = identityRemovedEvent.identity();
    trustedIdentities.remove(ownIdentity, identity);
    boolean foundIdentity = false;
    for (Entry<OwnIdentity, Collection<Identity>> trustedIdentity : trustedIdentities.asMap().entrySet()) {
      if (trustedIdentity.getKey().equals(ownIdentity)) {
View Full Code Here

TOP

Related Classes of net.pterodactylus.sone.freenet.wot.OwnIdentity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.