@groovy.util.logging.Slf4j @io.micronaut.security.annotation.Secured(value: SUPERVISOR) @io.micronaut.http.annotation.Controller(value: /order) class OrderController extends org.simplemes.eframe.controller.BaseCrudRestController
Handles HTTP requests for the Order object.
Fields inherited from class | Fields |
---|---|
class org.simplemes.eframe.controller.BaseCrudRestController |
__$stMC, __$stMC, __$stMC |
Type | Name and description |
---|---|
private OrderService |
orderService Injected OrderService. |
private java.lang.Object |
taskMenuItems Defines the entry(s) in the main Task Menu. |
Constructor and description |
---|
OrderController
() |
Type Params | Return Type | Name and description |
---|---|---|
|
io.micronaut.http.HttpResponse |
archiveOld(io.micronaut.http.HttpRequest request, java.security.Principal principal) API entry for archiveOld() action. |
|
io.micronaut.http.HttpResponse |
determineQtyStates(java.lang.String id, java.security.Principal principal) API entry for determineQtyStates() action. |
|
io.micronaut.http.HttpResponse |
release(io.micronaut.http.HttpRequest request, java.security.Principal principal) API entry for release() action. |
|
io.micronaut.http.HttpResponse |
releaseUI(io.micronaut.http.HttpRequest request, java.lang.Object bodyParams, java.security.Principal principal) API entry for release() action. |
Methods inherited from class | Name |
---|---|
class org.simplemes.eframe.controller.BaseCrudRestController |
org.simplemes.eframe.controller.BaseCrudRestController#super$3$$getStaticMetaClass(), org.simplemes.eframe.controller.BaseCrudRestController#restGet(java.lang.String, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#restDelete(java.lang.String, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#restPost(io.micronaut.http.HttpRequest, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#restPut(java.lang.String, io.micronaut.http.HttpRequest, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#index(java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#list(io.micronaut.http.HttpRequest, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#delete(io.micronaut.http.HttpRequest, java.lang.Object, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#create(java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#super$2$$getStaticMetaClass(), org.simplemes.eframe.controller.BaseCrudRestController#getRootPath(), org.simplemes.eframe.controller.BaseCrudRestController#getView(java.lang.String), org.simplemes.eframe.controller.BaseCrudRestController#show(java.lang.String, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#createPost(io.micronaut.http.HttpRequest, java.lang.Object, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#edit(java.lang.String, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#editPost(io.micronaut.http.HttpRequest, java.lang.Object, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#bindEvent(java.lang.Object, java.lang.Object), org.simplemes.eframe.controller.BaseCrudRestController#getDomain(), org.simplemes.eframe.controller.BaseCrudRestController#error(io.micronaut.http.HttpRequest, java.lang.Throwable), org.simplemes.eframe.controller.BaseCrudRestController#getMetaClass(), org.simplemes.eframe.controller.BaseCrudRestController#setMetaClass(groovy.lang.MetaClass), org.simplemes.eframe.controller.BaseCrudRestController#buildErrorResponse(java.lang.String), org.simplemes.eframe.controller.BaseCrudRestController#buildOkResponse(java.lang.Object), org.simplemes.eframe.controller.BaseCrudRestController#buildOkResponse(), org.simplemes.eframe.controller.BaseCrudRestController#buildDeniedResponse(io.micronaut.http.HttpRequest, java.lang.String, java.security.Principal), org.simplemes.eframe.controller.BaseCrudRestController#parseBody(io.micronaut.http.HttpRequest, java.lang.Class), org.simplemes.eframe.controller.BaseCrudRestController#wait(long, int), org.simplemes.eframe.controller.BaseCrudRestController#wait(), org.simplemes.eframe.controller.BaseCrudRestController#wait(long), org.simplemes.eframe.controller.BaseCrudRestController#equals(java.lang.Object), org.simplemes.eframe.controller.BaseCrudRestController#toString(), org.simplemes.eframe.controller.BaseCrudRestController#hashCode(), org.simplemes.eframe.controller.BaseCrudRestController#getClass(), org.simplemes.eframe.controller.BaseCrudRestController#notify(), org.simplemes.eframe.controller.BaseCrudRestController#notifyAll(), org.simplemes.eframe.controller.BaseCrudRestController#getProperty(java.lang.String), org.simplemes.eframe.controller.BaseCrudRestController#setProperty(java.lang.String, java.lang.Object), org.simplemes.eframe.controller.BaseCrudRestController#invokeMethod(java.lang.String, java.lang.Object) |
Injected OrderService.
Defines the entry(s) in the main Task Menu.
API entry for archiveOld() action. Supports JSON in the content. Calls the OrderService.archiveOld method. Archive old, done orders based on the date that they were completed. There are options for the age (days) and the max number of orders to archive in one batch (transaction). There is also an option to limit the number batches archived at a time. This last option is used to limit the slowdown from archiving during 'catch-up' scenarios when archiving has not been run recently. Values that exceed the maximum will be ignored and the maximum will be used.
This method is called automatically once per day using the job scheduler in production/dev environments. The JSON is in the format:{ "ageDays": 100, "maxOrdersPerTxn": 50, "maxTxns": 1 }Returns the archive file references in a JSON array:
{ [ "archives/M1001.arc"}, "archives/M1002.arc"}, "archives/M1003.arc"}* ] }
API entry for determineQtyStates() action. This is passed through to the OrderService. Supports XML and JSON formats using standard framework parsing. Executes the OrderService.determineQtyStates method.
This follows the normal REST API approach, using the order/LSN id/name as the parameter on the URL:/order/determineQtyStates/M1001
. The parameter is evaluated with this precedence order:
API entry for release() action. Supports JSON format using standard framework parsing. Executes the OrderService.release method.
API entry for release() action. Supports JSON format using standard framework parsing. Executes the OrderService.release method.
Groovy Documentation