Package de.hybris.platform.jalo.user
Class User
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable
- Direct Known Subclasses:
GeneratedCustomer,GeneratedEmployee,MyTestUser
public class User extends GeneratedUser
Superclass of all hybris platform user types. A user always is identified by a login - password - pair, owns a name and an affiliate id , may belong to user groups. As a subclass of principal each user can be assigned permissions. Additionally permissions can be assigned to user groups which makes user right management easier.If you like to login a user you have to different ways. The first one is to transfer the session, the second one is to create a new session for the user. The example assumes you are working in a jsp. <code> String login = request.getParameter( "login" ); String passwd = request.getParameter( "password" ); //you may encrypt the password by using ssl. However the password will be delivered in plain text. Properties props = new Properties(); //a HashMap is fine as well prop.put( JaloSession.LoginProperties.LOGIN, login ); prop.put( JaloSession.LoginProperties.PASSWORD, passwd ); prop.put( JaloSession.LoginProperties.SESSION_TYPE, JaloSession.LoginProperties.SessionTypes.CUSTOMER ); getJaloSession().getConnection().transferSession( getJaloSession(), prop ); // transfer the current session to the given user. getJaloSession().getConnection().createSession(prop); //creates a new session for the given user. </code>- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.GenericItem
GenericItem.GenericItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LocalizableItem.LocalizableItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.ExtensibleItem
ExtensibleItem.ExtensibleItemImpl
-
Nested classes/interfaces inherited from class de.hybris.platform.jalo.Item
Item.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCURRENT_DATEDeprecated.since ages - it is a dynamic attribute nowstatic java.lang.StringCURRENT_TIMEDeprecated.since ages - it is a dynamic attribute nowstatic java.lang.StringDEFAULT_PAYMENT_ADDRESSDeprecated.since ages - UseGeneratedUser.DEFAULTPAYMENTADDRESSinsteadstatic java.lang.StringDEFAULT_SHIPPING_ADDRESSDeprecated.since ages - UseGeneratedUser.DEFAULTSHIPMENTADDRESSinsteadstatic java.lang.StringLAST_LOGINDeprecated.since ages - UseGeneratedUser.LASTLOGINinsteadstatic java.lang.StringLOGIN_DISABLEDDeprecated.since ages - UseGeneratedUser.LOGINDISABLEDinsteadstatic java.lang.StringPASSWORDDeprecated.since ages - it is a dynamic attribute nowstatic java.lang.StringPASSWORD_ANSWERDeprecated.since ages - UseGeneratedUser.PASSWORDANSWERinsteadstatic java.lang.StringPASSWORD_QUESTIONDeprecated.since ages - UseGeneratedUser.PASSWORDQUESTIONinsteadstatic java.lang.StringPAYMENT_MODESConstant identifier forpaymentModesattribute of User type.static java.lang.StringSESSION_CURRENCYDeprecated.since ages - UseSESSION_CURRENCYinsteadstatic java.lang.StringSESSION_LANGUAGEDeprecated.since ages - UseGeneratedUser.SESSIONLANGUAGEinsteadstatic java.lang.StringUSER_AUDIT_ENABLED-
Fields inherited from class de.hybris.platform.jalo.user.GeneratedUser
ADDRESSES, ADDRESSESHANDLER, CARTS, CARTSHANDLER, CONTACTINFOS, CONTACTINFOSHANDLER, DEACTIVATIONDATE, DEFAULT_INITIAL_ATTRIBUTES, DEFAULTPAYMENTADDRESS, DEFAULTSHIPMENTADDRESS, ENCODEDPASSWORD, HMCLOGINDISABLED, LASTLOGIN, LOGINDISABLED, ORDERS, ORDERSHANDLER, PASSWORDANSWER, PASSWORDENCODING, PASSWORDQUESTION, PAYMENTINFOS, PAYMENTINFOSHANDLER, QUOTES, QUOTESHANDLER, RETENTIONSTATE, SESSIONCURRENCY, SESSIONLANGUAGE, USERPROFILE
-
Fields inherited from class de.hybris.platform.jalo.security.Principal
ALLGROUPS, ALLSEARCHRESTRICTIONS, DISPLAYNAME, PRINCIPAL_GROUP_RELATION_NAME
-
Fields inherited from class de.hybris.platform.jalo.security.GeneratedPrincipal
DESCRIPTION, GROUPS, NAME, PRINCIPALGROUPRELATION_MARKMODIFIED, PRINCIPALGROUPRELATION_SRC_ORDERED, PRINCIPALGROUPRELATION_TGT_ORDERED, SEARCHRESTRICTIONS, SEARCHRESTRICTIONSHANDLER, UID
-
Fields inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
LANGUAGE_FALLBACK_ENABLED
-
Fields inherited from class de.hybris.platform.jalo.Item
_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, HJMPTS, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPE
-
Fields inherited from class de.hybris.platform.util.BridgeAbstraction
impl, tenant
-
-
Constructor Summary
Constructors Constructor Description User()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidauditUserPasswordChange(java.lang.String oldEncodedPassword, java.lang.String oldPasswordEncoding)booleancheckPassword(SessionContext ctx, java.lang.String plainPassword)Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)booleancheckPassword(LoginToken token)Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)booleancheckPassword(java.lang.String plainPassword)Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)protected java.util.List<PasswordPolicyViolation>checkPasswordPolicies(java.lang.String password, java.lang.String encoding)protected voidcheckRemovable(SessionContext ctx)Deprecated.since agesvoidcheckSystemPrincipal()Deprecated.since ages - useUserService.isAdminEmployee(UserModel)andUserService.isAnonymousUser(UserModel)AddresscreateAddress()Deprecated.since ages - useAddressService.createAddressForUser(UserModel)AddresscreateAddress(PK pk)Deprecated.since ages - useAddressService.createAddressForUser(UserModel)AddresscreateAddress(PK pk, SessionContext ctx)Deprecated.since ages - useAddressService.createAddressForUser(UserModel)AddresscreateAddress(PK pk, SessionContext ctx, java.util.Map fields)Deprecated.since agesAddresscreateAddress(PK pk, java.util.Map fields)Deprecated.since agesAddresscreateAddress(SessionContext ctx)Deprecated.since ages - useAddressService.createAddressForUser(UserModel)AddresscreateAddress(SessionContext ctx, java.util.Map fields)Deprecated.since ages - useAddressService.createAddressForUser(UserModel)AddresscreateAddress(java.util.Map fields)Deprecated.since ages - useAddressService.createAddressForUser(UserModel)protected ItemcreateItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)Has to be implemented for each concrete subtype of item.PaymentInfocreatePaymentInfo(SessionContext ctx, java.lang.String code)Deprecated.since ages - usePaymentInfoService.createPaymentInfoForUser(UserModel, String)PaymentInfocreatePaymentInfo(java.lang.String code)Deprecated.since ages - usePaymentInfoService.createPaymentInfoForUser(UserModel, String)java.util.CollectiongetAllAddresses()Deprecated.since ages - useGeneratedUser.getAddresses()insteadjava.util.Map<Language,java.lang.String>getAllDisplayName(SessionContext ctx)Deprecated.since ages - usePrincipalModel.getDisplayName(java.util.Locale)CartgetCart(java.lang.String code)TheCartwith code.java.util.DategetCurrentDate()Deprecated.since ages - useTimeService.getCurrentTime()java.util.DategetCurrentDate(SessionContext ctx)Deprecated.since ages - useTimeService.getCurrentDateWithTimeNormalized()protected java.util.DategetCurrentDateOldStyle()java.util.DategetCurrentTime()Deprecated.since ages - useTimeService.getCurrentTime()java.util.DategetCurrentTime(SessionContext ctx)Deprecated.since ages - useTimeService.getCurrentTime()AddressgetDefaultDeliveryAddress()Gets the default shipment address of this user.AddressgetDefaultDeliveryAddress(SessionContext ctx)Gets the default shipment address of this user.AddressgetDefaultShippingAddress()Deprecated.since ages - please usegetDefaultDeliveryAddress()insteadAddressgetDefaultShippingAddress(SessionContext ctx)Deprecated.since ages - please usegetDefaultDeliveryAddress(SessionContext)insteadjava.lang.StringgetDisplayName(SessionContext ctx)Deprecated.since ages - usePrincipalModel.getDisplayName()protected PasswordEncodergetEncoder(java.lang.String encoding)java.lang.StringgetLogin()Deprecated.since ages - useGeneratedPrincipal.getUid()java.lang.StringgetLogin(SessionContext ctx)Deprecated.since ages - usePrincipal.getUid(SessionContext)java.lang.StringgetPassword()Deprecated.since ages - it is recommended to useGeneratedUser.getEncodedPassword()instead, cause it can lead to problems in case of hashed passwords (e.g md5).java.lang.StringgetPassword(SessionContext ctx)Deprecated.since ages - it is recommended to useGeneratedUser.getEncodedPassword(SessionContext)instead, cause it can lead to problems in case of hashed passwords (e.g md5).protected java.lang.StringgetRealEncoding(java.lang.String optionalEncoding)booleanisAdmin()Deprecated.since ages - useUserService.isAdmin(UserModel)booleanisAdminEmployee()Deprecated.since ages - useUserService.isAdminEmployee(UserModel)booleanisAnonymousCustomer()Deprecated.since ages - useUserService.isAnonymousUser(UserModel)CartsaveCurrentCart(SessionContext ctx, java.lang.String code)Deprecated.CartsaveCurrentCart(java.lang.String code)Deprecated.voidsetDefaultDeliveryAddress(SessionContext ctx, Address adr)Sets an address as default shipment address for this user.voidsetDefaultDeliveryAddress(Address adr)Sets an address as default shipment address for this user.voidsetDefaultShippingAddress(SessionContext ctx, Address adr)Deprecated.since ages - please usesetDefaultDeliveryAddress(SessionContext, Address)insteadvoidsetDefaultShippingAddress(Address adr)Deprecated.since ages - please usesetDefaultDeliveryAddress(Address)insteadvoidsetEncodedPassword(SessionContext ctx, java.lang.String password)Changes decoded form of the password of this user.voidsetEncodedPassword(SessionContext ctx, java.lang.String password, java.lang.String encoding)Deprecated.since ages - useUserService.setEncodedPassword(UserModel, String, String)voidsetEncodedPassword(java.lang.String password)Changes decoded form of the password of this user.voidsetEncodedPassword(java.lang.String password, java.lang.String encoding)Deprecated.since ages - useUserService.setEncodedPassword(UserModel, String)voidsetLogin(SessionContext ctx, java.lang.String login)Deprecated.since ages - usesetUid(SessionContext, String)voidsetLogin(java.lang.String login)Deprecated.since ages - useGeneratedPrincipal.setUid(String)voidsetLoginDisabled(SessionContext ctx, java.lang.Boolean disabled)Changes login-disabled status for this user.voidsetPassword(SessionContext ctx, java.lang.String password)Deprecated.since ages - UseUserService.setPassword(UserModel, String)voidsetPassword(SessionContext ctx, java.lang.String newPassword, java.lang.String encoding)Deprecated.since ages - UseUserService.setPassword(UserModel, String, String)voidsetPassword(java.lang.String password)Deprecated.since ages - UseUserService.setPassword(UserModel, String)voidsetPassword(java.lang.String password, java.lang.String encoding)Deprecated.since ages - UseUserService.setPassword(UserModel, String, String)voidsetUid(SessionContext ctx, java.lang.String value)Generated method - Setter of thePrincipal.uidattribute.-
Methods inherited from class de.hybris.platform.jalo.user.GeneratedUser
addToAddresses, addToAddresses, addToCarts, addToCarts, addToContactInfos, addToContactInfos, addToOrders, addToOrders, addToPaymentInfos, addToPaymentInfos, addToQuotes, addToQuotes, getAddresses, getAddresses, getCarts, getCarts, getContactInfos, getContactInfos, getDeactivationDate, getDeactivationDate, getDefaultAttributeModes, getDefaultPaymentAddress, getDefaultPaymentAddress, getDefaultShipmentAddress, getDefaultShipmentAddress, getEncodedPassword, getEncodedPassword, getLastLogin, getLastLogin, getOrders, getOrders, getPasswordAnswer, getPasswordAnswer, getPasswordEncoding, getPasswordEncoding, getPasswordQuestion, getPasswordQuestion, getPaymentInfos, getPaymentInfos, getQuotes, getQuotes, getRetentionState, getRetentionState, getSessionCurrency, getSessionCurrency, getSessionLanguage, getSessionLanguage, getUserprofile, getUserprofile, isHmcLoginDisabled, isHmcLoginDisabled, isHmcLoginDisabledAsPrimitive, isHmcLoginDisabledAsPrimitive, isLoginDisabled, isLoginDisabled, isLoginDisabledAsPrimitive, isLoginDisabledAsPrimitive, removeFromAddresses, removeFromAddresses, removeFromCarts, removeFromCarts, removeFromContactInfos, removeFromContactInfos, removeFromOrders, removeFromOrders, removeFromPaymentInfos, removeFromPaymentInfos, removeFromQuotes, removeFromQuotes, setAddresses, setAddresses, setCarts, setCarts, setContactInfos, setContactInfos, setDeactivationDate, setDeactivationDate, setDefaultPaymentAddress, setDefaultPaymentAddress, setDefaultShipmentAddress, setDefaultShipmentAddress, setHmcLoginDisabled, setHmcLoginDisabled, setHmcLoginDisabled, setHmcLoginDisabled, setLastLogin, setLastLogin, setLoginDisabled, setLoginDisabled, setLoginDisabled, setOrders, setOrders, setPasswordAnswer, setPasswordAnswer, setPasswordEncoding, setPasswordEncoding, setPasswordQuestion, setPasswordQuestion, setPaymentInfos, setPaymentInfos, setQuotes, setQuotes, setRetentionState, setRetentionState, setSessionCurrency, setSessionCurrency, setSessionLanguage, setSessionLanguage, setUserprofile, setUserprofile
-
Methods inherited from class de.hybris.platform.jalo.security.Principal
addGlobalNegativePermission, addGlobalPermission, addGlobalPermissions, addGlobalPositivePermission, addToGroup, checkConsistencyUid, checkGlobalPermission, checkOwnGlobalPermission, clearGlobalPermission, clearGlobalPermissions, getAllDisplayName, getAllGlobalNegativePermissions, getAllGlobalPositivePermissions, getAllGroups, getAllGroups, getAllSearchRestrictions, getAllSearchRestrictions, getDisplayName, getGlobalNegativePermissions, getGlobalPermissions, getGlobalPositivePermissions, getGroups, getItemPermissionsMap, getUid, getUID, isMemberOf, isMemberOf, remove, removeFromGroup, setGroups, setItemPermissionsByMap, setUID, toString
-
Methods inherited from class de.hybris.platform.jalo.security.GeneratedPrincipal
addToGroups, addToGroups, getDescription, getDescription, getGroups, getGroupsCount, getGroupsCount, getName, getName, getSearchRestrictions, getSearchRestrictions, getUid, isMarkModifiedDisabled, removeFromGroups, removeFromGroups, setDescription, setDescription, setGroups, setName, setName, setUid
-
Methods inherited from class de.hybris.platform.jalo.GenericItem
getImplementation, getInitialProperties, getNonInitialAttributes, getRelatedItems, setRelatedItems
-
Methods inherited from class de.hybris.platform.jalo.c2l.LocalizableItem
getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedProperty
-
Methods inherited from class de.hybris.platform.jalo.ExtensibleItem
createNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setProperty
-
Methods inherited from class de.hybris.platform.jalo.Item
addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, notifyManagerAboutItemRemoval, readResolve, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplace
-
Methods inherited from class de.hybris.platform.util.BridgeAbstraction
setTenant
-
-
-
-
Field Detail
-
USER_AUDIT_ENABLED
public static final java.lang.String USER_AUDIT_ENABLED
- See Also:
- Constant Field Values
-
DEFAULT_PAYMENT_ADDRESS
@Deprecated public static final java.lang.String DEFAULT_PAYMENT_ADDRESS
Deprecated.since ages - UseGeneratedUser.DEFAULTPAYMENTADDRESSinsteadConstant identifier fordefaultPaymentAddressattribute of User type.- See Also:
- Constant Field Values
-
DEFAULT_SHIPPING_ADDRESS
@Deprecated public static final java.lang.String DEFAULT_SHIPPING_ADDRESS
Deprecated.since ages - UseGeneratedUser.DEFAULTSHIPMENTADDRESSinsteadConstant identifier fordefaultShipmentAddressattribute of User type.- See Also:
- Constant Field Values
-
PASSWORD_QUESTION
@Deprecated public static final java.lang.String PASSWORD_QUESTION
Deprecated.since ages - UseGeneratedUser.PASSWORDQUESTIONinsteadConstant identifier forpasswordQuestionattribute of User type.- See Also:
- Constant Field Values
-
PASSWORD_ANSWER
@Deprecated public static final java.lang.String PASSWORD_ANSWER
Deprecated.since ages - UseGeneratedUser.PASSWORDANSWERinsteadConstant identifier forpasswordAnswerattribute of User type.- See Also:
- Constant Field Values
-
PAYMENT_MODES
public static final java.lang.String PAYMENT_MODES
Constant identifier forpaymentModesattribute of User type.- See Also:
- Constant Field Values
-
SESSION_LANGUAGE
@Deprecated public static final java.lang.String SESSION_LANGUAGE
Deprecated.since ages - UseGeneratedUser.SESSIONLANGUAGEinsteadConstant identifier forsessionLanguageattribute of User type.- See Also:
- Constant Field Values
-
SESSION_CURRENCY
@Deprecated public static final java.lang.String SESSION_CURRENCY
Deprecated.since ages - UseSESSION_CURRENCYinsteadConstant identifier forsessionCurrencyattribute of User type.- See Also:
- Constant Field Values
-
LOGIN_DISABLED
@Deprecated public static final java.lang.String LOGIN_DISABLED
Deprecated.since ages - UseGeneratedUser.LOGINDISABLEDinsteadConstant identifier forloginDisabledattribute of User type.- See Also:
- Constant Field Values
-
LAST_LOGIN
@Deprecated public static final java.lang.String LAST_LOGIN
Deprecated.since ages - UseGeneratedUser.LASTLOGINinsteadConstant identifier forlastLoginattribute of User type.- See Also:
- Constant Field Values
-
CURRENT_TIME
@Deprecated public static final java.lang.String CURRENT_TIME
Deprecated.since ages - it is a dynamic attribute nowConstant identifier forcurrentTimeattribute of User type.- See Also:
- Constant Field Values
-
CURRENT_DATE
@Deprecated public static final java.lang.String CURRENT_DATE
Deprecated.since ages - it is a dynamic attribute nowConstant identifier forcurrentDateattribute of User type.- See Also:
- Constant Field Values
-
PASSWORD
@Deprecated public static final java.lang.String PASSWORD
Deprecated.since ages - it is a dynamic attribute nowConstant identifier forpasswordattribute of User type.- See Also:
- Constant Field Values
-
-
Method Detail
-
createItem
protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
Description copied from class:ItemHas to be implemented for each concrete subtype of item. This method is responsible for creating a new item instance ( by calling managers, ejb homes, etc. ) duringComposedType.newInstance(Map).In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap)too.
Sn example:public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) ); // here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes( SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret = super.getNonInitialAttributes( ctx, allAttributes ); // remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }- Overrides:
createItemin classGenericItem- Parameters:
ctx- the current session context which this item is created withintype- the actual item type ( since subtypes may not provide a own jalo class this may be different from the type which this method was implemented for )- Returns:
- the new item instance
- Throws:
JaloBusinessException- indicates an error during creation - any changes will be rollbacked
-
checkSystemPrincipal
@Deprecated public void checkSystemPrincipal() throws ConsistencyCheckExceptionDeprecated.since ages - useUserService.isAdminEmployee(UserModel)andUserService.isAnonymousUser(UserModel)- Specified by:
checkSystemPrincipalin classPrincipal- Throws:
ConsistencyCheckException
-
setUid
public void setUid(SessionContext ctx, java.lang.String value) throws ConsistencyCheckException
Description copied from class:GeneratedPrincipalGenerated method - Setter of thePrincipal.uidattribute.- Overrides:
setUidin classGeneratedPrincipalvalue- the uid- Throws:
ConsistencyCheckException
-
getEncoder
protected PasswordEncoder getEncoder(java.lang.String encoding) throws PasswordEncoderNotFoundException
- Throws:
PasswordEncoderNotFoundException
-
getCurrentTime
@Deprecated public java.util.Date getCurrentTime(SessionContext ctx)
Deprecated.since ages - useTimeService.getCurrentTime()Returns the current time for this user. Returns the same time asTimeService, which means that it may be adjusted by some delta.- Since:
- 1.31
-
getCurrentTime
@Deprecated public java.util.Date getCurrentTime()
Deprecated.since ages - useTimeService.getCurrentTime()Old jalo generated method from GeneratedUser - Getter of theUser.currentTimeattribute.- Returns:
- the currentTime
-
getCurrentDate
@Deprecated public java.util.Date getCurrentDate(SessionContext ctx)
Deprecated.since ages - useTimeService.getCurrentDateWithTimeNormalized()Returns the current date for this user. Right now this just returnsnew Date()with hour, minutes and seconds set to 0, but may be overridden to implement user timezone dependent time.- Since:
- 1.31
-
getCurrentDate
@Deprecated public java.util.Date getCurrentDate()
Deprecated.since ages - useTimeService.getCurrentTime()old jalo generated method from GeneratedUser - Getter of theUser.currentDateattribute.- Returns:
- the currentDate
-
getCurrentDateOldStyle
protected java.util.Date getCurrentDateOldStyle()
-
getLogin
@Deprecated public java.lang.String getLogin()
Deprecated.since ages - useGeneratedPrincipal.getUid()The login name of this user. The real name of the user is accessible byGeneratedPrincipal.getName().- Returns:
- the login name of this user
-
getLogin
@Deprecated public java.lang.String getLogin(SessionContext ctx)
Deprecated.since ages - usePrincipal.getUid(SessionContext)The login name of this user. The real name of the user is accessible byGeneratedPrincipal.getName().- Returns:
- the login name of this user
-
setLogin
@Deprecated public void setLogin(java.lang.String login) throws ConsistencyCheckExceptionDeprecated.since ages - useGeneratedPrincipal.setUid(String)Changes the login name of this user.- Parameters:
login- the login name of this user. should not benull- Throws:
ConsistencyCheckException- if there is already a user with this login name
-
setLogin
@Deprecated public void setLogin(SessionContext ctx, java.lang.String login) throws ConsistencyCheckException
Deprecated.since ages - usesetUid(SessionContext, String)Changes the login name of this user.- Parameters:
login- the login name of this user. should not benull- Throws:
ConsistencyCheckException- if there is already a user with this login name
-
getPassword
@Deprecated public java.lang.String getPassword() throws CannotDecodePasswordException, PasswordEncoderNotFoundExceptionDeprecated.since ages - it is recommended to useGeneratedUser.getEncodedPassword()instead, cause it can lead to problems in case of hashed passwords (e.g md5). This is now a dynamic attribute with read set to false.The password of this user.
-
getPassword
@Deprecated public java.lang.String getPassword(SessionContext ctx) throws CannotDecodePasswordException, PasswordEncoderNotFoundException
Deprecated.since ages - it is recommended to useGeneratedUser.getEncodedPassword(SessionContext)instead, cause it can lead to problems in case of hashed passwords (e.g md5). This is now a dynamic attribute with read set to false.The password of this user.
-
setPassword
@Deprecated public void setPassword(java.lang.String password) throws PasswordEncoderNotFoundExceptionDeprecated.since ages - UseUserService.setPassword(UserModel, String)Changes the password of this user.- Parameters:
password-- Throws:
PasswordEncoderNotFoundException
-
setPassword
@Deprecated public void setPassword(java.lang.String password, java.lang.String encoding) throws PasswordEncoderNotFoundExceptionDeprecated.since ages - UseUserService.setPassword(UserModel, String, String)Changes the password of this user.- Parameters:
password-- Throws:
PasswordEncoderNotFoundException
-
setPassword
@Deprecated public void setPassword(SessionContext ctx, java.lang.String password)
Deprecated.since ages - UseUserService.setPassword(UserModel, String)Changes the password of this user.- Parameters:
password-
-
getRealEncoding
protected java.lang.String getRealEncoding(java.lang.String optionalEncoding)
-
setPassword
@Deprecated public void setPassword(SessionContext ctx, java.lang.String newPassword, java.lang.String encoding) throws PasswordEncoderNotFoundException
Deprecated.since ages - UseUserService.setPassword(UserModel, String, String)Changes the password of this user.- Parameters:
newPassword-- Throws:
PasswordEncoderNotFoundException
-
auditUserPasswordChange
protected void auditUserPasswordChange(java.lang.String oldEncodedPassword, java.lang.String oldPasswordEncoding)
-
checkPasswordPolicies
protected java.util.List<PasswordPolicyViolation> checkPasswordPolicies(java.lang.String password, java.lang.String encoding)
-
setEncodedPassword
public void setEncodedPassword(java.lang.String password)
Changes decoded form of the password of this user.- Overrides:
setEncodedPasswordin classGeneratedUser- Parameters:
password-
-
setEncodedPassword
@Deprecated public void setEncodedPassword(java.lang.String password, java.lang.String encoding)Deprecated.since ages - useUserService.setEncodedPassword(UserModel, String)Changes decoded form of the password of this user.- Parameters:
password-
-
setEncodedPassword
public void setEncodedPassword(SessionContext ctx, java.lang.String password)
Changes decoded form of the password of this user.- Overrides:
setEncodedPasswordin classGeneratedUser- Parameters:
password-
-
setEncodedPassword
@Deprecated public void setEncodedPassword(SessionContext ctx, java.lang.String password, java.lang.String encoding)
Deprecated.since ages - useUserService.setEncodedPassword(UserModel, String, String)Changes decoded form of the password of this user.- Parameters:
password-
-
checkPassword
@Deprecated public boolean checkPassword(java.lang.String plainPassword)
Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)checks a plain text password against the stored one.- Parameters:
plainPassword-
-
checkPassword
@Deprecated public boolean checkPassword(LoginToken token)
Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)
-
checkPassword
@Deprecated public boolean checkPassword(SessionContext ctx, java.lang.String plainPassword)
Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)Checks a plain text password against the stored one.- Parameters:
plainPassword-
-
setLoginDisabled
public void setLoginDisabled(SessionContext ctx, java.lang.Boolean disabled)
Changes login-disabled status for this user.- Overrides:
setLoginDisabledin classGeneratedUserdisabled- the loginDisabled - Determines whether user is allowed to login to system.
-
getAllAddresses
@Deprecated public java.util.Collection getAllAddresses()
Deprecated.since ages - useGeneratedUser.getAddresses()insteadAll addresses of this user.
-
createAddress
@Deprecated public Address createAddress()
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)Creates a new address for this user. To remove an address use itsremovemethod !
-
createAddress
@Deprecated public Address createAddress(PK pk)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)Creates a new address for this user. To remove an address use itsremovemethod !
-
createAddress
@Deprecated public Address createAddress(SessionContext ctx)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)Creates a new address for this user. To remove an address use itsremovemethod !
-
createAddress
@Deprecated public Address createAddress(PK pk, SessionContext ctx)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)Creates a new address for this user. To remove an address use itsremovemethod !
-
createAddress
@Deprecated public Address createAddress(java.util.Map fields)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)Creates a new address for this user, filled with the fields given in the parameter map. To remove an address use itsremovemethod !
-
createAddress
@Deprecated public Address createAddress(PK pk, java.util.Map fields)
Deprecated.since agesCreates a new address for this user, filled with the fields given in the parameter map. To remove an address use itsremovemethod !
-
createAddress
@Deprecated public Address createAddress(SessionContext ctx, java.util.Map fields)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)Creates a new address for this user, filled with the fields given in the parameter map. To remove an address use itsremovemethod !
-
createAddress
@Deprecated public Address createAddress(PK pk, SessionContext ctx, java.util.Map fields)
Deprecated.since agesCreates a new address for this user, filled with the fields given in the parameter map. To remove an address use itsremovemethod !
-
getDefaultShippingAddress
@Deprecated public Address getDefaultShippingAddress()
Deprecated.since ages - please usegetDefaultDeliveryAddress()insteadGets the default shipment address of this user. This may returnnullif no such address was set.
-
getDefaultShippingAddress
@Deprecated public Address getDefaultShippingAddress(SessionContext ctx)
Deprecated.since ages - please usegetDefaultDeliveryAddress(SessionContext)insteadGets the default shipment address of this user. This may returnnullif no such address was set.
-
getDefaultDeliveryAddress
public Address getDefaultDeliveryAddress()
Gets the default shipment address of this user. This may returnnullif no such address was set.
-
getDefaultDeliveryAddress
public Address getDefaultDeliveryAddress(SessionContext ctx)
Gets the default shipment address of this user. This may returnnullif no such address was set.
-
setDefaultShippingAddress
@Deprecated public void setDefaultShippingAddress(Address adr)
Deprecated.since ages - please usesetDefaultDeliveryAddress(Address)insteadSets an address as default shipment address for this user. This address must belong to the user !- Parameters:
adr-
-
setDefaultShippingAddress
@Deprecated public void setDefaultShippingAddress(SessionContext ctx, Address adr)
Deprecated.since ages - please usesetDefaultDeliveryAddress(SessionContext, Address)insteadSets an address as default shipment address for this user. This address must belong to the user !- Parameters:
adr-
-
setDefaultDeliveryAddress
public void setDefaultDeliveryAddress(Address adr)
Sets an address as default shipment address for this user. This address must belong to the user !- Parameters:
adr-
-
setDefaultDeliveryAddress
public void setDefaultDeliveryAddress(SessionContext ctx, Address adr)
Sets an address as default shipment address for this user. This address must belong to the user !- Parameters:
adr-
-
createPaymentInfo
@Deprecated public PaymentInfo createPaymentInfo(java.lang.String code)
Deprecated.since ages - usePaymentInfoService.createPaymentInfoForUser(UserModel, String)Creates a PaymentInfo object for this user.- Parameters:
code- a user defined code for this PaymentInfo
-
createPaymentInfo
@Deprecated public PaymentInfo createPaymentInfo(SessionContext ctx, java.lang.String code)
Deprecated.since ages - usePaymentInfoService.createPaymentInfoForUser(UserModel, String)Creates a PaymentInfo object for this user.- Parameters:
ctx-code- a user defined code for this PaymentInfo
-
saveCurrentCart
@Deprecated public Cart saveCurrentCart(java.lang.String code) throws ConsistencyCheckException
Deprecated.Creates a new persistentcartbelonging to this user as copy of the current session cart.- Throws:
ConsistencyCheckException
-
saveCurrentCart
@Deprecated public Cart saveCurrentCart(SessionContext ctx, java.lang.String code) throws ConsistencyCheckException
Deprecated.Creates a new persistentcartbelonging to this user as copy of the current session cart.- Throws:
ConsistencyCheckException
-
getCart
public Cart getCart(java.lang.String code)
TheCartwith code.- Parameters:
code- code of the Cart
-
isAdmin
@Deprecated public boolean isAdmin()
Deprecated.since ages - useUserService.isAdmin(UserModel)Checks whether this user has admin status. This is true if the user is the admin user or is (even recursive) member of the admin group.
-
isAdminEmployee
@Deprecated public boolean isAdminEmployee()
Deprecated.since ages - useUserService.isAdminEmployee(UserModel)Returns true if the current user is the admin employee.
-
isAnonymousCustomer
@Deprecated public boolean isAnonymousCustomer()
Deprecated.since ages - useUserService.isAnonymousUser(UserModel)Returnstrue, if thisCustomeris the default anonymousCustomerinstance of this system. The anonymousCustomeris used for unauthorizedJaloSessions.- Returns:
trueif thisCustomeris the default anonymousCustomerinstance of this system
-
getDisplayName
@Deprecated public java.lang.String getDisplayName(SessionContext ctx)
Deprecated.since ages - usePrincipalModel.getDisplayName()- Specified by:
getDisplayNamein classPrincipal- Returns:
- the displayName
-
getAllDisplayName
@Deprecated public java.util.Map<Language,java.lang.String> getAllDisplayName(SessionContext ctx)
Deprecated.since ages - usePrincipalModel.getDisplayName(java.util.Locale)Description copied from class:PrincipalOld jalo generated method from GeneratedPrincipal - Getter of thePrincipal.displayNamejalo localized attribute.- Specified by:
getAllDisplayNamein classPrincipal- Returns:
- the localized displayName
-
checkRemovable
@Deprecated protected void checkRemovable(SessionContext ctx) throws ConsistencyCheckException
Deprecated.since agesDescription copied from class:ItemChecks whether or not this it may be removed or not. Called before the actual removal process.- Overrides:
checkRemovablein classItem- Throws:
ConsistencyCheckException- to indicate that the item cannot be removed
-
-