org.broadleafcommerce.cms.admin.web.controller
Class AdminAssetController

java.lang.Object
  extended by org.broadleafcommerce.common.web.controller.BroadleafAbstractController
      extended by org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
          extended by org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
              extended by org.broadleafcommerce.cms.admin.web.controller.AdminAssetController

@Controller(value="blAdminAssetController")
@RequestMapping(value="/assets")
public class AdminAssetController
extends AdminBasicEntityController

Handles admin operations for the Asset entity. This is mostly to support displaying image assets inline in listgrids.

Author:
Andre Azzolini (apazzolini)

Field Summary
protected  AssetFormBuilderService formService
           
protected static String SECTION_KEY
           
protected  StaticAssetService staticAssetService
           
 
Fields inherited from class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
adminNavigationService, adminRemoteSecurityService, entityConfiguration, entityFormValidator, FILTER_VALUE_SEPARATOR, FILTER_VALUE_SEPARATOR_REGEX, mainEntityActionsExtensionManager, service
 
Constructor Summary
AdminAssetController()
           
 
Method Summary
protected  String getDefaultEntityType()
           
protected  String getSectionKey(Map<String,String> pathVars)
           
 String saveEntity(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, String id, EntityForm entityForm, org.springframework.validation.BindingResult result, org.springframework.web.servlet.mvc.support.RedirectAttributes ra)
           
 String viewEntityForm(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, String id)
           
 String viewEntityList(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.ui.Model model, Map<String,String> pathVars, org.springframework.util.MultiValueMap<String,String> requestParams)
           
 
Methods inherited from class org.broadleafcommerce.openadmin.web.controller.entity.AdminBasicEntityController
addAddActionIfAllowed, addCollectionItem, addEntity, buildAddCollectionItemModel, getCollectionFieldRecords, getCollectionValueDetails, initBinder, removeCollectionItem, removeEntity, showAddCollectionItem, showSelectCollectionItem, showUpdateCollectionItem, showViewCollectionItem, showViewUpdateCollection, showViewUpdateCollection, updateCollectionItem, updateCollectionItemSequence, viewAddEntityForm, viewCollectionItemDetails
 
Methods inherited from class org.broadleafcommerce.openadmin.web.controller.AdminAbstractController
attachSectionSpecificInfo, extractDynamicFormFields, getAddEntityTypes, getBlankDynamicFieldTemplateForm, getBlankDynamicFieldTemplateForm, getClassNameForSection, getCollectionListGrid, getCollectionListGrid, getCriteria, getDynamicFieldTemplateForm, getDynamicForm, getMaxIndex, getSectionCrumbs, getSectionCustomCriteria, getSectionPersistencePackageRequest, getSectionPersistencePackageRequest, getSortDirections, getSortPropertyNames, getStartIndex, setModelAttributes
 
Methods inherited from class org.broadleafcommerce.common.web.controller.BroadleafAbstractController
addDeepLink, getContextPath, isAjaxRequest, jsonResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SECTION_KEY

protected static final String SECTION_KEY
See Also:
Constant Field Values

formService

protected AssetFormBuilderService formService

staticAssetService

protected StaticAssetService staticAssetService
Constructor Detail

AdminAssetController

public AdminAssetController()
Method Detail

getSectionKey

protected String getSectionKey(Map<String,String> pathVars)
Overrides:
getSectionKey in class AdminAbstractController

viewEntityList

@RequestMapping(value="",
                method=GET)
public String viewEntityList(javax.servlet.http.HttpServletRequest request,
                                            javax.servlet.http.HttpServletResponse response,
                                            org.springframework.ui.Model model,
                                            @PathVariable
                                            Map<String,String> pathVars,
                                            @RequestParam
                                            org.springframework.util.MultiValueMap<String,String> requestParams)
                      throws Exception
Overrides:
viewEntityList in class AdminBasicEntityController
Throws:
Exception

viewEntityForm

@RequestMapping(value="/{id}",
                method=GET)
public String viewEntityForm(javax.servlet.http.HttpServletRequest request,
                                            javax.servlet.http.HttpServletResponse response,
                                            org.springframework.ui.Model model,
                                            @PathVariable
                                            Map<String,String> pathVars,
                                            @PathVariable(value="id")
                                            String id)
                      throws Exception
Overrides:
viewEntityForm in class AdminBasicEntityController
Throws:
Exception

saveEntity

@RequestMapping(value="/{id}",
                method=POST)
public String saveEntity(javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response,
                                        org.springframework.ui.Model model,
                                        @PathVariable
                                        Map<String,String> pathVars,
                                        @PathVariable(value="id")
                                        String id,
                                        @ModelAttribute(value="entityForm")
                                        EntityForm entityForm,
                                        org.springframework.validation.BindingResult result,
                                        org.springframework.web.servlet.mvc.support.RedirectAttributes ra)
                  throws Exception
Overrides:
saveEntity in class AdminBasicEntityController
Throws:
Exception

getDefaultEntityType

protected String getDefaultEntityType()
Overrides:
getDefaultEntityType in class AdminAbstractController


Copyright © 2013. All Rights Reserved.