本文整理了Java中javax.mail.Store.getUserNamespaces()
方法的一些代码示例,展示了Store.getUserNamespaces()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Store.getUserNamespaces()
方法的具体详情如下:
包路径:javax.mail.Store
类名称:Store
方法名:getUserNamespaces
[英]Return a set of folders representing the namespaces for user
. The namespaces returned represent the personal namespaces for the user. To access mail folders in the other user's namespace, the currently authenticated user must be explicitly granted access rights. For example, it is common for a manager to grant to their secretary access rights to their mail folders.
This implementation returns an empty array. Subclasses should override this method to return appropriate information.
[中]返回一组表示user
名称空间的文件夹。返回的名称空间表示用户的个人名称空间。要访问其他用户命名空间中的邮件文件夹,必须明确授予当前经过身份验证的用户访问权限。例如,经理通常会授予秘书对其邮件文件夹的访问权限。
这个实现返回一个空数组。子类应该重写此方法以返回适当的信息。
代码示例来源:origin: com.sun.mail/javax.mail
/**
* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
*/
@Override
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源:origin: camunda/camunda-bpm-platform
/**
* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
*/
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源: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 User's namespaces.
*/
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源:origin: org.glassfish.metro/webservices-extra
/**
* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
*/
@Override
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源:origin: com.sun.mail/android-mail
/**
* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
*/
@Override
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源:origin: javax.mail/com.springsource.javax.mail
/**
* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
*/
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源:origin: jboss/jboss-javaee-specs
/**
* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
*/
@Override
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源:origin: com.sun.mail/jakarta.mail
/**
* Using the IMAP NAMESPACE command (RFC 2342), return a set
* of folders representing the User's namespaces.
*/
@Override
public Folder[] getUserNamespaces(String user)
throws MessagingException {
Namespaces ns = getNamespaces();
if (ns == null || ns.otherUsers == null)
return super.getUserNamespaces(user);
return namespaceToFolders(ns.otherUsers, user);
}
代码示例来源:origin: org.apache.geronimo.javamail/geronimo-javamail_1.4_provider
/**
* Return the root folders of the personal namespaces belonging to the supplied user.
*
* The default implementation simply returns an empty array.
*
* @param user the user whose namespaces should be returned
* @return the root folders of the given user's peronal namespaces
* @throws MessagingException if there was a problem accessing the store
*/
public Folder[] getUserNamespaces(String user) throws MessagingException {
IMAPNamespaceResponse namespaces = getNamespaces();
// if nothing is returned, then use the API-defined default for this
if (namespaces.otherUserNamespaces == null || namespaces.otherUserNamespaces.isEmpty()) {
return super.getUserNamespaces(user);
}
// convert the list into an array of Folders.
return getNamespaceFolders(namespaces.otherUserNamespaces);
}
内容来源于网络,如有侵权,请联系作者删除!