/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }