javax.mail.Store.getSharedNamespaces()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(147)

本文整理了Java中javax.mail.Store.getSharedNamespaces()方法的一些代码示例,展示了Store.getSharedNamespaces()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Store.getSharedNamespaces()方法的具体详情如下:
包路径:javax.mail.Store
类名称:Store
方法名:getSharedNamespaces

Store.getSharedNamespaces介绍

[英]Return a set of folders representing the shared namespaces. A shared namespace is a namespace that consists of mail folders that are intended to be shared amongst users and do not exist within a user's personal namespace.

This implementation returns an empty array. Subclasses should override this method to return appropriate information.
[中]返回一组表示共享名称空间的文件夹。共享名称空间是由邮件文件夹组成的名称空间,这些文件夹旨在在用户之间共享,但不存在于用户的个人名称空间中。
这个实现返回一个空数组。子类应该重写此方法以返回适当的信息。

代码示例

代码示例来源:origin: camunda/camunda-bpm-platform

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: com.sun.mail/javax.mail

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
@Override
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: javax.mail/com.springsource.javax.mail

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: jboss/jboss-javaee-specs

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
@Override
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: org.glassfish.metro/webservices-extra

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
@Override
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.javax.mail

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: com.sun.mail/jakarta.mail

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
@Override
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: com.sun.mail/android-mail

/**
 * Using the IMAP NAMESPACE command (RFC 2342), return a set
 * of folders representing the Shared namespaces.
 */
@Override
public Folder[] getSharedNamespaces() throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.shared == null)
  return super.getSharedNamespaces();
return namespaceToFolders(ns.shared, null);
}

代码示例来源:origin: org.apache.geronimo.javamail/geronimo-javamail_1.4_provider

/**
 * Return the root folders of namespaces that are intended to be shared between users.
 *
 * The default implementation simply returns an empty array.
 * @return the root folders of all shared namespaces
 * @throws MessagingException if there was a problem accessing the store
 */
public Folder[] getSharedNamespaces() throws MessagingException {
  IMAPNamespaceResponse namespaces = getNamespaces(); 
  
  // if nothing is returned, then use the API-defined default for this 
  if (namespaces.sharedNamespaces == null || namespaces.sharedNamespaces.isEmpty()) {
    return super.getSharedNamespaces(); 
  }
  
  // convert the list into an array of Folders. 
  return getNamespaceFolders(namespaces.sharedNamespaces); 
}

代码示例来源:origin: ujmp/universal-java-matrix-package

public ListMatrix<Folder> getSharedFolders() throws Exception {
  Folder[] folders = getStore().getSharedNamespaces();
  ListMatrix<Folder> folderMatrix = new DefaultListMatrix<Folder>(Arrays.asList(folders));
  store.close();
  return folderMatrix;
}

相关文章