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 org.broadleafcommerce.common.security.service.ExploitProtectionServiceprotected static final Map<BatchPersistencePackage,BatchDynamicResultSet> protected org.broadleafcommerce.common.service.PersistenceServiceprotected PersistenceThreadManagerprotected org.broadleafcommerce.common.util.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 org.broadleafcommerce.common.exception.ServiceExceptionrecreateSpecificServiceException(org.broadleafcommerce.common.exception.ServiceException e, String message, Throwable cause) remove(PersistencePackage persistencePackage) update(PersistencePackage persistencePackage)
-
Field Details
-
METADATA_CACHE
-
exploitProtectionService
protected org.broadleafcommerce.common.security.service.ExploitProtectionService exploitProtectionService -
persistenceService
protected org.broadleafcommerce.common.service.PersistenceService persistenceService -
persistenceThreadManager
-
transUtil
protected org.broadleafcommerce.common.util.StreamingTransactionCapableUtil transUtil -
entitiesIgnoreList
-
-
Constructor Details
-
DynamicEntityRemoteService
public DynamicEntityRemoteService()
-
-
Method Details
-
recreateSpecificServiceException
-
inspect
public PersistenceResponse inspect(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException 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:
org.broadleafcommerce.common.exception.ServiceException- wraps whatever internal exception that might have occurred as a result of the inspect
-
nonTransactionalInspect
public PersistenceResponse nonTransactionalInspect(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
nonTransactionalInspectin interfaceDynamicEntityService- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
fetch
public PersistenceResponse fetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
fetchin interfaceDynamicEntityService- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
nonTransactionalFetch
public PersistenceResponse nonTransactionalFetch(PersistencePackage persistencePackage, CriteriaTransferObject cto) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
nonTransactionalFetchin interfaceDynamicEntityService- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
cleanEntity
protected void cleanEntity(Entity entity) throws org.broadleafcommerce.common.exception.ServiceException - Throws:
org.broadleafcommerce.common.exception.ServiceException
-
add
public PersistenceResponse add(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException 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:
org.broadleafcommerce.common.exception.ServiceException
-
update
public PersistenceResponse update(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
updatein interfaceDynamicEntityService- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
remove
public PersistenceResponse remove(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException - Specified by:
removein interfaceDynamicEntityService- Throws:
org.broadleafcommerce.common.exception.ServiceException
-
nonTransactionalAdd
public PersistenceResponse nonTransactionalAdd(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.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:
org.broadleafcommerce.common.exception.ServiceException
-
nonTransactionalUpdate
public PersistenceResponse nonTransactionalUpdate(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.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:
org.broadleafcommerce.common.exception.ServiceException
-
nonTransactionalRemove
public PersistenceResponse nonTransactionalRemove(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.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:
org.broadleafcommerce.common.exception.ServiceException
-
isShouldClean
protected boolean isShouldClean() -
identifyTransactionManager
protected org.springframework.transaction.PlatformTransactionManager identifyTransactionManager(PersistencePackage persistencePackage) throws org.broadleafcommerce.common.exception.ServiceException - Throws:
org.broadleafcommerce.common.exception.ServiceException
-