data.subject     = name;
    protected static UnderlyingData prepareCreate(byte tp, int id, Folder folder, short volumeId, String name, String creator, String type, ParsedDocument pd, Document parent, Metadata meta)     throws ServiceException {        if (folder == null || !folder.canContain(TYPE_DOCUMENT))            throw MailServiceException.CANNOT_CONTAIN();        if (!folder.canAccess(ACL.RIGHT_INSERT))            throw ServiceException.PERM_DENIED("you do not have the required rights on the folder");        validateName(name);        		Mailbox mbox = folder.getMailbox();    	MetadataList revisions = new MetadataList();    	Metadata rev = getRevisionMetadata(mbox.getOperationChangeID(), creator, pd);    	rev.put(Metadata.FN_VERSION, 1);    	revisions.add(rev);    	UnderlyingData data = new UnderlyingData();        data.id          = id;        data.type        = tp;        data.folderId    = folder.getId();        data.indexId     = id;        data.imapId      = id;        data.volumeId    = volumeId;        data.date        = mbox.getOperationTimestamp();        data.size        = pd.getSize();        data.name        = name;        data.blobDigest  = pd.getDigest();       	data.metadata    = encodeMetadata(meta, DEFAULT_COLOR, type, revisions).toString();                return data;    }