public interface ModelsService
Modifier and Type | Method and Description |
---|---|
com.fasterxml.jackson.databind.JsonNode |
createModel(com.fasterxml.jackson.databind.JsonNode input)
Create a new model, resulting in a new entity descriptor with a primary entity type in it.
|
void |
deleteModel(java.lang.String entityName)
Delete an entity model
|
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)
Returns a json containing the names of the models and steps that reference the given entity model.
|
com.fasterxml.jackson.databind.JsonNode |
getPrimaryEntityTypes()
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 |
saveModel(com.fasterxml.jackson.databind.JsonNode model)
Save a 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 |
updateModelEntityTypes(com.fasterxml.jackson.databind.JsonNode input)
Invokes the updateModelEntityTypes operation on the database server
|
com.fasterxml.jackson.databind.JsonNode |
updateModelInfo(java.lang.String name,
java.lang.String description)
Update the description 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 updateModelInfo(java.lang.String name, java.lang.String description)
name
- The name of the modeldescription
- provides inputvoid saveModel(com.fasterxml.jackson.databind.JsonNode model)
model
- provides inputcom.fasterxml.jackson.databind.JsonNode generateProtectedPathConfig(com.fasterxml.jackson.databind.JsonNode models)
models
- Array of entity modelscom.fasterxml.jackson.databind.JsonNode generateModelConfig()
com.fasterxml.jackson.databind.JsonNode getPrimaryEntityTypes()
void deleteModel(java.lang.String entityName)
entityName
- The name of the primary entity in the modelcom.fasterxml.jackson.databind.JsonNode createModel(com.fasterxml.jackson.databind.JsonNode input)
input
- provides inputvoid saveModels(com.fasterxml.jackson.databind.JsonNode models)
models
- The array of entity modelscom.fasterxml.jackson.databind.JsonNode getModelReferences(java.lang.String entityName)
entityName
- The name of the primary entity in the modelvoid updateModelEntityTypes(com.fasterxml.jackson.databind.JsonNode input)
input
- provides inputcom.fasterxml.jackson.databind.JsonNode getLatestJobData(java.lang.String entityCollection)
entityCollection
- provides input