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,java.io.Serializable
public class ServicelayerManager extends GeneratedServicelayerManager implements JaloSessionListener
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension
Extension.RestrictedLanguagesProvider, Extension.RightsProvider
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator
-
-
Field Summary
Fields Modifier and Type Field Description protected static OneToManyHandler<SavedValues>ITEMSAVEDVALUESRELATIONSAVEDVALUESHANDLERfor 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 Constructor Description ServicelayerManager()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterItemCreation(SessionContext ctx, ComposedType type, Item createdItem, Item.ItemAttributeMap attributes)This method will be called after an item was created.voidafterSessionAttributeChange(JaloSession session, java.lang.String attributeName, java.lang.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.voidcreateEssentialData(java.util.Map<java.lang.String,java.lang.String> params, JspContext jspc)java.util.Set<Language>getAllLanguages()Returns all existing Language objects for the given JaloSession.
Note: This set will be cached and rebuild per request.java.util.Set<Language>getAllReadableLanguages()Returns a Set containing all 'readable languages' for the current user as configured in its user profile.java.util.Set<Language>getAllWritableLanguages()Returns a Set containing all 'writable languages' for the current user as configured in its user profile.static ServicelayerManagergetInstance()java.lang.StringgetName()UserProfilegetOrCreateUserProfile()Gets the user profile of the current user.java.util.Set<SavedValues>getSavedValues(Item item)Getter of theItem.savedValuesattribute.<T extends HybrisEnumValue>
TgetServiceLayerEnumerationValue(java.lang.String enumerationCode, java.lang.String valueCode)java.util.List<java.lang.String>getSessionArtNamesFilter()UserProfilegetUserprofile(SessionContext ctx, User item)Generated method - Getter of theUser.userprofileattribute.UserProfilegetUserprofile(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(java.lang.String attributeName)protected voidnotifyAttributesChanged()voidnotifyClusterAboutTenantInitialization(Tenant tenant)voidnotifyInitializationEnd(java.util.Map<java.lang.String,java.lang.String> params, JspContext ctx)voidnotifyInitializationStart(java.util.Map<java.lang.String,java.lang.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, getDefaultAttributeModes
-
Methods inherited from class de.hybris.platform.jalo.extension.Extension
checkBeforeItemRemoval, createProjectData, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, isCreatorDisabled, onFirstSessionCreation, writeReplace
-
Methods 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 Detail
-
ITEMSAVEDVALUESRELATIONSAVEDVALUESHANDLER
protected static final OneToManyHandler<SavedValues> ITEMSAVEDVALUESRELATIONSAVEDVALUESHANDLER
for hmc legacy
OneToManyHandlerfor handling 1:n SAVEDVALUES's relation attributes from 'many' side.
-
-
Method Detail
-
init
public void init()
Description copied from class:Managercalled once for each tenant, so this method fits best to perform some initialization stuff
-
getName
public java.lang.String getName()
- Overrides:
getNamein classGeneratedServicelayerManager
-
getInstance
public static ServicelayerManager getInstance()
-
notifyAttributesChanged
protected void notifyAttributesChanged()
-
notifyItemRemoval
protected void notifyItemRemoval(SessionContext ctx, Item item)
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:
This method does nothing and may be overridden. CAUTION: This method will be called inside a transaction !!!
-
createEssentialData
public void createEssentialData(java.util.Map<java.lang.String,java.lang.String> params, JspContext jspc)- Overrides:
createEssentialDatain classExtension
-
afterSessionCreation
public void afterSessionCreation(JaloSession session)
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
public void afterSessionUserChange(JaloSession session, User previous)
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:
JaloSession.setUser(User)
-
afterSessionAttributeChange
public void afterSessionAttributeChange(JaloSession session, java.lang.String attributeName, java.lang.Object value)
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
protected boolean isEventActiveAttribute(java.lang.String attributeName)
-
beforeSessionClose
public void beforeSessionClose(JaloSession session)
Description copied from interface:JaloSessionListenerNotifies the extension manager if a session will be closed.- Specified by:
beforeSessionClosein interfaceJaloSessionListener- Parameters:
session- current session- See Also:
JaloSession.close()
-
notifyTenantRestart
public void notifyTenantRestart(Tenant tenant)
-
notifyInitializationEnd
public void notifyInitializationEnd(java.util.Map<java.lang.String,java.lang.String> params, JspContext ctx) throws java.lang.Exception- Overrides:
notifyInitializationEndin classExtension- Throws:
java.lang.Exception
-
notifyInitializationStart
public void notifyInitializationStart(java.util.Map<java.lang.String,java.lang.String> params, JspContext ctx) throws java.lang.Exception- Overrides:
notifyInitializationStartin classExtension- Throws:
java.lang.Exception
-
getSessionArtNamesFilter
public java.util.List<java.lang.String> getSessionArtNamesFilter()
- Returns:
- the sessionArtNamesFilter
-
getSavedValues
public java.util.Set<SavedValues> getSavedValues(Item item)
Getter of theItem.savedValuesattribute.- Returns:
- the savedValues
-
getOrCreateUserProfile
public UserProfile 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
public java.util.Set<Language> 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
public java.util.Set<Language> 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
public java.util.Set<Language> 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
public UserProfile getUserprofile(User item)
Generated method - Getter of theUser.userprofileattribute.- Returns:
- the userprofile
-
getUserprofile
public UserProfile getUserprofile(SessionContext ctx, User item)
Generated method - Getter of theUser.userprofileattribute.- Returns:
- the userprofile
-
setUserprofile
public void setUserprofile(SessionContext ctx, User item, UserProfile value)
Generated method - Setter of theUser.userprofileattribute.- Parameters:
value- the userprofile
-
setUserprofile
public void setUserprofile(User item, UserProfile value)
Generated method - Setter of theUser.userprofileattribute.- Parameters:
value- the userprofile
-
notifyClusterAboutTenantInitialization
public void notifyClusterAboutTenantInitialization(Tenant tenant)
-
publishEvent
public void publishEvent(AbstractEvent event)
-
getServiceLayerEnumerationValue
public <T extends HybrisEnumValue> T getServiceLayerEnumerationValue(java.lang.String enumerationCode, java.lang.String valueCode)
-
-