@Controller(value="blAdminBasicEntityController")
@RequestMapping(value="/{sectionKey:.+}")
public class AdminBasicEntityController
extends AdminAbstractController
#BroadleafAdminAbstractEntityController. This delegates every call to
super and does not provide any custom-tailored functionality. It is responsible for rendering the admin for every
entity that is not explicitly customized by its own controller.adminNavigationService, adminRemoteSecurityService, entityConfiguration, entityFormValidator, formService, service| Constructor and Description |
|---|
AdminBasicEntityController() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
addCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Adds the requested collection item
|
java.lang.String |
addEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Processes the request to add a new entity.
|
protected java.lang.String |
buildAddCollectionItemModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.lang.String id,
java.lang.String collectionField,
java.lang.String sectionKey,
Property collectionProperty,
FieldMetadata md,
PersistencePackageRequest ppr,
EntityForm entityForm,
Entity entity)
Builds out all of the model information needed for showing the add modal for collection items on both the initial GET
as well as after a POST with validation errors
|
java.lang.String |
getCollectionFieldRecords(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
Returns the records for a given collectionField filtered by a particular criteria
|
void |
initBinder(org.springframework.web.bind.WebDataBinder binder)
Invoked on every request to provide the ability to register specific binders for Spring's binding process.
|
java.lang.String |
removeCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId)
Removes the requested collection item
Note that the request must contain a parameter called "key" when attempting to remove a collection item from a
map collection.
|
java.lang.String |
removeEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Attempts to remove the given entity.
|
java.lang.String |
saveEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
EntityForm entityForm,
org.springframework.validation.BindingResult result,
org.springframework.web.servlet.mvc.support.RedirectAttributes ra)
Attempts to save the given entity.
|
java.lang.String |
showAddCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
Shows the modal dialog that is used to add an item to a given collection.
|
java.lang.String |
showSelectCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String owningClass,
java.lang.String collectionField,
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
Shows the modal dialog that is used to select a "to-one" collection item.
|
java.lang.String |
showUpdateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId)
Shows the appropriate modal dialog to edit the selected collection item
|
java.lang.String |
showViewCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId)
Shows the appropriate modal dialog to view the selected collection item.
|
protected java.lang.String |
showViewUpdateCollection(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId,
java.lang.String modalHeaderType) |
protected java.lang.String |
showViewUpdateCollection(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId,
java.lang.String modalHeaderType,
EntityForm entityForm,
Entity entity)
Shows the view and populates the model for updating a collection item.
|
java.lang.String |
updateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId,
EntityForm entityForm,
org.springframework.validation.BindingResult result)
Updates the specified collection item
|
java.util.Map<java.lang.String,java.lang.Object> |
updateCollectionItemSequence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId,
java.lang.String newSequence)
Updates the given colleciton item's sequence.
|
java.lang.String |
viewAddEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String entityType)
Renders the modal form that is used to add a new parent level entity.
|
java.lang.String |
viewCollectionItemDetails(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String collectionField,
java.lang.String id)
Shows the modal popup for the current selected "to-one" field.
|
java.lang.String |
viewEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id)
Renders the main entity form for the specified entity
|
java.lang.String |
viewEntityList(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
Renders the main entity listing for the specified class, which is based on the current sectionKey with some optional
criteria.
|
attachSectionSpecificInfo, getAddEntityTypes, getBlankDynamicFieldTemplateForm, getClassNameForSection, getCollectionListGrid, getCriteria, getDefaultEntityType, getDynamicFieldTemplateForm, getDynamicForm, getMaxIndex, getSectionCustomCriteria, getSectionKey, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, setModelAttributesgetContextPath, isAjaxRequest@RequestMapping(value="",
method=GET)
public java.lang.String viewEntityList(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@RequestParam
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
throws java.lang.Exception
request - response - model - pathVars - criteria - a Map of property name -> list critiera valuesjava.lang.Exception@RequestMapping(value="/add",
method=GET)
public java.lang.String viewAddEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@RequestParam(defaultValue="")
java.lang.String entityType)
throws java.lang.Exception
request - response - model - pathVars - entityType - java.lang.Exception@RequestMapping(value="/add",
method=POST)
public java.lang.String addEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@ModelAttribute(value="entityForm")
EntityForm entityForm,
org.springframework.validation.BindingResult result)
throws java.lang.Exception
request - response - model - pathVars - entityForm - result - java.lang.Exception@RequestMapping(value="/{id}",
method=GET)
public java.lang.String viewEntityForm(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id)
throws java.lang.Exception
request - response - model - pathVars - id - modal - - whether or not to show the entity in a read-only modaljava.lang.Exception@RequestMapping(value="/{id}",
method=POST)
public java.lang.String saveEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@ModelAttribute(value="entityForm")
EntityForm entityForm,
org.springframework.validation.BindingResult result,
org.springframework.web.servlet.mvc.support.RedirectAttributes ra)
throws java.lang.Exception
request - response - model - pathVars - id - entityForm - result - java.lang.Exception@RequestMapping(value="/{id}/delete",
method=POST)
public java.lang.String removeEntity(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@ModelAttribute(value="entityForm")
EntityForm entityForm,
org.springframework.validation.BindingResult result)
throws java.lang.Exception
request - response - model - pathVars - id - java.lang.Exception@RequestMapping(value="/{owningClass:.*}/{collectionField:.*}/select",
method=GET)
public java.lang.String showSelectCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="owningClass")
java.lang.String owningClass,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@RequestParam
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
throws java.lang.Exception
request - response - model - pathVars - owningClass - collectionField - java.lang.Exception@RequestMapping(value="/{collectionField:.*}/{id}/view",
method=GET)
public java.lang.String viewCollectionItemDetails(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@PathVariable(value="id")
java.lang.String id)
throws java.lang.Exception
request - response - model - pathVars - collectionField - id - java.lang.Exception@RequestMapping(value="/{id}/{collectionField:.*}",
method=GET)
public java.lang.String getCollectionFieldRecords(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@RequestParam
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
throws java.lang.Exception
request - response - model - pathVars - collectionField - criteriaForm - java.lang.Exception@RequestMapping(value="/{id}/{collectionField:.*}/add",
method=GET)
public java.lang.String showAddCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@RequestParam
org.springframework.util.MultiValueMap<java.lang.String,java.lang.String> requestParams)
throws java.lang.Exception
request - response - model - sectionKey - id - collectionField - requestParams - java.lang.Exception@RequestMapping(value="/{id}/{collectionField:.*}/add",
method=POST)
public java.lang.String addCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@ModelAttribute(value="entityForm")
EntityForm entityForm,
org.springframework.validation.BindingResult result)
throws java.lang.Exception
request - response - model - pathVars - id - collectionField - entityForm - java.lang.Exceptionprotected java.lang.String buildAddCollectionItemModel(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
java.lang.String id,
java.lang.String collectionField,
java.lang.String sectionKey,
Property collectionProperty,
FieldMetadata md,
PersistencePackageRequest ppr,
EntityForm entityForm,
Entity entity)
throws ServiceException
request - model - id - collectionField - sectionKey - collectionProperty - md - ppr - ServiceException#addCollectionItem(HttpServletRequest, HttpServletResponse, Model, Map, String, String, EntityForm, BindingResult)},
#showAddCollectionItem(HttpServletRequest, HttpServletResponse, Model, Map, String, String, MultiValueMap)}@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}",
method=GET)
public java.lang.String showUpdateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@PathVariable(value="collectionItemId")
java.lang.String collectionItemId)
throws java.lang.Exception
request - response - model - pathVars - id - collectionField - collectionItemId - java.lang.Exception@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/view",
method=GET)
public java.lang.String showViewCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@PathVariable(value="collectionItemId")
java.lang.String collectionItemId)
throws java.lang.Exception
request - response - model - pathVars - id - collectionField - collectionItemId - java.lang.Exceptionprotected java.lang.String showViewUpdateCollection(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId,
java.lang.String modalHeaderType)
throws ServiceException
ServiceExceptionprotected java.lang.String showViewUpdateCollection(javax.servlet.http.HttpServletRequest request,
org.springframework.ui.Model model,
java.util.Map<java.lang.String,java.lang.String> pathVars,
java.lang.String id,
java.lang.String collectionField,
java.lang.String collectionItemId,
java.lang.String modalHeaderType,
EntityForm entityForm,
Entity entity)
throws ServiceException
request - model - pathVars - id - collectionField - collectionItemId - modalHeaderType - ef - entity - ServiceException@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}",
method=POST)
public java.lang.String updateCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@PathVariable(value="collectionItemId")
java.lang.String collectionItemId,
@ModelAttribute(value="entityForm")
EntityForm entityForm,
org.springframework.validation.BindingResult result)
throws java.lang.Exception
request - response - model - pathVars - id - collectionField - entityForm - java.lang.Exception@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/sequence",
method=POST)
@ResponseBody
public java.util.Map<java.lang.String,java.lang.Object> updateCollectionItemSequence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@PathVariable(value="collectionItemId")
java.lang.String collectionItemId,
@RequestParam(value="newSequence")
java.lang.String newSequence)
throws java.lang.Exception
request - response - model - pathVars - id - collectionField - collectionItemId - java.lang.Exception@RequestMapping(value="/{id}/{collectionField:.*}/{collectionItemId}/delete",
method=POST)
public java.lang.String removeCollectionItem(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.ui.Model model,
@PathVariable
java.util.Map<java.lang.String,java.lang.String> pathVars,
@PathVariable(value="id")
java.lang.String id,
@PathVariable(value="collectionField")
java.lang.String collectionField,
@PathVariable(value="collectionItemId")
java.lang.String collectionItemId)
throws java.lang.Exception
request - response - model - pathVars - id - collectionField - collectionItemId - java.lang.Exception@InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)
binder - Copyright © 2018. All Rights Reserved.