Package jnode.dto

Examples of jnode.dto.Rewrite


      logger.l1("[+] owner point account created");
      logger.l1(String.format("\n\tFTN: %s\n\tAka: %s\n\tPassword: %s\n",
          owner.getLinkAddress(), owner.getLinkName(),
          owner.getPaketPassword()));
      long nice = 1;
      Rewrite rw = new Rewrite();
      rw.setType(Type.NETMAIL);
      rw.setLast(true);
      rw.setNice(nice++);
      rw.setOrig_from_addr("^"
          + ownAddr.replace(".", "\\.").replace("/", "\\/") + "$");
      rw.setNew_from_addr(FtnTools.getPrimaryFtnAddress().toString());
      ORMManager.get(Rewrite.class).save(rw);

      for (FtnAddress address : info.getAddressList()) {
        Rewrite rw2 = new Rewrite();
        rw2.setType(Type.NETMAIL);
        rw2.setLast(true);
        rw2.setNice(nice++);
        rw2.setOrig_to_addr("^"
            + address.toString().replace(".", "\\.")
                .replace("/", "\\/") + "$");
        rw2.setNew_to_addr(ownAddr);
        ORMManager.get(Rewrite.class).save(rw2);
      }
      logger.l1("[+] Basic rewrites for owner's point created!");
    }
View Full Code Here


                logger.l5("dupe table dropped");
        List<Rewrite_1_4> rewrites = ORMManager.get(Rewrite_1_4.class)
            .getAll();
        LinkedList<Rewrite> newRewrites = new LinkedList<>();
        for (Rewrite_1_4 o : rewrites) {
          Rewrite n = new Rewrite();
          n.setNice(o.getNice());
          n.setType(o.getType());
          n.setLast(o.isLast());
          n.setOrig_from_addr(o.getOrig_from_addr());
          n.setOrig_from_name(o.getOrig_from_name());
          n.setOrig_to_addr(o.getOrig_to_addr());
          n.setOrig_to_name(o.getOrig_to_name());
          n.setOrig_subject(o.getOrig_subject());

          n.setNew_from_addr(o.getNew_from_addr());
          n.setNew_from_name(o.getNew_from_name());
          n.setNew_to_addr(o.getNew_to_addr());
          n.setNew_to_name(o.getNew_to_name());
          n.setNew_subject(o.getNew_subject());
          newRewrites.add(n);
        }
        TableUtils.dropTable(ORMManager.getSource(), Rewrite_1_4.class,
            true);
                logger.l5("rewrite table dropped");
View Full Code Here

    String code = null;

    if (did != null) {
      try {
        Long id = Long.valueOf(did);
        Rewrite rew = ORMManager.get(Rewrite.class).getById(id);
        if (rew != null) {
          ORMManager.get(Rewrite.class).delete(rew);
        }
      } catch (NumberFormatException e) {
        e.printStackTrace();
        code = "ERROR";
      }
    } else {
      try {
        Long nice = Long.valueOf(n);
        boolean last = Boolean.valueOf(l);
        Rewrite rew = new Rewrite();
        rew.setNice(nice);
        rew.setLast(last);
       
        rew.setType(Rewrite.Type.valueOf(t));
       
        rew.setOrig_from_addr(ofa);
        rew.setNew_from_addr(nfa);

        rew.setOrig_from_name(ofn);
        rew.setNew_from_name(nfn);

        rew.setOrig_to_addr(ota);
        rew.setNew_to_addr(nta);

        rew.setOrig_to_name(otn);
        rew.setNew_to_name(ntn);

        rew.setOrig_subject(os);
        rew.setNew_subject(ns);

        ORMManager.get(Rewrite.class).save(rew);
      } catch (RuntimeException e) {
        e.printStackTrace();
        code = "ERROR";
View Full Code Here

TOP

Related Classes of jnode.dto.Rewrite

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.