@grails.gorm.transactions.Transactional @groovy.util.logging.Slf4j @groovy.transform.CompileStatic class DomainDataController extends grails.rest.RestfulController
Domain data controller
Fields inherited from class | Fields |
---|---|
class grails.rest.RestfulController |
__$stMC, $0x0002grails_artefact_Controller__mimeTypesSupport, $ins$1grails_artefact_Controller__mimeTypesSupport, $0x0002grails_web_api_ServletAttributes__servletContext, $ins$1grails_web_api_ServletAttributes__servletContext, $0x0002grails_web_api_ServletAttributes__applicationContext, $ins$1grails_web_api_ServletAttributes__applicationContext, $0x0002grails_web_api_WebAttributes__grailsApplication, $ins$1grails_web_api_WebAttributes__grailsApplication, $0x0002grails_artefact_controller_support_RequestForwarder__urlConverter, $ins$1grails_artefact_controller_support_RequestForwarder__urlConverter, $0x0002grails_artefact_controller_support_RequestForwarder__linkGenerator, $ins$1grails_artefact_controller_support_RequestForwarder__linkGenerator, $0x0002grails_artefact_controller_support_ResponseRedirector__linkGenerator, $ins$1grails_artefact_controller_support_ResponseRedirector__linkGenerator, $0x0002grails_artefact_controller_support_ResponseRedirector__useJsessionId, $ins$1grails_artefact_controller_support_ResponseRedirector__useJsessionId, $0x0002grails_artefact_controller_support_ResponseRedirector__requestDataValueProcessor, $ins$1grails_artefact_controller_support_ResponseRedirector__requestDataValueProcessor, $0x0002grails_artefact_controller_support_ResponseRedirector__redirectListeners, $ins$1grails_artefact_controller_support_ResponseRedirector__redirectListeners, $0x0002grails_artefact_controller_support_ResponseRenderer__actionResultTransformers, $ins$1grails_artefact_controller_support_ResponseRenderer__actionResultTransformers, $0x0002grails_artefact_controller_support_ResponseRenderer__mimeUtility, $ins$1grails_artefact_controller_support_ResponseRenderer__mimeUtility, $0x0002grails_artefact_controller_support_ResponseRenderer__groovyPageLayoutFinder, $ins$1grails_artefact_controller_support_ResponseRenderer__groovyPageLayoutFinder, $0x0002grails_artefact_controller_support_ResponseRenderer__pluginManager, $ins$1grails_artefact_controller_support_ResponseRenderer__pluginManager |
Type | Name and description |
---|---|
CustomiseEngineService |
customiseEngineService |
DomainClassService |
domainClassService |
DomainDataService |
domainDataService |
DynamicFieldService |
dynamicFieldService |
grails.core.GrailsApplication |
grailsApplication |
static java.lang.Object |
responseFormats |
static java.lang.Object |
scope scope of this controller(injected spring bean) Due to the design of this controller, multiple domain class share one controller, so scope have to be prototype for this domain to working |
grails.plugin.springsecurity.SpringSecurityService |
springSecurityService |
org.springframework.transaction.TransactionStatus |
transactionStatus |
UserService |
userService |
Constructor and description |
---|
DomainDataController
() |
Type Params | Return Type | Name and description |
---|---|---|
|
java.lang.Object |
delete(java.lang.String domainName, java.lang.Long id) |
|
java.lang.Object |
index(java.lang.String domainName, java.lang.Integer max, java.lang.Integer offset) |
|
java.lang.Object |
save(java.lang.String domainName) 创建一个领域模型对象,支持同步保存动态字段 |
|
java.lang.Object |
show(java.lang.String domainName, java.lang.Long id, java.lang.String fetchType) Shows a single resource |
|
java.lang.Object |
showMultiple(java.lang.String domainName, java.lang.String ids) Return multiple resource by ids, if any object not found, it will be skipped Use render method to render each object if there's a render method defined on the domain |
|
java.lang.Object |
update(java.lang.String domainName, java.lang.Long id) 更新领域对象,支持同步保存动态字段 |
Methods inherited from class | Name |
---|---|
class grails.rest.RestfulController |
grails.rest.RestfulController#getResource(), grails.rest.RestfulController#grails_artefact_controller_support_RequestForwarder__urlConverter$set(grails.web.UrlConverter), grails.rest.RestfulController#getControllerClass(), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getControllerClass(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$setRedirectListeners(java.util.Collection), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__linkGenerator$get(), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getGrailsApplication(), grails.rest.RestfulController#getTemplateUri(java.lang.String), grails.rest.RestfulController#setTransactionManager(org.springframework.transaction.PlatformTransactionManager), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getWebRequest(), grails.rest.RestfulController#patch(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$withFormat(groovy.lang.Closure), grails.rest.RestfulController#grails_artefact_controller_support_RequestForwarder__urlConverter$get(), grails.rest.RestfulController#grails_web_databinding_DataBindertrait$super$bindData(java.lang.Object, java.lang.Object, java.util.Map, java.lang.String), grails.rest.RestfulController#grails_web_databinding_DataBindertrait$super$bindData(java.lang.Object, java.lang.Object, java.util.List), grails.rest.RestfulController#grails_web_databinding_DataBindertrait$super$bindData(java.lang.Object, java.lang.Object), grails.rest.RestfulController#grails_web_databinding_DataBindertrait$super$bindData(java.lang.Object, java.lang.Object, java.util.Map), grails.rest.RestfulController#grails_web_databinding_DataBindertrait$super$bindData(java.lang.Object, java.lang.Object, java.util.List, java.lang.String), grails.rest.RestfulController#grails_web_databinding_DataBindertrait$super$bindData(java.lang.Object, java.lang.Object, java.lang.String), grails.rest.RestfulController#grails_web_databinding_DataBindertrait$super$bindData(java.lang.Class, java.util.Collection, grails.databinding.CollectionDataBindingSource), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__linkGenerator$set(grails.web.mapping.LinkGenerator), grails.rest.RestfulController#getExceptionHandlerMethodFor(java.lang.Class), grails.rest.RestfulController#setRedirectListeners(java.util.Collection), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__mimeUtility$set(grails.web.mime.MimeUtility), grails.rest.RestfulController#edit(), grails.rest.RestfulController#grails_web_api_WebAttributes__grailsApplication$get(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$redirect(java.util.Map), grails.rest.RestfulController#getResponse(), grails.rest.RestfulController#grails_web_api_WebAttributes__grailsApplication$set(grails.core.GrailsApplication), grails.rest.RestfulController#initializeCommandObject(java.lang.Class, java.lang.String), grails.rest.RestfulController#index(java.lang.Integer), grails.rest.RestfulController#index(), grails.rest.RestfulController#getResourceName(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__groovyPageLayoutFinder$set(org.grails.web.sitemesh.GroovyPageLayoutFinder), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__redirectListeners$get(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__groovyPageLayoutFinder$get(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$setModelAndView(org.springframework.web.servlet.ModelAndView), grails.rest.RestfulController#grails_artefact_Controllertrait$super$header(java.lang.String, java.lang.Object), grails.rest.RestfulController#getTransactionManager(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$getTemplateUri(java.lang.String), grails.rest.RestfulController#getGrailsAttributes(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$setUseJsessionId(boolean), grails.rest.RestfulController#setProperty(java.lang.String, java.lang.Object), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__redirectListeners$set(java.util.Collection), grails.rest.RestfulController#setReadOnly(boolean), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$setGrailsLinkGenerator(grails.web.mapping.LinkGenerator), grails.rest.RestfulController#wait(), grails.rest.RestfulController#wait(long), grails.rest.RestfulController#wait(long, int), grails.rest.RestfulController#getRequest(), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getControllerNamespace(), grails.rest.RestfulController#setMetaClass(groovy.lang.MetaClass), grails.rest.RestfulController#save(), grails.rest.RestfulController#getActionName(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__useJsessionId$get(), grails.rest.RestfulController#setErrors(org.springframework.validation.Errors), grails.rest.RestfulController#grails_artefact_Controllertrait$super$getExceptionHandlerMethodFor(java.lang.Class), grails.rest.RestfulController#withForm(groovy.lang.Closure), grails.rest.RestfulController#withForm(org.grails.web.servlet.mvc.GrailsWebRequest, groovy.lang.Closure), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getFlash(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__actionResultTransformers$set(java.util.Collection), grails.rest.RestfulController#notify(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__actionResultTransformers$get(), grails.rest.RestfulController#getApplicationContext(), grails.rest.RestfulController#isReadOnly(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__mimeUtility$get(), grails.rest.RestfulController#getFlash(), grails.rest.RestfulController#setUseJsessionId(boolean), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$setActionResultTransformers([Lorg.grails.web.servlet.mvc.ActionResultTransformer;), grails.rest.RestfulController#getControllerName(), grails.rest.RestfulController#grails_web_api_ServletAttributestrait$super$getServletContext(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$withForm(groovy.lang.Closure), grails.rest.RestfulController#grails_artefact_Controllertrait$super$withForm(org.grails.web.servlet.mvc.GrailsWebRequest, groovy.lang.Closure), grails.rest.RestfulController#grails_web_api_ServletAttributestrait$super$getRequest(), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getGrailsAttributes(), grails.rest.RestfulController#redirect(java.util.Map), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getControllerName(), grails.rest.RestfulController#getPluginContextPath(), grails.rest.RestfulController#redirect(java.lang.Object), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$render(java.util.Map, groovy.lang.Writable), grails.rest.RestfulController#grails_artefact_controller_support_RequestForwarder__linkGenerator$get(), grails.rest.RestfulController#chain(java.util.Map), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$render(groovy.lang.Closure), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$render(java.lang.CharSequence), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$render(java.util.Map, java.lang.CharSequence), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$render(java.lang.Object), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$render(java.util.Map), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$render(java.util.Map, groovy.lang.Closure), grails.rest.RestfulController#hasErrors(), grails.rest.RestfulController#grails_web_api_ServletAttributestrait$super$getSession(), grails.rest.RestfulController#grails_artefact_Controller__mimeTypesSupport$set(org.grails.plugins.web.api.MimeTypesApiSupport), grails.rest.RestfulController#forward(java.util.Map), grails.rest.RestfulController#grails_web_api_ServletAttributestrait$super$getApplicationContext(), grails.rest.RestfulController#getModelAndView(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$setErrors(org.springframework.validation.Errors), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$redirect(java.util.Map), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$redirect(java.lang.Object), grails.rest.RestfulController#getControllerNamespace(), grails.rest.RestfulController#grails_artefact_controller_support_RequestForwarder__linkGenerator$set(grails.web.mapping.LinkGenerator), grails.rest.RestfulController#grails_artefact_Controller__mimeTypesSupport$get(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$getModelAndView(), grails.rest.RestfulController#setResourceName(java.lang.String), grails.rest.RestfulController#equals(java.lang.Object), grails.rest.RestfulController#setActionResultTransformers([Lorg.grails.web.servlet.mvc.ActionResultTransformer;), grails.rest.RestfulController#toString(), grails.rest.RestfulController#getSession(), grails.rest.RestfulController#bindData(java.lang.Class, java.util.Collection, javax.servlet.ServletRequest), grails.rest.RestfulController#bindData(java.lang.Object, java.lang.Object, java.util.Map, java.lang.String), grails.rest.RestfulController#bindData(java.lang.Object, java.lang.Object, java.util.List), grails.rest.RestfulController#bindData(java.lang.Object, java.lang.Object), grails.rest.RestfulController#bindData(java.lang.Object, java.lang.Object, java.util.Map), grails.rest.RestfulController#bindData(java.lang.Object, java.lang.Object, java.util.List, java.lang.String), grails.rest.RestfulController#bindData(java.lang.Object, java.lang.Object, java.lang.String), grails.rest.RestfulController#bindData(java.lang.Class, java.util.Collection, grails.databinding.CollectionDataBindingSource), grails.rest.RestfulController#getClass(), grails.rest.RestfulController#getChainModel(), grails.rest.RestfulController#getStaticApplicationContext(), grails.rest.RestfulController#setResourceClassName(java.lang.String), grails.rest.RestfulController#getErrors(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$bindData(java.lang.Class, java.util.Collection, javax.servlet.ServletRequest), grails.rest.RestfulController#getWebRequest(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$getChainModel(), grails.rest.RestfulController#getControllerUri(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$initializeCommandObject(java.lang.Class, java.lang.String), grails.rest.RestfulController#getGrailsLinkGenerator(), grails.rest.RestfulController#create(), grails.rest.RestfulController#isUseJsessionId(), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$currentRequestAttributes(), grails.rest.RestfulController#getResourceClassName(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$getViewUri(java.lang.String), grails.rest.RestfulController#getGrailsApplication(), grails.rest.RestfulController#getMetaClass(), grails.rest.RestfulController#getActionUri(), grails.rest.RestfulController#setGrailsLinkGenerator(grails.web.mapping.LinkGenerator), grails.rest.RestfulController#grails_web_api_ServletAttributes__servletContext$set(javax.servlet.ServletContext), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$setRequestDataValueProcessor(org.springframework.web.servlet.support.RequestDataValueProcessor), grails.rest.RestfulController#currentRequestAttributes(), grails.rest.RestfulController#getAllowedMethods(), grails.rest.RestfulController#setUrlConverter(grails.web.UrlConverter), grails.rest.RestfulController#grails_web_api_ServletAttributes__servletContext$get(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__requestDataValueProcessor$get(), grails.rest.RestfulController#setResource(java.lang.Class), grails.rest.RestfulController#grails_artefact_Controllertrait$super$hasErrors(), grails.rest.RestfulController#getViewUri(java.lang.String), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$getGrailsLinkGenerator(), grails.rest.RestfulController#grails_web_api_ServletAttributestrait$super$getResponse(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__useJsessionId$set(boolean), grails.rest.RestfulController#grails_web_api_ServletAttributes__applicationContext$set(org.springframework.context.ApplicationContext), grails.rest.RestfulController#header(java.lang.String, java.lang.Object), grails.rest.RestfulController#grails_artefact_controller_support_RequestForwardertrait$super$setUrlConverter(grails.web.UrlConverter), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirector__requestDataValueProcessor$set(org.springframework.web.servlet.support.RequestDataValueProcessor), grails.rest.RestfulController#invokeMethod(java.lang.String, java.lang.Object), grails.rest.RestfulController#setModelAndView(org.springframework.web.servlet.ModelAndView), grails.rest.RestfulController#getParams(), grails.rest.RestfulController#setTargetDatastore([Lorg.grails.datastore.mapping.core.Datastore;), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getParams(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$isUseJsessionId(), grails.rest.RestfulController#getServletContext(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$setGroovyPageLayoutFinder(org.grails.web.sitemesh.GroovyPageLayoutFinder), grails.rest.RestfulController#setMimeUtility(grails.web.mime.MimeUtility), grails.rest.RestfulController#org_grails_compiler_web_converters_RenderConverterTraittrait$super$render(org.grails.web.converters.Converter), grails.rest.RestfulController#notifyAll(), grails.rest.RestfulController#show(), grails.rest.RestfulController#update(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$getActionUri(), grails.rest.RestfulController#grails_web_api_ServletAttributes__applicationContext$get(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$getErrors(), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getPluginContextPath(), grails.rest.RestfulController#delete(), grails.rest.RestfulController#setRequestDataValueProcessor(org.springframework.web.servlet.support.RequestDataValueProcessor), grails.rest.RestfulController#setAllowedMethods(java.lang.Object), grails.rest.RestfulController#hashCode(), grails.rest.RestfulController#withFormat(groovy.lang.Closure), grails.rest.RestfulController#render(org.grails.web.converters.Converter), grails.rest.RestfulController#render(java.util.Map, groovy.lang.Writable), grails.rest.RestfulController#render(groovy.lang.Closure), grails.rest.RestfulController#render(java.lang.CharSequence), grails.rest.RestfulController#render(java.util.Map, java.lang.CharSequence), grails.rest.RestfulController#render(java.lang.Object), grails.rest.RestfulController#render(java.util.Map), grails.rest.RestfulController#render(java.util.Map, groovy.lang.Closure), grails.rest.RestfulController#getProperty(java.lang.String), grails.rest.RestfulController#setGroovyPageLayoutFinder(org.grails.web.sitemesh.GroovyPageLayoutFinder), grails.rest.RestfulController#grails_artefact_controller_support_RequestForwardertrait$super$forward(java.util.Map), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRedirectortrait$super$chain(java.util.Map), grails.rest.RestfulController#grails_web_api_WebAttributestrait$super$getActionName(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderertrait$super$setMimeUtility(grails.web.mime.MimeUtility), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__pluginManager$get(), grails.rest.RestfulController#grails_artefact_Controllertrait$super$getControllerUri(), grails.rest.RestfulController#getReadOnly(), grails.rest.RestfulController#grails_artefact_controller_support_ResponseRenderer__pluginManager$set(grails.plugins.GrailsPluginManager) |
scope of this controller(injected spring bean) Due to the design of this controller, multiple domain class share one controller, so scope have to be prototype for this domain to working
创建一个领域模型对象,支持同步保存动态字段
domainName
- 要校验的领域模型类的名称,可以是带 package 或者不带 package 的class名称,
如果是带 package的,那么package的不同层级之间使用 _ 连接requestBody
- 让 POST 请求在Swagger的界面上,显示一个 POST数据输入的 TextArea 控件用的,
具体值永远为空, 实际的请求 body 是使用 request.getJSON() 获取的Shows a single resource
id
- The id of the resourceReturn multiple resource by ids, if any object not found, it will be skipped Use render method to render each object if there's a render method defined on the domain
id
- The id of the resource, in format of "id1,id2,id3"更新领域对象,支持同步保存动态字段
domainName
- 要校验的领域模型类的名称,可以是带 package 或者不带 package 的class名称,
如果是带 package的,那么package的不同层级之间使用 _ 连接Groovy Documentation