Class DynamicEntityRemoteService
java.lang.Object
org.broadleafcommerce.openadmin.server.service.DynamicEntityRemoteService
- All Implemented Interfaces:
DynamicEntityService
@Service("blDynamicEntityRemoteService")
public class DynamicEntityRemoteService
extends Object
implements DynamicEntityService
- Author:
- jfischer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ExploitProtectionService
protected static final Map<BatchPersistencePackage,
BatchDynamicResultSet> protected PersistenceService
protected PersistenceThreadManager
protected StreamingTransactionCapableUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(PersistencePackage persistencePackage) This will throw aValidationException
and not attempt to swallow them and wrap any other exceptions within aServiceException
that might have resulted in adding the given package.protected void
cleanEntity
(Entity entity) fetch
(PersistencePackage persistencePackage, CriteriaTransferObject cto) protected org.springframework.transaction.PlatformTransactionManager
identifyTransactionManager
(PersistencePackage persistencePackage) inspect
(PersistencePackage persistencePackage) Builds all of the metadata associated with a particular request for an entity.protected boolean
nonTransactionalAdd
(PersistencePackage persistencePackage) The exact same asDynamicEntityService.add(PersistencePackage)
except this is not bound to a transaction.nonTransactionalFetch
(PersistencePackage persistencePackage, CriteriaTransferObject cto) nonTransactionalInspect
(PersistencePackage persistencePackage) nonTransactionalRemove
(PersistencePackage persistencePackage) The exact same asDynamicEntityService.remove(PersistencePackage)
except this is not bound to a transaction.nonTransactionalUpdate
(PersistencePackage persistencePackage) The exact same asDynamicEntityService.update(PersistencePackage)
except this is not bound to a transaction.protected ServiceException
recreateSpecificServiceException
(ServiceException e, String message, Throwable cause) remove
(PersistencePackage persistencePackage) update
(PersistencePackage persistencePackage)
-
Field Details
-
METADATA_CACHE
-
exploitProtectionService
-
persistenceService
-
persistenceThreadManager
-
transUtil
-
entitiesIgnoreList
-
-
Constructor Details
-
DynamicEntityRemoteService
public DynamicEntityRemoteService()
-
-
Method Details
-
recreateSpecificServiceException
protected ServiceException recreateSpecificServiceException(ServiceException e, String message, Throwable cause) -
inspect
Description copied from interface:DynamicEntityService
Builds all of the metadata associated with a particular request for an entity. The resultingPersistenceResponse
that is returned will not have thePersistenceResponse.getEntity()
property set and this will return null. Instead, this will populatePersistenceResponse.getDynamicResultSet()
.- Specified by:
inspect
in interfaceDynamicEntityService
- Parameters:
persistencePackage
- the package that should be passed through the admin pipeline to build the metadata- Returns:
- a
PersistenceResponse
with thePersistenceResponse.getDynamicResultSet()
set with the metadata of the built properties for this particular entity - Throws:
ServiceException
- wraps whatever internal exception that might have occurred as a result of the inspect
-
nonTransactionalInspect
public PersistenceResponse nonTransactionalInspect(PersistencePackage persistencePackage) throws ServiceException - Specified by:
nonTransactionalInspect
in interfaceDynamicEntityService
- Throws:
ServiceException
-
fetch
public PersistenceResponse fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException - Specified by:
fetch
in interfaceDynamicEntityService
- Throws:
ServiceException
-
nonTransactionalFetch
public PersistenceResponse nonTransactionalFetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException - Specified by:
nonTransactionalFetch
in interfaceDynamicEntityService
- Throws:
ServiceException
-
cleanEntity
- Throws:
ServiceException
-
add
Description copied from interface:DynamicEntityService
This will throw aValidationException
and not attempt to swallow them and wrap any other exceptions within aServiceException
that might have resulted in adding the given package.- Specified by:
add
in interfaceDynamicEntityService
- Returns:
- Throws:
ServiceException
-
update
- Specified by:
update
in interfaceDynamicEntityService
- Throws:
ServiceException
-
remove
- Specified by:
remove
in interfaceDynamicEntityService
- Throws:
ServiceException
-
nonTransactionalAdd
public PersistenceResponse nonTransactionalAdd(PersistencePackage persistencePackage) throws ServiceException Description copied from interface:DynamicEntityService
The exact same asDynamicEntityService.add(PersistencePackage)
except this is not bound to a transaction. This is useful when transactions are handled by the caller that has its own rollback logic (like when batching multiple adds).- Specified by:
nonTransactionalAdd
in interfaceDynamicEntityService
- Returns:
- Throws:
ServiceException
-
nonTransactionalUpdate
public PersistenceResponse nonTransactionalUpdate(PersistencePackage persistencePackage) throws ServiceException Description copied from interface:DynamicEntityService
The exact same asDynamicEntityService.update(PersistencePackage)
except this is not bound to a transaction. This is useful when transactions are handled by the caller that has its own rollback logic (like when batching multiple updates).- Specified by:
nonTransactionalUpdate
in interfaceDynamicEntityService
- Returns:
- Throws:
ServiceException
-
nonTransactionalRemove
public PersistenceResponse nonTransactionalRemove(PersistencePackage persistencePackage) throws ServiceException Description copied from interface:DynamicEntityService
The exact same asDynamicEntityService.remove(PersistencePackage)
except this is not bound to a transaction. This is useful when transactions are handled by the caller that has its own rollback logic (like when batching multiple removes).- Specified by:
nonTransactionalRemove
in interfaceDynamicEntityService
- Returns:
- Throws:
ServiceException
-
isShouldClean
protected boolean isShouldClean() -
identifyTransactionManager
protected org.springframework.transaction.PlatformTransactionManager identifyTransactionManager(PersistencePackage persistencePackage) throws ServiceException - Throws:
ServiceException
-