本文整理了Java中javax.mail.Flags.remove()
方法的一些代码示例,展示了Flags.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flags.remove()
方法的具体详情如下:
包路径:javax.mail.Flags
类名称:Flags
方法名:remove
[英]Remove the specified user flag from this Flags object.
[中]从此标志对象中删除指定的用户标志。
代码示例来源:origin: oblac/jodd
emails[i].flags().remove(flagsToUnset);
msg.setFlags(flagsToUnset, false);
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: org.mnode.mstor/mstor
public final boolean remove(final Object tag) {
if (tag instanceof String) {
flags.remove(TAG_PREFIX + tag);
return true;
}
return false;
}
代码示例来源:origin: apache/james-project
public Flags build() {
Flags flags = builder.build();
flags.remove(Flags.Flag.RECENT);
flags.remove(Flags.Flag.USER);
return flags;
}
}
代码示例来源:origin: com.sun.mail/javax.mail
f.remove(Flags.Flag.RECENT); // remove RECENT from copy
代码示例来源:origin: camunda/camunda-bpm-platform
f.remove(Flags.Flag.RECENT); // remove RECENT from copy
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.3.1_spec
/**
* Set or clear a flag value.
*
* @param flags The set of flags to effect.
* @param set The value to set the flag to (true or false).
*
* @exception MessagingException
*/
public synchronized void setFlags(Flags flag, boolean set) throws MessagingException {
if (set) {
flags.add(flag);
}
else {
flags.remove(flag);
}
}
代码示例来源:origin: org.apache.geronimo.specs/geronimo-javamail_1.4_spec
/**
* Set or clear a flag value.
*
* @param flag The set of flags to effect.
* @param set The value to set the flag to (true or false).
*
* @exception MessagingException
*/
public synchronized void setFlags(Flags flag, boolean set) throws MessagingException {
if (set) {
flags.add(flag);
}
else {
flags.remove(flag);
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException
*/
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException
*/
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: javax.mail/javax.mail-api
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: com.sun.mail/mailapi
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Set the flags for this message. <p>
*
* This implementation modifies the <code>flags</code> field.
*
* @exception IllegalWriteException if the underlying
* implementation does not support modification
* @exception IllegalStateException if this message is
* obtained from a READ_ONLY folder.
* @exception MessagingException for other failures
*/
@Override
public synchronized void setFlags(Flags flag, boolean set)
throws MessagingException {
if (set)
flags.add(flag);
else
flags.remove(flag);
}
代码示例来源:origin: org.apache.james/apache-james-mailbox-store
public Flags buildNewFlags(Flags oldFlags) {
Flags updatedFlags = new Flags(oldFlags);
switch (mode) {
case REPLACE:
return new Flags(providedFlags);
case ADD:
updatedFlags.add(providedFlags);
break;
case REMOVE:
updatedFlags.remove(providedFlags);
break;
}
return updatedFlags;
}
代码示例来源:origin: org.apache.geronimo.javamail/geronimo-javamail_1.4_provider
flags.add(Flags.Flag.SEEN);
} else {
flags.remove(Flags.Flag.SEEN);
代码示例来源:origin: org.apache.james/apache-james-imap-processor
private void init() throws MailboxException {
MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
mailboxManager.addListener(path, this, mailboxSession);
MessageResultIterator messages = mailboxManager.getMailbox(path, mailboxSession).getMessages(MessageRange.all(), FetchGroupImpl.MINIMAL, mailboxSession);
synchronized (this) {
while(messages.hasNext()) {
MessageResult mr = messages.next();
applicableFlags.add(mr.getFlags());
add(mr.getUid());
}
// \RECENT is not a applicable flag in imap so remove it from the list
applicableFlags.remove(Flags.Flag.RECENT);
}
}
内容来源于网络,如有侵权,请联系作者删除!