Package jnode.dto

Examples of jnode.dto.Link


  public Object handle(Request req, Response resp) {
    String id = req.queryParams("_id");
    if (id != null) {
      try {
        Long lid = Long.valueOf(id);
        Link link = ORMManager.get(Link.class).getById(lid);
        if (link != null) {
          for (String name : req.queryParams()) {
            if (name.startsWith("_")) {
              continue;
            }
View Full Code Here


    String code = null;
    String delete = req.queryParams("did");
    if (delete != null) {
      try {
        Long eid = Long.valueOf(delete);
        Link deleteLink = ORMManager.get(Link.class).getById(eid);
        if (deleteLink != null) {
          FtnTools.delete(deleteLink);
        }
      } catch (RuntimeException e) {
        code = "ERROR";
      }
    } else {
      try {
        FtnAddress ftn = new FtnAddress(_ftn);
        Link l = null;
        if (!_id.equals("0")) {
          Long id = Long.valueOf(_id);
          l = ORMManager.get(Link.class).getById(id);
        }
        if (l == null) {
          l = new Link();
        }
        l.setLinkAddress(ftn.toString());
        l.setLinkName(name);
        l.setPaketPassword(pktpass);
        l.setProtocolPassword(pass);
        l.setProtocolAddress(address);
        ORMManager.get(Link.class).saveOrUpdate(l);
      } catch (RuntimeException e) {
        code = "ERROR";
      }
    }
View Full Code Here

      PointRequest pr = ORMManager.get(PointRequest.class).getById(key);
      if (pr != null) {
        synchronized (PointRequest.class) {
          if (null == ORMManager.get(Link.class).getFirstAnd(
              "ftn_address", "=", pr.getAddr())) {
            Link l = new Link();
            l.setLinkName(pr.getName());
            l.setLinkAddress(pr.getAddr());
            l.setPaketPassword(pr.getPassword());
            l.setProtocolHost("-");
            l.setProtocolPort(0);
            l.setProtocolPassword(pr.getPassword());
            ORMManager.get(Link.class).save(l);
            ORMManager.get(PointRequest.class).delete(pr);
            writeMails(pr);
            text = "Проверьте вашу почту для получения дальнейших инструкций";
          } else {
View Full Code Here

TOP

Related Classes of jnode.dto.Link

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.