Class ServicelayerManager
java.lang.Object
de.hybris.platform.jalo.Manager
de.hybris.platform.jalo.extension.Extension
de.hybris.platform.servicelayer.internal.jalo.GeneratedServicelayerManager
de.hybris.platform.servicelayer.internal.jalo.ServicelayerManager
- All Implemented Interfaces:
ItemLifecycleListener,JaloSessionListener,Serializable
public class ServicelayerManager
extends GeneratedServicelayerManager
implements JaloSessionListener
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension
Extension.RestrictedLanguagesProvider, Extension.RightsProviderNested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final OneToManyHandler<SavedValues>for hmc legacy
OneToManyHandlerfor handling 1:n SAVEDVALUES's relation attributes from 'many' side.Fields inherited from class de.hybris.platform.servicelayer.internal.jalo.GeneratedServicelayerManager
DEFAULT_INITIAL_ATTRIBUTES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes) This method will be called after an item was created.voidafterSessionAttributeChange(JaloSession session, String attributeName, Object value) Notify if the extension manager if the session attributes was changedvoidafterSessionCreation(JaloSession session) Notifies the extension manager if a session was just created.voidafterSessionUserChange(JaloSession session, User previous) Notifies the extension manager if the current session user was changedvoidbeforeSessionClose(JaloSession session) Notifies the extension manager if a session will be closed.voidcheckBeforeInitialization(JspContext ctx, boolean forceInit) Override this method to add custom checks that should be executed before system initialization or update.voidcreateEssentialData(Map<String, String> params, JspContext jspc) Returns all existing Language objects for the given JaloSession.
Note: This set will be cached and rebuild per request.Returns a Set containing all 'readable languages' for the current user as configured in its user profile.Returns a Set containing all 'writable languages' for the current user as configured in its user profile.static ServicelayerManagergetName()Gets the user profile of the current user.getSavedValues(Item item) Getter of theItem.savedValuesattribute.<T extends HybrisEnumValue>
TgetServiceLayerEnumerationValue(String enumerationCode, String valueCode) getUserprofile(SessionContext ctx, User item) Generated method - Getter of theUser.userprofileattribute.getUserprofile(User item) Generated method - Getter of theUser.userprofileattribute.voidinit()called once for each tenant, so this method fits best to perform some initialization stuffprotected booleanisEventActiveAttribute(String attributeName) protected voidvoidvoidnotifyInitializationEnd(Map<String, String> params, JspContext ctx) voidnotifyInitializationStart(Map<String, String> params, JspContext ctx) protected voidnotifyItemRemoval(SessionContext ctx, Item item) TODO improve API doc Is called just before a item is being removed.voidnotifyTenantRestart(Tenant tenant) voidpublishEvent(AbstractEvent event) voidsetUserprofile(SessionContext ctx, User item, UserProfile value) Generated method - Setter of theUser.userprofileattribute.voidsetUserprofile(User item, UserProfile value) Generated method - Setter of theUser.userprofileattribute.Methods inherited from class de.hybris.platform.servicelayer.internal.jalo.GeneratedServicelayerManager
createAbstractContactInfo, createAbstractContactInfo, createAddress, createAddress, createAdvancePaymentInfo, createAdvancePaymentInfo, createAtomicType, createAtomicType, createAttributeDescriptor, createAttributeDescriptor, createAuditReportConfig, createAuditReportConfig, createBruteForceLoginAttempts, createBruteForceLoginAttempts, createBruteForceLoginDisabledAudit, createBruteForceLoginDisabledAudit, createCart, createCart, createCartEntry, createCartEntry, createCollectionType, createCollectionType, createComposedType, createComposedType, createConfigAttributeDescriptor, createConfigAttributeDescriptor, createConfigProxyItem, createConfigProxyItem, createConfigProxyMetaType, createConfigProxyMetaType, createCorsConfigurationProperty, createCorsConfigurationProperty, createCountry, createCountry, createCreditCardPaymentInfo, createCreditCardPaymentInfo, createCurrency, createCurrency, createCustomer, createCustomer, createDebitPaymentInfo, createDebitPaymentInfo, createDeliveryMode, createDeliveryMode, createDerivedMedia, createDerivedMedia, createDiscount, createDiscount, createEmployee, createEmployee, createEnumerationMetaType, createEnumerationMetaType, createEnumerationValue, createEnumerationValue, createExpressionAttributeDescriptor, createExpressionAttributeDescriptor, createGenericItem, createGenericItem, createGenericTestItem, createGenericTestItem, createIndexTestItem, createIndexTestItem, createInMemoryCart, createInMemoryCart, createInMemoryCartEntry, createInMemoryCartEntry, createInvoicePaymentInfo, createInvoicePaymentInfo, createLanguage, createLanguage, createLink, createLink, createMapType, createMapType, createMedia, createMedia, createMediaContainer, createMediaContainer, createMediaContext, createMediaContext, createMediaFolder, createMediaFolder, createMediaFormat, createMediaFormat, createMediaFormatMapping, createMediaFormatMapping, createOrder, createOrder, createOrderEntry, createOrderEntry, createPaymentInfo, createPaymentInfo, createPaymentMode, createPaymentMode, createPhoneContactInfo, createPhoneContactInfo, createProduct, createProduct, createProductMediaLink, createProductMediaLink, createQuote, createQuote, createQuoteEntry, createQuoteEntry, createRegion, createRegion, createRelationDescriptor, createRelationDescriptor, createRelationMetaType, createRelationMetaType, createSavedQuery, createSavedQuery, createSavedValueEntry, createSavedValueEntry, createSavedValues, createSavedValues, createSearchRestriction, createSearchRestriction, createStoredHttpSession, createStoredHttpSession, createSystemSetupAudit, createSystemSetupAudit, createTax, createTax, createTestEmployee, createTestEmployee, createTestItem, createTestItem, createTestItemType2, createTestItemType2, createTestItemType3, createTestItemType3, createTestUserGroup, createTestUserGroup, createTitle, createTitle, createUnit, createUnit, createUser, createUser, createUserGroup, createUserGroup, createUserPasswordChangeAudit, createUserPasswordChangeAudit, createUserProfile, createUserProfile, createUserRight, createUserRight, createViewAttributeDescriptor, createViewAttributeDescriptor, createViewType, createViewType, getDefaultAttributeModesMethods inherited from class de.hybris.platform.jalo.extension.Extension
checkBeforeItemRemoval, createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, isCreatorDisabled, onFirstSessionCreation, writeReplaceMethods inherited from class de.hybris.platform.jalo.Manager
beforeItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, setAttribute, setTenant, setTransientObject, wrap
-
Field Details
-
ITEMSAVEDVALUESRELATIONSAVEDVALUESHANDLER
for hmc legacy
OneToManyHandlerfor handling 1:n SAVEDVALUES's relation attributes from 'many' side.
-
-
Constructor Details
-
ServicelayerManager
public ServicelayerManager()
-
-
Method Details
-
init
public void init()Description copied from class:Managercalled once for each tenant, so this method fits best to perform some initialization stuff -
getName
- Overrides:
getNamein classGeneratedServicelayerManager
-
getInstance
-
notifyAttributesChanged
protected void notifyAttributesChanged() -
notifyItemRemoval
Description copied from class:ManagerTODO improve API doc Is called just before a item is being removed. No exception should be thrown here. UseManager.checkBeforeItemRemoval(SessionContext, Item)instead.This method does nothing and may be overridden.
- Overrides:
notifyItemRemovalin classExtension- Parameters:
ctx- the currency session contextitem- the item which is going to be removed
-
afterItemCreation
public void afterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes) throws JaloBusinessException Description copied from class:ManagerThis method will be called after an item was created.- Specified by:
afterItemCreationin interfaceItemLifecycleListener- Overrides:
afterItemCreationin classManager- Parameters:
ctx- the currency session contexttype- the type of the item which will be createdcreatedItem- the created item- Throws:
JaloBusinessException- See Also:
-
createEssentialData
- Overrides:
createEssentialDatain classExtension
-
afterSessionCreation
Description copied from interface:JaloSessionListenerNotifies the extension manager if a session was just created.- Specified by:
afterSessionCreationin interfaceJaloSessionListener- Parameters:
session- new session- See Also:
-
JaloSession.createInstance(java.util.Map, Class)
-
afterSessionUserChange
Description copied from interface:JaloSessionListenerNotifies the extension manager if the current session user was changed- Specified by:
afterSessionUserChangein interfaceJaloSessionListener- Parameters:
session- current sessionprevious- previous user- See Also:
-
afterSessionAttributeChange
Description copied from interface:JaloSessionListenerNotify if the extension manager if the session attributes was changed- Specified by:
afterSessionAttributeChangein interfaceJaloSessionListener- Parameters:
session- current sessionattributeName- name of changed attributevalue- new value
-
isEventActiveAttribute
-
beforeSessionClose
Description copied from interface:JaloSessionListenerNotifies the extension manager if a session will be closed.- Specified by:
beforeSessionClosein interfaceJaloSessionListener- Parameters:
session- current session- See Also:
-
notifyTenantRestart
-
notifyInitializationEnd
- Overrides:
notifyInitializationEndin classExtension- Throws:
Exception
-
notifyInitializationStart
- Overrides:
notifyInitializationStartin classExtension- Throws:
Exception
-
getSessionArtNamesFilter
- Returns:
- the sessionArtNamesFilter
-
getSavedValues
Getter of theItem.savedValuesattribute.- Returns:
- the savedValues
-
getOrCreateUserProfile
Gets the user profile of the current user. If it is not created yet, it will be created.- Returns:
- user profile of current user
-
getAllWritableLanguages
Returns a Set containing all 'writable languages' for the current user as configured in its user profile. If no set is specified at the user profile all groups which the user is a member of will be searched for a property called 'writablelanguages' (which should contain Collections of Languages) and if such properties exist, all contained languages are returned.
Note: This set will be cached and rebuild per request.- Returns:
- a Set containing all 'writable languages' for the current user.
-
getAllReadableLanguages
Returns a Set containing all 'readable languages' for the current user as configured in its user profile. If no set is specified at the user profile all groups which the user is a member of will be searched for a property called 'readablelanguages' (which should contain Collections of Languages) and if such properties exist, all contained languages are returned.
Note: This set will be cached and rebuild per request.- Returns:
- a Set containing all 'readable languages' for the current user.
-
getAllLanguages
Returns all existing Language objects for the given JaloSession.
Note: This set will be cached and rebuild per request.- Returns:
- a Set containing all existing Language objects for the given JaloSession.
-
getUserprofile
Generated method - Getter of theUser.userprofileattribute.- Returns:
- the userprofile
-
getUserprofile
Generated method - Getter of theUser.userprofileattribute.- Returns:
- the userprofile
-
setUserprofile
Generated method - Setter of theUser.userprofileattribute.- Parameters:
value- the userprofile
-
setUserprofile
Generated method - Setter of theUser.userprofileattribute.- Parameters:
value- the userprofile
-
notifyClusterAboutTenantInitialization
-
publishEvent
-
getServiceLayerEnumerationValue
public <T extends HybrisEnumValue> T getServiceLayerEnumerationValue(String enumerationCode, String valueCode) -
checkBeforeInitialization
Description copied from class:ExtensionOverride this method to add custom checks that should be executed before system initialization or update. The check should throw exception in case the initialization/update should not be performed- Overrides:
checkBeforeInitializationin classExtension- Throws:
Exception
-