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 ExploitProtectionServiceprotected static final Map<BatchPersistencePackage,BatchDynamicResultSet> protected PersistenceServiceprotected PersistenceThreadManagerprotected StreamingTransactionCapableUtil -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd(PersistencePackage persistencePackage) This will throw aValidationExceptionand not attempt to swallow them and wrap any other exceptions within aServiceExceptionthat might have resulted in adding the given package.protected voidcleanEntity(Entity entity) fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) protected org.springframework.transaction.PlatformTransactionManageridentifyTransactionManager(PersistencePackage persistencePackage) inspect(PersistencePackage persistencePackage) Builds all of the metadata associated with a particular request for an entity.protected booleannonTransactionalAdd(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 ServiceExceptionrecreateSpecificServiceException(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:DynamicEntityServiceBuilds all of the metadata associated with a particular request for an entity. The resultingPersistenceResponsethat is returned will not have thePersistenceResponse.getEntity()property set and this will return null. Instead, this will populatePersistenceResponse.getDynamicResultSet().- Specified by:
inspectin interfaceDynamicEntityService- Parameters:
persistencePackage- the package that should be passed through the admin pipeline to build the metadata- Returns:
- a
PersistenceResponsewith 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:
nonTransactionalInspectin interfaceDynamicEntityService- Throws:
ServiceException
-
fetch
public PersistenceResponse fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException - Specified by:
fetchin interfaceDynamicEntityService- Throws:
ServiceException
-
nonTransactionalFetch
public PersistenceResponse nonTransactionalFetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws ServiceException - Specified by:
nonTransactionalFetchin interfaceDynamicEntityService- Throws:
ServiceException
-
cleanEntity
- Throws:
ServiceException
-
add
Description copied from interface:DynamicEntityServiceThis will throw aValidationExceptionand not attempt to swallow them and wrap any other exceptions within aServiceExceptionthat might have resulted in adding the given package.- Specified by:
addin interfaceDynamicEntityService- Returns:
- Throws:
ServiceException
-
update
- Specified by:
updatein interfaceDynamicEntityService- Throws:
ServiceException
-
remove
- Specified by:
removein interfaceDynamicEntityService- Throws:
ServiceException
-
nonTransactionalAdd
public PersistenceResponse nonTransactionalAdd(PersistencePackage persistencePackage) throws ServiceException Description copied from interface:DynamicEntityServiceThe 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:
nonTransactionalAddin interfaceDynamicEntityService- Returns:
- Throws:
ServiceException
-
nonTransactionalUpdate
public PersistenceResponse nonTransactionalUpdate(PersistencePackage persistencePackage) throws ServiceException Description copied from interface:DynamicEntityServiceThe 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:
nonTransactionalUpdatein interfaceDynamicEntityService- Returns:
- Throws:
ServiceException
-
nonTransactionalRemove
public PersistenceResponse nonTransactionalRemove(PersistencePackage persistencePackage) throws ServiceException Description copied from interface:DynamicEntityServiceThe 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:
nonTransactionalRemovein interfaceDynamicEntityService- Returns:
- Throws:
ServiceException
-
isShouldClean
protected boolean isShouldClean() -
identifyTransactionManager
protected org.springframework.transaction.PlatformTransactionManager identifyTransactionManager(PersistencePackage persistencePackage) throws ServiceException - Throws:
ServiceException
-