Tabnine Logo
ImapCommand.getName
Code IndexAdd Tabnine to your IDE (free)

How to use
getName
method
in
org.apache.james.imap.api.ImapCommand

Best Java code snippets using org.apache.james.imap.api.ImapCommand.getName (Showing top 20 results out of 315)

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/apache-james-imap-message

/**
 * @see
 * org.apache.james.imap.encode.ImapResponseComposer#commandResponse(org.apache.james.imap.api.ImapCommand,
 * java.lang.String)
 */
public ImapResponseComposer commandResponse(ImapCommand command, String message) throws IOException {
  untagged();
  commandName(command.getName());
  message(message);
  end();
  return this;
}
origin: org.apache.james.protocols/protocols-imap

@Override
public ImapResponseComposer commandResponse(ImapCommand command, String message) throws IOException {
  untagged();
  commandName(command.getName());
  message(message);
  end();
  return this;
}
origin: org.apache.james.protocols/protocols-imap

@Override
protected void doProcess(GetAnnotationRequest message, ImapSession session, String tag, ImapCommand command,
             Responder responder) {
  try {
    proceed(message, session, tag, command, responder);
  } catch (MailboxNotFoundException e) {
    LOGGER.info("The command: {} is failed because not found mailbox {}", command.getName(), message.getMailboxName());
    no(command, tag, responder, HumanReadableText.FAILURE_NO_SUCH_MAILBOX, ResponseCode.tryCreate());
  } catch (MailboxException e) {
    LOGGER.error("GetAnnotation on mailbox {} failed for user {}", message.getMailboxName(), ImapSessionUtils.getUserName(session), e);
    no(command, tag, responder, HumanReadableText.GENERIC_FAILURE_DURING_PROCESSING);
  }
}
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.protocols/protocols-imap

protected final void process(M message, Responder responder, ImapSession session) {
  ImapCommand command = message.getCommand();
  String tag = message.getTag();
  TimeMetric timeMetric = metricFactory.timer(IMAP_PREFIX + command.getName());
  doProcess(message, command, tag, responder, session);
  timeMetric.stopAndPublish();
}
origin: org.apache.james/apache-james-imap-processor

  Object[] params = new Object[] {
      Rfc4314Rights.a_Administer_RIGHT.toString(),
      command.getName(),
      mailboxName
  };
Logger log = session.getLog();
if (log.isInfoEnabled()) {
  log.info(command.getName() +" failed for mailbox " + mailboxName, e);
origin: org.apache.james/apache-james-imap-processor

  Object[] params = new Object[] {
      Rfc4314Rights.a_Administer_RIGHT.toString(),
      command.getName(),
      mailboxName
  };
Logger log = session.getLog();
if (log.isInfoEnabled()) {
  log.info(command.getName() +" failed for mailbox " + mailboxName, e);
origin: org.apache.james/apache-james-imap-processor

  Object[] params = new Object[] {
      Rfc4314Rights.a_Administer_RIGHT.toString(),
      command.getName(),
      mailboxName
  };
Logger log = session.getLog();
if (log.isInfoEnabled()) {
  log.info(command.getName() +" failed for mailbox " + mailboxName, e);
origin: org.apache.james/apache-james-imap-processor

  Object[] params = new Object[] {
      Rfc4314Rights.a_Administer_RIGHT.toString(),
      command.getName(),
      mailboxName
  };
Logger log = session.getLog();
if (log.isInfoEnabled()) {
  log.info(command.getName() +" failed for mailbox " + mailboxName, e);
origin: org.apache.james.protocols/protocols-imap

        command.getName(),
        mailboxName
    };
  no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
} 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-message

composer.commandName(command.getName());
origin: org.apache.james.protocols/protocols-imap

        command.getName(),
        mailboxName
    };
  no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
} 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.protocols/protocols-imap

        command.getName(),
        mailboxName
    };
  no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
} 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

Logger log = session.getLog();
if (log.isInfoEnabled()) {
  log.info(command.getName() + " failed for mailbox " + mailboxName, e);
origin: org.apache.james.protocols/protocols-imap

        command.getName(),
        mailboxName
    };
  no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
} 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.protocols/protocols-imap

  no(command, tag, responder, HumanReadableText.MAILBOX_NOT_FOUND);
} 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.protocols/protocols-imap

composer.commandName(command.getName());
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

Object[] params = new Object[]{
    MailboxACL.Right.Read.toString(),
    command.getName(),
    message.getMailboxName()
};
org.apache.james.imap.apiImapCommandgetName

Popular methods of ImapCommand

  • anyStateCommand
  • validForState
  • <init>
  • authenticatedStateCommand
  • nonAuthenticatedStateCommand
  • selectedStateCommand

Popular in Java

  • Making http requests using okhttp
  • getSupportFragmentManager (FragmentActivity)
  • runOnUiThread (Activity)
  • compareTo (BigDecimal)
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top plugins for WebStorm
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