Package jnode.dto

Examples of jnode.dto.FileSubscription


        denied = false;
      }
      if (denied) {
        continue;
      }
      FileSubscription sub = ORMManager.get(FileSubscription.class)
          .getFirstAnd("filearea_id", "=", area.getId(), "link_id",
              "=", link.getId());

      if (sub != null) {
        sb.append("* ");
 
View Full Code Here


    if (areas.isEmpty()) {
      sb.append(area + " not found");
    } else {
      for (Filearea earea : areas) {
        sb.append(earea.getName());
        FileSubscription sub = ORMManager.get(FileSubscription.class)
            .getFirstAnd("filearea_id", "=", earea.getId(),
                "link_id", "=", link.getId());
        if (sub != null) {
          sb.append(" already subscribed");
        } else {
          boolean denied = true;
          if (!"".equals(earea.getGroup())) {
            for (String group : grps) {
              if (earea.getGroup().equals(group)) {
                denied = false;
                break;
              }
            }
          } else {
            denied = false;
          }
          if (denied) {
            sb.append(" access denied");
          } else {
            sub = new FileSubscription();
            sub.setArea(earea);
            sub.setLink(link);
            ORMManager.get(FileSubscription.class).save(sub);
            sb.append(" subscribed");
          }
        }
        sb.append('\n');
View Full Code Here

      sb.append(area);
      sb.append(" not found");
    } else {
      for (Filearea earea : areas) {
        sb.append(earea.getName());
        FileSubscription sub = ORMManager.get(FileSubscription.class)
            .getFirstAnd("filearea_id", "=", earea.getId(),
                "link_id", "=", link.getId());
        if (sub == null) {
          sb.append(" is not subscribed");
        } else {
View Full Code Here

        ret.setGroup((link != null) ? getOptionString(link,
            LinkOption.SARRAY_LINK_GROUPS).split(" ")[0] : "");
        logger.l3("Filearea " + name + " created");
        ORMManager.get(Filearea.class).save(ret);
        if (link != null) {
          FileSubscription sub = new FileSubscription();
          sub.setArea(ret);
          sub.setLink(link);
          ORMManager.get(FileSubscription.class).save(sub);
        }
        Notifier.INSTANSE.notify(new NewFileareaEvent(name, link));
      }
    } else {
View Full Code Here

TOP

Related Classes of jnode.dto.FileSubscription

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.