Tabnine Logo
HumanReadableText.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.james.imap.api.display.HumanReadableText
constructor

Best Java code snippets using org.apache.james.imap.api.display.HumanReadableText.<init> (Showing top 16 results out of 315)

origin: org.apache.james/apache-james-imap-api

public static final HumanReadableText unseen(long numberUnseen) {
  return new HumanReadableText("org.apache.james.imap.UNSEEN", "Message " + numberUnseen + " is first unseen");
}
origin: org.apache.james.protocols/protocols-imap

public static final HumanReadableText unseen(long numberUnseen) {
  return new HumanReadableText("org.apache.james.imap.UNSEEN", "MailboxMessage " + numberUnseen + " is first unseen");
}
origin: org.apache.james/apache-james-imap-api

public static final HumanReadableText permanentFlags(Flags flags) {
  String text;
  if (flags.getSystemFlags() != null && flags.getSystemFlags().length > 0) {
    text = "Limited";
  } else {
    text = "No permanent flags permitted";
  }
  return new HumanReadableText("org.apache.james.imap.PERMANENT_FLAGS", text);
}
origin: org.apache.james.protocols/protocols-imap

public static final HumanReadableText permanentFlags(Flags flags) {
  String text;
  if (flags.getSystemFlags() != null && flags.getSystemFlags().length > 0) {
    text = "Limited";
  } else {
    text = "No permanent flags permitted";
  }
  return new HumanReadableText("org.apache.james.imap.PERMANENT_FLAGS", text);
}
origin: org.apache.james.protocols/protocols-imap

@Override
protected void doProcess(SetQuotaRequest message, ImapSession session, String tag, ImapCommand command, Responder responder) {
  Object[] params = new Object[]{
    "Full admin rights",
    command.getName(),
    "Can not perform SETQUOTA commands"
  };
  HumanReadableText humanReadableText = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
  no(command, tag, responder, humanReadableText);
}
origin: org.apache.james.protocols/protocols-imap

@Override
protected void doProcess(SetAnnotationRequest message, ImapSession session, String tag, ImapCommand command,
             Responder responder) {
  final MailboxManager mailboxManager = getMailboxManager();
  final MailboxSession mailboxSession = ImapSessionUtils.getMailboxSession(session);
  final String mailboxName = message.getMailboxName();
  try {
    MailboxPath mailboxPath = PathConverter.forSession(session).buildFullPath(mailboxName);
    mailboxManager.updateAnnotations(mailboxPath, mailboxSession, message.getMailboxAnnotations());
    okComplete(command, tag, responder);
  } catch (MailboxNotFoundException e) {
    LOGGER.info("{} failed for mailbox {}", command.getName(), mailboxName, e);
    no(command, tag, responder, HumanReadableText.FAILURE_NO_SUCH_MAILBOX, StatusResponse.ResponseCode.tryCreate());
  } catch (AnnotationException e) {
    LOGGER.info("{} failed for mailbox {}", command.getName(), mailboxName, e);
    no(command, tag, responder, new HumanReadableText(HumanReadableText.MAILBOX_ANNOTATION_KEY, e.getMessage()));
  } catch (MailboxException e) {
    LOGGER.error("{} failed for mailbox {}", command.getName(), mailboxName, e);
    no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
  }
}
origin: org.apache.james/apache-james-imap-processor

        mailboxName
    };
    HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
    no(command, tag, responder, text);
  HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUPPORTED_RIGHT_KEY, HumanReadableText.UNSUPPORTED_RIGHT_DEFAULT_VALUE, params);
  taggedBad(command, tag, responder, text);
} catch (MailboxNotFoundException e) {
origin: org.apache.james/apache-james-imap-processor

        mailboxName
    };
    HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
    no(command, tag, responder, text);
  HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUPPORTED_RIGHT_KEY, HumanReadableText.UNSUPPORTED_RIGHT_DEFAULT_VALUE, params);
  taggedBad(command, tag, responder, text);
} catch (MailboxNotFoundException e) {
origin: org.apache.james.protocols/protocols-imap

        mailboxName
    };
    HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
    no(command, tag, responder, text);
  } else {
  HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUPPORTED_RIGHT_KEY, HumanReadableText.UNSUPPORTED_RIGHT_DEFAULT_VALUE, params);
  taggedBad(command, tag, responder, text);
} catch (MailboxNotFoundException e) {
origin: org.apache.james/apache-james-imap-processor

    mailboxName
};
HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
no(command, tag, responder, text);
origin: org.apache.james/apache-james-imap-processor

    mailboxName
};
HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
no(command, tag, responder, text);
origin: org.apache.james.protocols/protocols-imap

        mailboxName
    };
    HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
    no(command, tag, responder, text);
  } else {
  HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUPPORTED_RIGHT_KEY, HumanReadableText.UNSUPPORTED_RIGHT_DEFAULT_VALUE, params);
  taggedBad(command, tag, responder, text);
} catch (MailboxNotFoundException e) {
origin: org.apache.james.protocols/protocols-imap

      mailboxName
  };
  HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
  no(command, tag, responder, text);
} else {
origin: org.apache.james.protocols/protocols-imap

      mailboxName
  };
  HumanReadableText text = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
  no(command, tag, responder, text);
} else {
origin: org.apache.james.protocols/protocols-imap

@Override
protected void doProcess(GetQuotaRequest message, ImapSession session, String tag, ImapCommand command, Responder responder) {
  try {
    QuotaRoot quotaRoot = quotaRootResolver.fromString(message.getQuotaRoot());
    if (hasRight(quotaRoot, session)) {
      Quota<QuotaCount> messageQuota = quotaManager.getMessageQuota(quotaRoot);
      Quota<QuotaSize> storageQuota = quotaManager.getStorageQuota(quotaRoot);
      if (messageQuota.getLimit().isLimited()) {
        responder.respond(new QuotaResponse(ImapConstants.MESSAGE_QUOTA_RESOURCE, quotaRoot.getValue(), messageQuota));
      }
      if (storageQuota.getLimit().isLimited()) {
        responder.respond(new QuotaResponse(ImapConstants.STORAGE_QUOTA_RESOURCE, quotaRoot.getValue(), storageQuota));
      }
      okComplete(command, tag, responder);
    } else {
      Object[] params = new Object[]{
          MailboxACL.Right.Read.toString(),
          command.getName(),
          "Any mailbox of this user USER"
      };
      HumanReadableText humanReadableText = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
      no(command, tag, responder, humanReadableText);
    }
  } catch (MailboxException me) {
    taggedBad(command, tag, responder, HumanReadableText.FAILURE_NO_SUCH_MAILBOX);
  }
}
origin: org.apache.james.protocols/protocols-imap

    message.getMailboxName()
};
HumanReadableText humanReadableText = new HumanReadableText(HumanReadableText.UNSUFFICIENT_RIGHTS_KEY, HumanReadableText.UNSUFFICIENT_RIGHTS_DEFAULT_VALUE, params);
no(command, tag, responder, humanReadableText);
org.apache.james.imap.api.displayHumanReadableText<init>

Popular methods of HumanReadableText

  • getDefaultValue
    Gets the default value for this text.
  • getParameters
    Gets parameters that may be substituted into the text.
  • permanentFlags
  • unseen
  • getKey
    Gets a unique key that can be used to loopup the text. How this is performed is implementation indep
  • toString

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • Path (java.nio.file)
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now