Class CatalogEndpoint

java.lang.Object
com.broadleafcommerce.tenant.web.endpoint.CatalogEndpoint

@FrameworkRestController @FrameworkMapping("/catalogs") @DataRouteByExample(Catalog.class) public class CatalogEndpoint extends Object
API for managing Catalog instances.
Author:
Jeff Fischer
  • Constructor Summary

    Constructors
    Constructor
    Description
    CatalogEndpoint(CatalogService<Catalog> service, com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> translationEntityService, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, Catalog req, String applicationId)
     
    void
    delete(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id)
     
    protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>
     
    protected com.broadleafcommerce.data.tracking.core.policy.trackable.TrackablePolicyUtils
     
     
    protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation>
     
    org.springframework.data.domain.Page<Catalog>
    readAll(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, org.springframework.data.domain.Pageable page, boolean visibility, String excludeCatalog, String nameQuery, cz.jirutka.rsql.parser.ast.Node filters)
     
    readById(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id)
     
    replace(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, Catalog req)
     
    com.broadleafcommerce.translation.service.dto.TranslationsPayload
    replaceAllCatalogTranslations(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, Locale locale, com.broadleafcommerce.translation.service.dto.TranslationsPayload translationRequest)
     
    void
    setPolicyUtils(com.broadleafcommerce.data.tracking.core.policy.trackable.TrackablePolicyUtils policyUtils)
     
    update(javax.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String id, Catalog req)
     
    protected void
    validateTenantOnlyOperation(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CatalogEndpoint

      public CatalogEndpoint(CatalogService<Catalog> service, com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> translationEntityService, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser)
  • Method Details

    • setPolicyUtils

      @Autowired public void setPolicyUtils(@Nullable com.broadleafcommerce.data.tracking.core.policy.trackable.TrackablePolicyUtils policyUtils)
    • readAll

      @FrameworkGetMapping @Policy(permissionRoots="TENANT") public org.springframework.data.domain.Page<Catalog> readAll(javax.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, @RequestParam(value="visibility",required=false) boolean visibility, @RequestParam(value="excludeCatalog",required=false) String excludeCatalog, @RequestParam(value="q",required=false) String nameQuery, cz.jirutka.rsql.parser.ast.Node filters)
    • readById

      @FrameworkGetMapping("/{id}") @Policy(permissionRoots="TENANT") public Catalog readById(javax.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id)
    • update

      @FrameworkPatchMapping(value="/{id}", consumes="application/json") @Policy(permissionRoots="TENANT") public Catalog update(javax.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody Catalog req)
    • replace

      @FrameworkPutMapping(value="/{id}", consumes="application/json") @Policy(permissionRoots="TENANT") public Catalog replace(javax.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @RequestBody Catalog req)
    • replaceAllCatalogTranslations

      @FrameworkPutMapping(value="/{id}/translations/{locale}", consumes="application/json") @Policy(permissionRoots="TENANT") public com.broadleafcommerce.translation.service.dto.TranslationsPayload replaceAllCatalogTranslations(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id, @PathVariable("locale") Locale locale, @RequestBody com.broadleafcommerce.translation.service.dto.TranslationsPayload translationRequest)
    • create

      @FrameworkPostMapping(consumes="application/json") @Policy(permissionRoots="TENANT") public Catalog create(javax.servlet.http.HttpServletRequest request, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody Catalog req, @RequestParam(value="applicationId",required=false) String applicationId)
    • delete

      @FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="TENANT") public void delete(javax.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id)
    • validateTenantOnlyOperation

      protected void validateTenantOnlyOperation(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    • getService

      protected CatalogService<Catalog> getService()
    • getTranslationEntityService

      protected com.broadleafcommerce.translation.service.TranslationEntityService<com.broadleafcommerce.translation.domain.Translation> getTranslationEntityService()
    • getParser

      protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> getParser()
    • getPolicyUtils

      @Nullable protected com.broadleafcommerce.data.tracking.core.policy.trackable.TrackablePolicyUtils getPolicyUtils()