*/
public MailFolder createMailbox(GreenMailUser user, String mailboxName)
throws AuthorizationException, FolderException {
String qualifiedName = getQualifiedMailboxName(user, mailboxName);
if (store.getMailbox(qualifiedName) != null) {
throw new FolderException("Mailbox already exists.");
}
StringTokenizer tokens = new StringTokenizer(qualifiedName,
HIERARCHY_DELIMITER);
if (tokens.countTokens() < 2) {
throw new FolderException("Cannot create store at namespace level.");
}
String namespaceRoot = tokens.nextToken();
MailFolder folder = store.getMailbox(namespaceRoot);
if (folder == null) {
throw new FolderException("Invalid namespace.");
}
while (tokens.hasMoreTokens()) {
// Get the next name from the list, and find the child
String childName = tokens.nextToken();