Class DefaultSearchRestrictionServiceDemoTest
- All Implemented Interfaces:
JaloSessionHolder
-
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.ServicelayerTest
importServiceFields inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
jaloSession -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidDemonstrates how to check whether type has restrictions then create model based restrictions for some type and next obtain them from that type.voidDemonstrates how to clear all registered session search restrictions.voidDemonstrates how to createSessionSearchRestrictionobject and add it to the session.voidDemonstrates how enable and disable search restrictions (both - session and persistent model based restrictions).voidDemonstrates how to remove few session search restrictions from list of registered session search restrictions.voidsetUp()voidtearDown()Methods inherited from class de.hybris.platform.servicelayer.ServicelayerTest
createCoreData, createDefaultCatalog, createDefaultUsers, createHardwareCatalog, getApplicationContext, importCsv, importData, importData, importData, importStream, importStream, isPrefetchModeNoneMethods inherited from class de.hybris.platform.servicelayer.ServicelayerBaseTest
autowireProperties, getBeanName, prepareApplicationContextAndSessionMethods inherited from class de.hybris.platform.testframework.HybrisJUnit4Test
establishJaloSession, finish, getOrCreateCurrency, getOrCreateLanguage, init, intenseChecksActivated, takeJaloSession
-
Constructor Details
-
DefaultSearchRestrictionServiceDemoTest
public DefaultSearchRestrictionServiceDemoTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
tearDown
public void tearDown() -
createAndAddSessionSearchRestriction
public void createAndAddSessionSearchRestriction()Demonstrates how to createSessionSearchRestrictionobject and add it to the session.Test scenario:
- prepare
SessionSearchRestrictionobject
- add session search restriction with usage ofSearchRestrictionService#addSessionSearchRestrictions(java.util.Collection)method -
clearSessionSearchRestriction
public void clearSessionSearchRestriction()Demonstrates how to clear all registered session search restrictions.Test scenario:
- prepare
SessionSearchRestrictionobject
- add session search restriction with usage ofSearchRestrictionService#addSessionSearchRestrictions(java.util.Collection)method
- clear session search restrictions -
removeSessionSearchRestriction
public void removeSessionSearchRestriction()Demonstrates how to remove few session search restrictions from list of registered session search restrictions.Test scenario:
- prepare
SessionSearchRestrictionobjects
- add session search restriction with usage ofSearchRestrictionService#addSessionSearchRestrictions(java.util.Collection)method
- remove one session search restriction from list of registered session search restrictions. -
enableAndDisableSearchRestriction
public void enableAndDisableSearchRestriction()Demonstrates how enable and disable search restrictions (both - session and persistent model based restrictions).Test scenario:
- check whether restrictions are enabled
- disable restrictions
- check whether restrictions are disabled
- enable restrictions again
- check whether restrictions are enabled -
checkSearchRestrictionCreateAndGetSearchRestrictionsForType
public void checkSearchRestrictionCreateAndGetSearchRestrictionsForType()Demonstrates how to check whether type has restrictions then create model based restrictions for some type and next obtain them from that type.Test scenario:
- check whether model has some restrictions
- create restrictions for type
- get restrictions from model
-