Difference between revisions of "Message Flags"

m (added category)
Line 37: Line 37:
  
 
[[Category: Zimbra Web Client]]
 
[[Category: Zimbra Web Client]]
 +
 +
 +
The following are the bit masks values that are used for the message  flags attribute that's stored within the database.
 +
 +
    public static final int BITMASK_FROM_ME      = FlagInfo.getBitmask(ID_FLAG_FROM_ME);      // 1
 +
    public static final int BITMASK_ATTACHED      = FlagInfo.getBitmask(ID_FLAG_ATTACHED);      // 2
 +
    public static final int BITMASK_REPLIED      = FlagInfo.getBitmask(ID_FLAG_REPLIED);      // 4
 +
    public static final int BITMASK_FORWARDED    = FlagInfo.getBitmask(ID_FLAG_FORWARDED);    // 8
 +
    public static final int BITMASK_COPIED        = FlagInfo.getBitmask(ID_FLAG_COPIED);        // 16
 +
    public static final int BITMASK_FLAGGED      = FlagInfo.getBitmask(ID_FLAG_FLAGGED);      // 32
 +
    public static final int BITMASK_DRAFT        = FlagInfo.getBitmask(ID_FLAG_DRAFT);        // 64
 +
    public static final int BITMASK_DELETED      = FlagInfo.getBitmask(ID_FLAG_DELETED);      // 128
 +
    public static final int BITMASK_NOTIFIED      = FlagInfo.getBitmask(ID_FLAG_NOTIFIED);      // 256
 +
    public static final int BITMASK_UNREAD        = FlagInfo.getBitmask(ID_FLAG_UNREAD);        // 512
 +
    public static final int BITMASK_HIGH_PRIORITY = FlagInfo.getBitmask(ID_FLAG_HIGH_PRIORITY); // 1024
 +
    public static final int BITMASK_LOW_PRIORITY  = FlagInfo.getBitmask(ID_FLAG_LOW_PRIORITY);  // 2048
 +
    public static final int BITMASK_VERSIONED    = FlagInfo.getBitmask(ID_FLAG_VERSIONED);    // 4096
 +
    public static final int BITMASK_INDEXING_DEFERRED = FlagInfo.getBitmask(ID_FLAG_INDEXING_DEFERRED); // 8192
 +
    public static final int BITMASK_SUBSCRIBED    = FlagInfo.getBitmask(ID_FLAG_SUBSCRIBED);    // 524288
 +
    public static final int BITMASK_EXCLUDE_FREEBUSY = FlagInfo.getBitmask(ID_FLAG_EXCLUDE_FREEBUSY); // 1048576
 +
    public static final int BITMASK_CHECKED      = FlagInfo.getBitmask(ID_FLAG_CHECKED);      // 2097152
 +
    public static final int BITMASK_NO_INHERIT    = FlagInfo.getBitmask(ID_FLAG_NO_INHERIT);    // 4194304
 +
    public static final int BITMASK_INVITE        = FlagInfo.getBitmask(ID_FLAG_INVITE);        // 8388608
 +
    public static final int BITMASK_SYNCFOLDER    = FlagInfo.getBitmask(ID_FLAG_SYNCFOLDER);    // 16777216
 +
    public static final int BITMASK_SYNC          = FlagInfo.getBitmask(ID_FLAG_SYNC);          // 33554432
 +
    public static final int BITMASK_NO_INFERIORS  = FlagInfo.getBitmask(ID_FLAG_NO_INFERIORS);  // 67108864
 +
    @Deprecated //support for ZD 1.x local data migration
 +
    public static final int BITMASK_ARCHIVED      = FlagInfo.getBitmask(ID_FLAG_ARCHIVED);      // 134217728
 +
    public static final int BITMASK_GLOBAL        = FlagInfo.getBitmask(ID_FLAG_GLOBAL);        // 268435456
 +
    public static final int BITMASK_IN_DUMPSTER  = FlagInfo.getBitmask(ID_FLAG_IN_DUMPSTER);  // 536870912

Revision as of 16:28, 27 July 2011

Zimbra Message Flags

Zimbra Messages have a "flags" attribute that describes the state of the message. This flags attribute is of type String and has a one character code which represents a state:

u -> unread

f -> flagged

a -> has attachment

s -> sent by me

r -> replied

w -> forwarded

d -> draft

x -> deleted

n -> notification sent


by default a message priority is "normal" otherwise:

! -> priority high

? -> priority low


Improvement

flags attribute should be of type uint and store bitwise flags. They are easier and faster to parse.


The following are the bit masks values that are used for the message flags attribute that's stored within the database.

   public static final int BITMASK_FROM_ME       = FlagInfo.getBitmask(ID_FLAG_FROM_ME);       // 1
   public static final int BITMASK_ATTACHED      = FlagInfo.getBitmask(ID_FLAG_ATTACHED);      // 2
   public static final int BITMASK_REPLIED       = FlagInfo.getBitmask(ID_FLAG_REPLIED);       // 4
   public static final int BITMASK_FORWARDED     = FlagInfo.getBitmask(ID_FLAG_FORWARDED);     // 8
   public static final int BITMASK_COPIED        = FlagInfo.getBitmask(ID_FLAG_COPIED);        // 16
   public static final int BITMASK_FLAGGED       = FlagInfo.getBitmask(ID_FLAG_FLAGGED);       // 32
   public static final int BITMASK_DRAFT         = FlagInfo.getBitmask(ID_FLAG_DRAFT);         // 64
   public static final int BITMASK_DELETED       = FlagInfo.getBitmask(ID_FLAG_DELETED);       // 128
   public static final int BITMASK_NOTIFIED      = FlagInfo.getBitmask(ID_FLAG_NOTIFIED);      // 256
   public static final int BITMASK_UNREAD        = FlagInfo.getBitmask(ID_FLAG_UNREAD);        // 512
   public static final int BITMASK_HIGH_PRIORITY = FlagInfo.getBitmask(ID_FLAG_HIGH_PRIORITY); // 1024
   public static final int BITMASK_LOW_PRIORITY  = FlagInfo.getBitmask(ID_FLAG_LOW_PRIORITY);  // 2048
   public static final int BITMASK_VERSIONED     = FlagInfo.getBitmask(ID_FLAG_VERSIONED);     // 4096
   public static final int BITMASK_INDEXING_DEFERRED = FlagInfo.getBitmask(ID_FLAG_INDEXING_DEFERRED); // 8192
   public static final int BITMASK_SUBSCRIBED    = FlagInfo.getBitmask(ID_FLAG_SUBSCRIBED);    // 524288
   public static final int BITMASK_EXCLUDE_FREEBUSY = FlagInfo.getBitmask(ID_FLAG_EXCLUDE_FREEBUSY); // 1048576
   public static final int BITMASK_CHECKED       = FlagInfo.getBitmask(ID_FLAG_CHECKED);       // 2097152
   public static final int BITMASK_NO_INHERIT    = FlagInfo.getBitmask(ID_FLAG_NO_INHERIT);    // 4194304
   public static final int BITMASK_INVITE        = FlagInfo.getBitmask(ID_FLAG_INVITE);        // 8388608
   public static final int BITMASK_SYNCFOLDER    = FlagInfo.getBitmask(ID_FLAG_SYNCFOLDER);    // 16777216
   public static final int BITMASK_SYNC          = FlagInfo.getBitmask(ID_FLAG_SYNC);          // 33554432
   public static final int BITMASK_NO_INFERIORS  = FlagInfo.getBitmask(ID_FLAG_NO_INFERIORS);  // 67108864
   @Deprecated //support for ZD 1.x local data migration
   public static final int BITMASK_ARCHIVED      = FlagInfo.getBitmask(ID_FLAG_ARCHIVED);      // 134217728
   public static final int BITMASK_GLOBAL        = FlagInfo.getBitmask(ID_FLAG_GLOBAL);        // 268435456
   public static final int BITMASK_IN_DUMPSTER   = FlagInfo.getBitmask(ID_FLAG_IN_DUMPSTER);   // 536870912
Jump to: navigation, search