Examples of Flags


Examples of com.google.code.javax.mail.Flags

   * not present implies that all flags in the required FLAGS
   * response can be changed permanently.
   */
  if (permanentFlags == null) {
      if (availableFlags != null)
    permanentFlags = new Flags(availableFlags);
      else
    permanentFlags = new Flags();
  }
    }
View Full Code Here

Examples of com.google.jstestdriver.Flags

    myOriginal = new Args4jFlagsParser();
  }

  @Override
  public Flags parseArgument(String[] strings) {
    Flags flags = myOriginal.parseArgument(strings);
    if (flags instanceof FlagsImpl) {
      fix((FlagsImpl) flags);
    }
    return flags;
  }
View Full Code Here

Examples of com.google.singletondetector.Flags

        detector.getClass(getAsmStyleClassName(NotReallyASingleton.class));
    assertFalse(cl.isSingleton());
  }

  public void testCheckSingletonUsage() {
    Flags flags = new Flags();
    flags.setIgnoreHingletons(true);
    flags.setIgnoreMingletons(true);
    flags.setIgnoreFingletons(true);
    detector =
        new SingletonDetector(root, path, flags,
            getAsmStyleClassName(SingletonOne.class),
            getAsmStyleClassName(SingletonUserOne.class));
View Full Code Here

Examples of easyJ.common.validate.Flags

     *                declared in this class. To set multiple options you simply
     *                add them together. For example, ALLOW_2_SLASHES +
     *                NO_FRAGMENTS enables both of those options.
     */
    public UrlValidator(String[] schemes, int options) {
        this.options = new Flags(options);

        if (this.options.isOn(ALLOW_ALL_SCHEMES)) {
            return;
        }

View Full Code Here

Examples of javax.mail.Flags

      // DATE
      Date d = m.getSentDate();
      pr("SendDate: " + (d != null ? d.toString() : "UNKNOWN"), level);

      // FLAGS (not supported by POP3)
      Flags flags = m.getFlags();
      StringBuffer sb = new StringBuffer();
      Flags.Flag[] sf = flags.getSystemFlags(); // get the system flags

      boolean first = true;
      for (int i = 0; i < sf.length; i++) {
         String s;
         Flags.Flag f = sf[i];
         if (f == Flags.Flag.ANSWERED)
            s = "\\Answered";
         else if (f == Flags.Flag.DELETED)
            s = "\\Deleted";
         else if (f == Flags.Flag.DRAFT)
            s = "\\Draft";
         else if (f == Flags.Flag.FLAGGED)
            s = "\\Flagged";
         else if (f == Flags.Flag.RECENT)
            s = "\\Recent";
         else if (f == Flags.Flag.SEEN)
            s = "\\Seen";
         else
            continue; // skip it
         if (first)
            first = false;
         else
            sb.append(' ');
         sb.append(s);
      }

      String[] uf = flags.getUserFlags(); // get the user flag strings
      for (int i = 0; i < uf.length; i++) {
         if (first)
            first = false;
         else
            sb.append(' ');
View Full Code Here

Examples of javax.mail.Flags

  // ---------------------------------------------------------------------------

  public static Flags getFlags(MimeMessage oMsg)
    throws MessagingException {
    Flags oFlgs = oMsg.getFlags();
    if (oFlgs==null) oFlgs = new Flags();
    return oFlgs;
  }
View Full Code Here

Examples of javax.mail.Flags

    Object oFlag;

    if (oFolder==null)
      return super.getFlags();
    else {
      Flags oRetVal = null;
      Statement oStmt = null;
      ResultSet oRSet = null;
      try {
        Flags.Flag[] aFlags = new Flags.Flag[]{Flags.Flag.RECENT, Flags.Flag.ANSWERED, Flags.Flag.DELETED, Flags.Flag.DRAFT, Flags.Flag.FLAGGED, Flags.Flag.SEEN};
        oStmt = ( (DBFolder) oFolder).getConnection().createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
        oRSet = oStmt.executeQuery("SELECT "+DB.bo_recent+","+DB.bo_answered+","+DB.bo_deleted+","+DB.bo_draft+","+DB.bo_flagged+","+DB.bo_recent+","+DB.bo_seen+" FROM "+DB.k_mime_msgs+" WHERE "+DB.gu_mimemsg+"='"+getMessageGuid()+"'");
        if (oRSet.next()) {
          oRetVal = new Flags();
          for (int f=1; f<=6; f++) {
            oFlag = oRSet.getObject(f);
            if (!oRSet.wasNull()) {
              if (oFlag.getClass().equals(Short.TYPE)) {
                if (((Short) oFlag).shortValue()==(short)1)
                  oRetVal.add(aFlags[f-1]);
              }
              else {
                if (Integer.parseInt(oFlag.toString())!=0)
                  oRetVal.add(aFlags[f-1]);
              }
            }
          } // next (f)
        }
        oRSet.close();
View Full Code Here

Examples of javax.mail.Flags

    if (DebugFile.trace) {
      DebugFile.writeln("Begin DBMimeMessage.saveChanges()");
      DebugFile.incIdent();
    }

    Flags oFlgs = getFlags();

    if (oFolder instanceof DBFolder) {
      JDCConnection oConn = null;
      try {
        oConn.commit();
View Full Code Here

Examples of javax.mail.Flags

  } // getParent

  // ---------------------------------------------------------------------------

  public Flags getPermanentFlags() {
    Flags oFlgs = new Flags();
    oFlgs.add(Flags.Flag.DELETED);
    oFlgs.add(Flags.Flag.ANSWERED);
    oFlgs.add(Flags.Flag.DRAFT);
    oFlgs.add(Flags.Flag.SEEN);
    oFlgs.add(Flags.Flag.RECENT);
    oFlgs.add(Flags.Flag.FLAGGED);

    return oFlgs;
  }
View Full Code Here

Examples of javax.mail.Flags

        return set;
    }

    public boolean match(Message message) {
        try {
            Flags msgFlags = message.getFlags();
            if (set) {
                return msgFlags.contains(flags);
            } else {
                // yuk - I wish we could get at the internal state of the Flags
                Flags.Flag[] system = flags.getSystemFlags();
                for (int i = 0; i < system.length; i++) {
                    Flags.Flag flag = system[i];
                    if (msgFlags.contains(flag)) {
                        return false;
                    }
                }
                String[] user = flags.getUserFlags();
                for (int i = 0; i < user.length; i++) {
                    String flag = user[i];
                    if (msgFlags.contains(flag)) {
                        return false;
                    }
                }
                return true;
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.