Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for metadata #413

Closed
sammefford opened this issue May 11, 2016 · 1 comment
Closed

Add support for metadata #413

sammefford opened this issue May 11, 2016 · 1 comment

Comments

@sammefford
Copy link
Contributor

We need to support the new name-value string pairs called metadata just like we already support document properties, quality, permissions, and collections

@sammefford sammefford self-assigned this May 11, 2016
@sammefford sammefford added this to the java-client-api-4.0-ea3 milestone May 11, 2016
vivekmuniyandi added a commit that referenced this issue Jun 22, 2016
… support (read, write and patch) for 'metadata-values'
@vivekmuniyandi vivekmuniyandi added test and removed fix labels Jun 22, 2016
@vivekmuniyandi
Copy link
Contributor

vivekmuniyandi commented Jun 23, 2016

DocumentMetadataHandle {
    DocumentMetadataHandle.DocumentMetadataValues getMetadataValues()
    setMetadataValues(DocumentMetadataHandle.DocumentMetadataValues map)
    withMetadataValue(String name, String value)
}

DocumentMetadataHandle.DocumentMetadataValues extends Map<String,String> {
    put(String name, String value)
    // all the other Map methods
}

DocumentMetadataPatchBuilder {
    addMetadataValue(String name, String value)
    deleteMetadataValue(String name)
    replaceMetadataValueApply(String name, DocumentMetadataPatchBuilder.Call call)
    replaceMetadataValue(String name, String newValue)
}

The public methods to test are

DocumentManager.readMetadata  // 2 overloads
DocumentManager.read          // 8 overloads
DocumentManager.readAs        // 2 overloads
BinaryDocumentManager.readAs
BinaryDocumentManager.read    // 8 overloads
DocumentRecord.getMetadata
DocumentWriteOperation.getMetadata
DocumentWriteSet.add          // 2 overloads
DocumentWriteSet.addDefault
DocumentManager.create        // 4 overloads
DocumentManager.createAs      // 2 overloads
DocumentManager.write         // 8 overloads
DocumentManager.writeAs       // 2 overloads
DocumentManager.writeMetadata // 2 overloads
TemporalDocumentManager.write // 6 overloads

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants