public interface ItemListSecurityService<R extends com.broadleafcommerce.cart.client.domain.ItemListAccessRule>
Modifier and Type | Method and Description |
---|---|
void |
assertDeleteAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String itemListId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Asserts that the customer can delete a given list.
|
void |
assertEditAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String itemListId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Asserts that the customer can edit a given list.
|
void |
assertShareAccess(com.broadleafcommerce.cart.client.domain.CustomerRef sharer,
ShareItemListRequest shareRequest,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Asserts that the customer can share a given list.
|
void |
assertViewAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String itemListId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Asserts that the customer can view a given list.
|
com.broadleafcommerce.cart.client.domain.ItemListAccessResponse |
filterDeleteAccess(@NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
@NonNull Set<String> itemListIds,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Checks item list access rules for a list of item list ids based on the given customer ref and
`DELETE` access rules
|
com.broadleafcommerce.cart.client.domain.ItemListAccessResponse |
filterEditAccess(@NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
@NonNull Set<String> itemListIds,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Checks item list access rules for a list of item list ids based on the given customer ref and
`EDIT` access rules
|
com.broadleafcommerce.cart.client.domain.ItemListAccessResponse |
filterViewAccess(@NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
@NonNull Set<String> itemListIds,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Checks item list access rules for a list of item list ids based on the given customer ref and
`VIEW` access rules
|
org.springframework.data.domain.Page<R> |
getAccessibleRules(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
org.springframework.data.domain.Pageable pageable,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Gets a page of acceesible access rules for a customer.
|
R |
grantOwnership(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String itemListId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Grants ownership of an item list to the given customer.
|
boolean |
hasDeleteAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String itemListId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Tells if the given customer has access to delete an item list.
|
boolean |
hasEditAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String itemListId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Tells if the given customer has access to edit an item list.
|
boolean |
hasShareAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
ShareItemListRequest shareRequest,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Tells if the given customer has access to share an item list.
|
boolean |
hasViewAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef,
String itemListId,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Tells if the given customer has access to view an item list.
|
List<R> |
share(com.broadleafcommerce.cart.client.domain.CustomerRef sharer,
ShareItemListRequest shareRequest,
com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
Share an item list with other users.
|
org.springframework.data.domain.Page<R> getAccessibleRules(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @Nullable org.springframework.data.domain.Pageable pageable, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the customer to find access rules forpageable
- the requested page of access rulescontext
- the context of the requestR grantOwnership(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to grant ownership foritemListId
- the list to grant access tocontext
- the context of the requestList<R> share(com.broadleafcommerce.cart.client.domain.CustomerRef sharer, ShareItemListRequest shareRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
sharer
- the customer initiating the share requestshareRequest
- the details of the request to sharecontext
- the context of the requestboolean hasViewAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to test access foritemListId
- the ID of the item list to test access tocontext
- the context of the requestboolean hasEditAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to test access foritemListId
- the ID of the item list to test access tocontext
- the context of the requestboolean hasDeleteAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to test access foritemListId
- the ID of the item list to test access tocontext
- the context of the requestboolean hasShareAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, ShareItemListRequest shareRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to test access forshareRequest
- the request that describes how and which item list should be sharedcontext
- the context of the requestcom.broadleafcommerce.cart.client.domain.ItemListAccessResponse filterViewAccess(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @NonNull @NonNull Set<String> itemListIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to test access foritemListIds
- the list of item list ids to checkcontext
- the context of the requestcom.broadleafcommerce.cart.client.domain.ItemListAccessResponse filterEditAccess(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @NonNull @NonNull Set<String> itemListIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to test access foritemListIds
- the list of item list ids to checkcontext
- the context of the requestcom.broadleafcommerce.cart.client.domain.ItemListAccessResponse filterDeleteAccess(@NonNull @NonNull com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, @NonNull @NonNull Set<String> itemListIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the reference to the customer to test access foritemListIds
- the list of item list ids to checkcontext
- the context of the requestvoid assertViewAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the customer reference to test access foritemListId
- the ID of the item list to test access tocontext
- the context of the requestcom.broadleafcommerce.data.tracking.core.exception.NotPermittedException
- if the customer is not authorized to view the listvoid assertEditAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the customer reference to test access foritemListId
- the ID of the item list to test access tocontext
- the context of the requestcom.broadleafcommerce.data.tracking.core.exception.NotPermittedException
- if the customer is not authorized to edit the listvoid assertDeleteAccess(com.broadleafcommerce.cart.client.domain.CustomerRef customerRef, String itemListId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
customerRef
- the customer reference to test access foritemListId
- the ID of the item list to test access tocontext
- the context of the requestcom.broadleafcommerce.data.tracking.core.exception.NotPermittedException
- if the customer is not authorized to delete the listvoid assertShareAccess(com.broadleafcommerce.cart.client.domain.CustomerRef sharer, ShareItemListRequest shareRequest, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
sharer
- the customer reference to test access forshareRequest
- the request to share the item listcontext
- the context of the requestcom.broadleafcommerce.data.tracking.core.exception.NotPermittedException
- if the customer is not authorized to share the listCopyright © 2021. All rights reserved.