Class ApplicationOwnedMarketplaceApplicationCatalogEndpoint
java.lang.Object
com.broadleafcommerce.tenant.web.endpoint.ApplicationOwnedMarketplaceApplicationCatalogEndpoint
@FrameworkRestController
@FrameworkMapping("/applications/{applicationId}/marketplace-application-catalogs")
@DataRouteByExample(MarketplaceApplicationCatalog.class)
public class ApplicationOwnedMarketplaceApplicationCatalogEndpoint
extends Object
Similar to
MarketplaceApplicationCatalogEndpoint
, but limited to data associated with a
particular Application
.-
Field Summary
-
Constructor Summary
ConstructorDescriptionApplicationOwnedMarketplaceApplicationCatalogEndpoint
(MarketplaceApplicationCatalogService<MarketplaceApplicationCatalog> applicationCatalogService, ApplicationService<Application> applicationService) -
Method Summary
Modifier and TypeMethodDescriptioncreateMarketplaceApplicationCatalogForApp
(String applicationId, MarketplaceApplicationCatalog mktAppCatalog, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected void
ensureApplicationExists
(@NonNull String applicationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Ensures that theApplication
exists before we manageMarketplaceApplicationCatalogs
in that application.protected void
ensureApplicationMatchesContextIfAppContext
(@NonNull String requestedApplicationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) This validation ensures that if a request is made from an application context, the explicitly provided application ID must match it.protected ApplicationService<Application>
replaceMarketplaceApplicationCatalogForApp
(String applicationId, String mktAppCatalogId, MarketplaceApplicationCatalog mktAppCatalog, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
Field Details
-
BASE_URI
- See Also:
-
-
Constructor Details
-
ApplicationOwnedMarketplaceApplicationCatalogEndpoint
public ApplicationOwnedMarketplaceApplicationCatalogEndpoint(MarketplaceApplicationCatalogService<MarketplaceApplicationCatalog> applicationCatalogService, ApplicationService<Application> applicationService)
-
-
Method Details
-
createMarketplaceApplicationCatalogForApp
@Policy(permissionRoots="TENANT") @FrameworkPostMapping public MarketplaceApplicationCatalog createMarketplaceApplicationCatalogForApp(@PathVariable("applicationId") String applicationId, @RequestBody MarketplaceApplicationCatalog mktAppCatalog, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
replaceMarketplaceApplicationCatalogForApp
@Policy(permissionRoots="TENANT") @FrameworkPutMapping("/{id}") public MarketplaceApplicationCatalog replaceMarketplaceApplicationCatalogForApp(@PathVariable("applicationId") String applicationId, @PathVariable("id") String mktAppCatalogId, @RequestBody MarketplaceApplicationCatalog mktAppCatalog, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
ensureApplicationExists
protected void ensureApplicationExists(@NonNull @NonNull String applicationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Ensures that theApplication
exists before we manageMarketplaceApplicationCatalogs
in that application.- Parameters:
applicationId
- ID of the application to check for existencecontextInfo
- context information around sandbox and multitenant state
-
ensureApplicationMatchesContextIfAppContext
protected void ensureApplicationMatchesContextIfAppContext(@NonNull @NonNull String requestedApplicationId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) This validation ensures that if a request is made from an application context, the explicitly provided application ID must match it. This prevents application users from affecting data outside of their context.- Parameters:
requestedApplicationId
- the explicitly provided application IDcontextInfo
- the context provided with the request
-
getApplicationCatalogService
protected MarketplaceApplicationCatalogService<MarketplaceApplicationCatalog> getApplicationCatalogService() -
getApplicationService
-