ZSoapFolder(Element e, ZFolder parent, ZSoapMailbox mailbox) throws ServiceException {
ZSoapFolder(Element e, ZSoapFolder parent, ZSoapMailbox mailbox) throws ServiceException {
    ZSoapFolder(Element e, ZFolder parent, ZSoapMailbox mailbox) throws ServiceException {        mParent = parent;        mId = e.getAttribute(MailService.A_ID);        mName = e.getAttribute(MailService.A_NAME);        mParentId = e.getAttribute(MailService.A_FOLDER);        mFlags = e.getAttribute(MailService.A_FLAGS, "");        mColor = (int) e.getAttributeLong(MailService.A_COLOR, 0);        mUnreadCount = (int) e.getAttributeLong(MailService.A_UNREAD, 0);        mMessageCount = (int) e.getAttributeLong(MailService.A_NUM, 0);        mDefaultView = e.getAttribute(MailService.A_DEFAULT_VIEW, "");        mRestURL = e.getAttribute(MailService.A_REST_URL, null);        mRemoteURL = e.getAttribute(MailService.A_URL, null);        mEffectivePerms = e.getAttribute(MailService.A_RIGHTS, null);            Element aclEl = e.getOptionalElement(MailService.E_ACL);        if (aclEl != null) {            mGrants = new ArrayList<ZGrant>();            for (Element grant : aclEl.listElements(MailService.E_GRANT)) {                mGrants.add(new ZSoapGrant(grant));            }        } else {            mGrants = sNoGrants;        }        // children                for (Element child : e.listElements(MailService.E_FOLDER)) {            if (mSubFolders == null)                 mSubFolders = new ArrayList<ZFolder>();            mSubFolders.add(new ZSoapFolder(child, this, mailbox));        }        if (mSubFolders == null) mSubFolders = sNoSubFolders;        // search        for (Element s : e.listElements(MailService.E_SEARCH)) {            if (mSearchFolders == null)                 mSearchFolders = new ArrayList<ZSearchFolder>();            mSearchFolders.add(new ZSoapSearchFolder(s, this, mailbox));        }        if (mSearchFolders == null) mSearchFolders = sNoSearchFolders;        // link        for (Element l : e.listElements(MailService.E_MOUNT)) {            if (mLinks == null)                 mLinks = new ArrayList<ZLink>();            mLinks.add(new ZSoapLink(l, this, mailbox));        }        if (mLinks == null) mLinks = sNoLinks;        mailbox.addItemIdMapping(this);    }