data.subject     = name;
    static Mountpoint create(int id, Folder parent, String name, String ownerId, int remoteId, byte view, int flags, byte color)    throws ServiceException {        if (parent == null || ownerId == null || ownerId.length() != 36 || remoteId <= 0)            throw ServiceException.INVALID_REQUEST("invalid parameters when creating mountpoint", null);        if (!parent.canAccess(ACL.RIGHT_INSERT))            throw ServiceException.PERM_DENIED("you do not have sufficient permissions on the parent folder");        if (parent == null || !parent.canContain(TYPE_MOUNTPOINT))            throw MailServiceException.CANNOT_CONTAIN();        validateFolderName(name);        if (view != TYPE_UNKNOWN)            validateType(view);        if (parent.findSubfolder(name) != null)            throw MailServiceException.ALREADY_EXISTS(name);        Mailbox mbox = parent.getMailbox();        UnderlyingData data = new UnderlyingData();        data.id          = id;        data.type        = TYPE_MOUNTPOINT;        data.folderId    = parent.getId();        data.parentId    = data.folderId;        data.date        = mbox.getOperationTimestamp();        data.flags       = flags & Flag.FLAGS_FOLDER;        data.name        = name;        data.metadata    = encodeMetadata(color, view, ownerId, remoteId);        data.modMetadata = mbox.getOperationChangeID();        data.modContent  = mbox.getOperationChangeID();        DbMailItem.create(mbox, data);        Mountpoint mpt = new Mountpoint(mbox, data);        mpt.finishCreation(parent);        return mpt;    }