Class DefaultCatalogAccessPolicyService<P extends CatalogAccessPolicy>
java.lang.Object
com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
com.broadleafcommerce.catalog.service.accesspolicy.DefaultCatalogAccessPolicyService<P>
- All Implemented Interfaces:
CatalogAccessPolicyService<P>
,com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
public class DefaultCatalogAccessPolicyService<P extends CatalogAccessPolicy>
extends com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService<P>
implements CatalogAccessPolicyService<P>
- Since:
- 2.1.0-GA
- Author:
- Nathan Moore (nathandmoore)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionDefaultCatalogAccessPolicyService
(CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager, com.broadleafcommerce.common.extension.TypeFactory typeFactory, com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender sender) -
Method Summary
Modifier and TypeMethodDescriptionvoid
protected com.broadleafcommerce.common.extension.cache.CacheStateManager
protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node>
protected CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable>
protected com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender
protected com.broadleafcommerce.common.extension.TypeFactory
readAllActiveByTargetType
(String targetType, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) org.springframework.data.domain.Page<P>
readPageByName
(String name, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) replace
(String id, P businessInstance, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected void
sendCatalogAccessPolicyModifiedEvent
(P catalogAccessPolicy, @NonNull String operationType, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) update
(String id, P businessInstance, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseRsqlCrudEntityService
getRsqlHelper, readAll, readAll, readAll, readAll
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService
convertFromPersistentDomain, convertToPersistentDomain, createAll, createAllAllowingPartialSuccess, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
createAll, createAllAllowingPartialSuccess, readAll, readAll, readAll, readAllByContextId, readByContextId, replaceAll, replaceAllAllowingPartialSuccess, updateAll, updateAllAllowingPartialSuccess, updateSort
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService
readAll, readAll, readAll, readAll
-
Field Details
-
BY_TARGET_TYPE_IN_CACHE
- See Also:
-
-
Constructor Details
-
DefaultCatalogAccessPolicyService
public DefaultCatalogAccessPolicyService(CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityHelper helper, com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> parser, @Nullable com.broadleafcommerce.common.extension.cache.CacheStateManager cacheStateManager, com.broadleafcommerce.common.extension.TypeFactory typeFactory, @Nullable com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender sender)
-
-
Method Details
-
readPageByName
public org.springframework.data.domain.Page<P> readPageByName(@Nullable String name, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
readPageByName
in interfaceCatalogAccessPolicyService<P extends CatalogAccessPolicy>
-
readAllActiveByTargetType
public List<P> readAllActiveByTargetType(String targetType, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
readAllActiveByTargetType
in interfaceCatalogAccessPolicyService<P extends CatalogAccessPolicy>
-
create
public P create(@NonNull P businessInstance, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
create
in interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
- Overrides:
create
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
-
update
public P update(@NonNull String id, @NonNull P businessInstance, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
update
in interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
- Overrides:
update
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
-
replace
public P replace(@NonNull String id, @NonNull P businessInstance, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
replace
in interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
- Overrides:
replace
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
-
delete
public void delete(String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) - Specified by:
delete
in interfacecom.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends CatalogAccessPolicy>
- Overrides:
delete
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
-
sendCatalogAccessPolicyModifiedEvent
-
getRepository
protected CatalogAccessPolicyRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()- Overrides:
getRepository
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends CatalogAccessPolicy>
-
getParser
protected com.broadleafcommerce.data.tracking.core.filtering.fetch.FilterParser<cz.jirutka.rsql.parser.ast.Node> getParser() -
getCacheStateManager
@Nullable protected com.broadleafcommerce.common.extension.cache.CacheStateManager getCacheStateManager() -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getSender
@Nullable protected com.broadleafcommerce.common.messaging.notification.DetachedDurableMessageSender getSender()
-