mLinks = new ArrayList<ZMountpoint>();
    ZSoapFolder(Element e, ZSoapFolder 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, null);        try {            mColor = ZFolder.Color.fromString(e.getAttribute(MailService.A_COLOR, "0"));        } catch (ServiceException se) {            mColor = ZFolder.Color.orange;        }        mUnreadCount = (int) e.getAttributeLong(MailService.A_UNREAD, 0);        mMessageCount = (int) e.getAttributeLong(MailService.A_NUM, 0);        mDefaultView = View.fromString(e.getAttribute(MailService.A_DEFAULT_VIEW, View.conversation.name()));        mRestURL = e.getAttribute(MailService.A_REST_URL, null);        mRemoteURL = e.getAttribute(MailService.A_URL, null);        mEffectivePerms = e.getAttribute(MailService.A_RIGHTS, null);                mGrants = new ArrayList<ZGrant>();                    mSubFolders = new ArrayList<ZFolder>();        mLinks = new ArrayList<ZMountpoint>();                Element aclEl = e.getOptionalElement(MailService.E_ACL);        if (aclEl != null) {            for (Element grant : aclEl.listElements(MailService.E_GRANT)) {                mGrants.add(new ZSoapGrant(grant));            }        }        // sub folders        for (Element child : e.listElements(MailService.E_FOLDER))            new ZSoapFolder(child, this, mailbox);                // search        for (Element s : e.listElements(MailService.E_SEARCH))            new ZSoapSearchFolder(s, this, mailbox);                // link        for (Element l : e.listElements(MailService.E_MOUNT))            new ZSoapMountpoint(l, this, mailbox);        mailbox.addItemIdMapping(this);        if (parent != null) parent.addChild(this);    }