public interface ModelsService
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
createDraftModel(com.fasterxml.jackson.databind.JsonNode input)
Create a new draft model, resulting in a new entity descriptor with a primary entity type in it.
|
void |
deleteDraftModel(java.lang.String entityName)
Mark a draft entity model to be deleted
|
com.fasterxml.jackson.databind.JsonNode |
generateDatabaseProperties(com.fasterxml.jackson.databind.JsonNode models)
Returns a JSON object containing database properties based on entity models
|
com.fasterxml.jackson.databind.JsonNode |
generateModelConfig()
Invokes the generateModelConfig operation on the database server
|
com.fasterxml.jackson.databind.JsonNode |
generateProtectedPathConfig(com.fasterxml.jackson.databind.JsonNode models)
Generate a CMA config object with protected paths and query rolesets based on the 'pii' arrays in the given entity models
|
com.fasterxml.jackson.databind.JsonNode |
getLatestJobData(java.lang.String entityCollection)
Invokes the getLatestJobData operation on the database server
|
com.fasterxml.jackson.databind.JsonNode |
getModelReferences(java.lang.String entityName,
java.lang.String propertyName)
Returns a json containing the names of the models and steps that reference the given entity model.
|
com.fasterxml.jackson.databind.JsonNode |
getPrimaryEntityTypes(java.lang.Boolean includeDrafts)
Returns an array of primary entity types.
|
static ModelsService |
on(com.marklogic.client.DatabaseClient db)
Creates a ModelsService object for executing operations on the database server.
|
static ModelsService |
on(com.marklogic.client.DatabaseClient db,
com.marklogic.client.io.marker.JSONWriteHandle serviceDeclaration)
Creates a ModelsService object for executing operations on the database server.
|
void |
publishDraftModels()
Moves draft entity models to the published collection and clear out the draft collection
|
void |
saveDraftModel(com.fasterxml.jackson.databind.JsonNode model)
Save a draft model, where the input is a JSON model
|
void |
saveModels(com.fasterxml.jackson.databind.JsonNode models)
Save an array of entity models to only the database associated with the app server that receives this request
|
void |
updateDraftModelEntityTypes(com.fasterxml.jackson.databind.JsonNode input)
Update entity model types in the entity models draft collection.
|
com.fasterxml.jackson.databind.JsonNode |
updateDraftModelInfo(java.lang.String name,
com.fasterxml.jackson.databind.JsonNode input)
Update the description and optionally the namespace and namespace prefix of an existing model.
|
static ModelsService on(com.marklogic.client.DatabaseClient db)
db
- provides a client for communicating with the database serverstatic ModelsService on(com.marklogic.client.DatabaseClient db, com.marklogic.client.io.marker.JSONWriteHandle serviceDeclaration)
db
- provides a client for communicating with the database serverserviceDeclaration
- substitutes a custom implementation of the servicecom.fasterxml.jackson.databind.JsonNode generateDatabaseProperties(com.fasterxml.jackson.databind.JsonNode models)
models
- Array of entity modelsvoid saveDraftModel(com.fasterxml.jackson.databind.JsonNode model)
model
- provides inputvoid deleteDraftModel(java.lang.String entityName)
entityName
- The name of the primary entity in the modelcom.fasterxml.jackson.databind.JsonNode createDraftModel(com.fasterxml.jackson.databind.JsonNode input)
input
- provides inputcom.fasterxml.jackson.databind.JsonNode generateProtectedPathConfig(com.fasterxml.jackson.databind.JsonNode models)
models
- Array of entity modelscom.fasterxml.jackson.databind.JsonNode updateDraftModelInfo(java.lang.String name, com.fasterxml.jackson.databind.JsonNode input)
name
- The name of the modelinput
- provides inputcom.fasterxml.jackson.databind.JsonNode generateModelConfig()
com.fasterxml.jackson.databind.JsonNode getPrimaryEntityTypes(java.lang.Boolean includeDrafts)
includeDrafts
- Determines if draft models should be included. Default: falsevoid saveModels(com.fasterxml.jackson.databind.JsonNode models)
models
- The array of entity modelscom.fasterxml.jackson.databind.JsonNode getModelReferences(java.lang.String entityName, java.lang.String propertyName)
entityName
- The name of the primary entity in the modelpropertyName
- The property in the primary entity in the modelvoid publishDraftModels()
com.fasterxml.jackson.databind.JsonNode getLatestJobData(java.lang.String entityCollection)
entityCollection
- provides inputvoid updateDraftModelEntityTypes(com.fasterxml.jackson.databind.JsonNode input)
input
- provides input