- Source:
The modelManager
factory is a service controlling schema and model content.
Methods
(private, inner) applyDefault(modelName, model) → {Object}
- Source:
Apply default configuration to a model
Parameters:
Name | Type | Description |
---|---|---|
modelName |
String | the model/form name to apply default on |
model |
Object | the model |
Returns:
updated model
- Type
- Object
(private, inner) deleteColumns(entry) → {Object}
- Source:
Delete colunms for a particular layer
Parameters:
Name | Type | Description |
---|---|---|
entry |
Object | model (layer) to clean |
Returns:
entry the clean entry with removed columns
- Type
- Object
(inner) getSchema(modelName, newModel) → {Object}
- Source:
Get a model
Parameters:
Name | Type | Description |
---|---|---|
modelName |
String | the model/form name to get model for |
newModel |
String | optional: true if it is a new model so we apply default |
Returns:
the model
- Type
- Object
(inner) getSchema(modelName) → {String}
- Source:
Get the schema for a model/form
Parameters:
Name | Type | Description |
---|---|---|
modelName |
String | the model/form name to get schema for |
Returns:
the schema
- Type
- String
(inner) modifyPropNames(model, mode)
- Source:
modify properties name entitled 'value' 'value' has specific meaning for Angular Schema Form
Parameters:
Name | Type | Description |
---|---|---|
model |
Object | model |
mode |
String | mode 'LOAD'|'SAVE' |
(inner) save(preview) → {String}
- Source:
Return the schema as a string to be save
Parameters:
Name | Type | Description |
---|---|---|
preview |
Boolean | [optional = false] if save is for preview |
Returns:
the schema as a string to be save
- Type
- String
(inner) setDefault(defaultValues)
- Source:
Set default configuration values to apply on new model
Parameters:
Name | Type | Description |
---|---|---|
defaultValues |
Object | the default values in JSON |
(inner) setModels(models)
- Source:
Set all the models when user load an existing config file
Parameters:
Name | Type | Description |
---|---|---|
models |
Object | all the models loaded from the configuration file in JSON |
(inner) setSchema(modelName, schema, lang)
- Source:
Set initial schema
Parameters:
Name | Type | Description |
---|---|---|
modelName |
String | the model/form name to set schema for |
schema |
Object | the schema JSON object |
lang |
String | the language to set |
(inner) updateModel(scope, modelName)
- Source:
Update model after avLoadModel events
Parameters:
Name | Type | Description |
---|---|---|
scope |
Object | controller scope |
modelName |
String | the model/form name to update model |