- override createOperationalData(String identifier, CompositeNode payload) {
- val identifierWithSchemaNode = identifier.resolveInstanceIdentifier
- val value = resolveNodeNamespaceBySchema(payload, identifierWithSchemaNode.schemaNode)
- val status = broker.commitOperationalDataPut(identifierWithSchemaNode.instanceIdentifier,value).get();
- switch status.result {
- case TransactionStatus.COMMITED: Response.status(Response.Status.OK).build
- default: Response.status(Response.Status.INTERNAL_SERVER_ERROR).build
- }
- }
-
- override updateOperationalData(String identifier, CompositeNode payload) {
- val identifierWithSchemaNode = identifier.resolveInstanceIdentifier
- val value = resolveNodeNamespaceBySchema(payload, identifierWithSchemaNode.schemaNode)
- val status = broker.commitOperationalDataPut(identifierWithSchemaNode.instanceIdentifier,value).get();
- switch status.result {
- case TransactionStatus.COMMITED: Response.status(Response.Status.NO_CONTENT).build
- default: Response.status(Response.Status.INTERNAL_SERVER_ERROR).build
- }
- }
-