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.String
CURRENT_DATE
Deprecated.since ages - it is a dynamic attribute nowstatic java.lang.String
CURRENT_TIME
Deprecated.since ages - it is a dynamic attribute nowstatic java.lang.String
DEFAULT_PAYMENT_ADDRESS
Deprecated.since ages - UseGeneratedUser.DEFAULTPAYMENTADDRESS
insteadstatic java.lang.String
DEFAULT_SHIPPING_ADDRESS
Deprecated.since ages - UseGeneratedUser.DEFAULTSHIPMENTADDRESS
insteadstatic java.lang.String
LAST_LOGIN
Deprecated.since ages - UseGeneratedUser.LASTLOGIN
insteadstatic java.lang.String
LOGIN_DISABLED
Deprecated.since ages - UseGeneratedUser.LOGINDISABLED
insteadstatic java.lang.String
PASSWORD
Deprecated.since ages - it is a dynamic attribute nowstatic java.lang.String
PASSWORD_ANSWER
Deprecated.since ages - UseGeneratedUser.PASSWORDANSWER
insteadstatic java.lang.String
PASSWORD_QUESTION
Deprecated.since ages - UseGeneratedUser.PASSWORDQUESTION
insteadstatic java.lang.String
PAYMENT_MODES
Constant identifier forpaymentModes
attribute of User type.static java.lang.String
SESSION_CURRENCY
Deprecated.since ages - UseSESSION_CURRENCY
insteadstatic java.lang.String
SESSION_LANGUAGE
Deprecated.since ages - UseGeneratedUser.SESSIONLANGUAGE
insteadstatic java.lang.String
USER_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 void
auditUserPasswordChange(java.lang.String oldEncodedPassword, java.lang.String oldPasswordEncoding)
boolean
checkPassword(SessionContext ctx, java.lang.String plainPassword)
Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)
boolean
checkPassword(LoginToken token)
Deprecated.since ages - useAuthenticationService.checkCredentials(String, String)
boolean
checkPassword(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 void
checkRemovable(SessionContext ctx)
Deprecated.since agesvoid
checkSystemPrincipal()
Deprecated.since ages - useUserService.isAdminEmployee(UserModel)
andUserService.isAnonymousUser(UserModel)
Address
createAddress()
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)
Address
createAddress(PK pk)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)
Address
createAddress(PK pk, SessionContext ctx)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)
Address
createAddress(PK pk, SessionContext ctx, java.util.Map fields)
Deprecated.since agesAddress
createAddress(PK pk, java.util.Map fields)
Deprecated.since agesAddress
createAddress(SessionContext ctx)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)
Address
createAddress(SessionContext ctx, java.util.Map fields)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)
Address
createAddress(java.util.Map fields)
Deprecated.since ages - useAddressService.createAddressForUser(UserModel)
protected Item
createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.PaymentInfo
createPaymentInfo(SessionContext ctx, java.lang.String code)
Deprecated.since ages - usePaymentInfoService.createPaymentInfoForUser(UserModel, String)
PaymentInfo
createPaymentInfo(java.lang.String code)
Deprecated.since ages - usePaymentInfoService.createPaymentInfoForUser(UserModel, String)
java.util.Collection
getAllAddresses()
Deprecated.since ages - useGeneratedUser.getAddresses()
insteadjava.util.Map<Language,java.lang.String>
getAllDisplayName(SessionContext ctx)
Deprecated.since ages - usePrincipalModel.getDisplayName(java.util.Locale)
Cart
getCart(java.lang.String code)
TheCart
with code.java.util.Date
getCurrentDate()
Deprecated.since ages - useTimeService.getCurrentTime()
java.util.Date
getCurrentDate(SessionContext ctx)
Deprecated.since ages - useTimeService.getCurrentDateWithTimeNormalized()
protected java.util.Date
getCurrentDateOldStyle()
java.util.Date
getCurrentTime()
Deprecated.since ages - useTimeService.getCurrentTime()
java.util.Date
getCurrentTime(SessionContext ctx)
Deprecated.since ages - useTimeService.getCurrentTime()
Address
getDefaultDeliveryAddress()
Gets the default shipment address of this user.Address
getDefaultDeliveryAddress(SessionContext ctx)
Gets the default shipment address of this user.Address
getDefaultShippingAddress()
Deprecated.since ages - please usegetDefaultDeliveryAddress()
insteadAddress
getDefaultShippingAddress(SessionContext ctx)
Deprecated.since ages - please usegetDefaultDeliveryAddress(SessionContext)
insteadjava.lang.String
getDisplayName(SessionContext ctx)
Deprecated.since ages - usePrincipalModel.getDisplayName()
protected PasswordEncoder
getEncoder(java.lang.String encoding)
java.lang.String
getLogin()
Deprecated.since ages - useGeneratedPrincipal.getUid()
java.lang.String
getLogin(SessionContext ctx)
Deprecated.since ages - usePrincipal.getUid(SessionContext)
java.lang.String
getPassword()
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.String
getPassword(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.String
getRealEncoding(java.lang.String optionalEncoding)
boolean
isAdmin()
Deprecated.since ages - useUserService.isAdmin(UserModel)
boolean
isAdminEmployee()
Deprecated.since ages - useUserService.isAdminEmployee(UserModel)
boolean
isAnonymousCustomer()
Deprecated.since ages - useUserService.isAnonymousUser(UserModel)
Cart
saveCurrentCart(SessionContext ctx, java.lang.String code)
Deprecated.Cart
saveCurrentCart(java.lang.String code)
Deprecated.void
setDefaultDeliveryAddress(SessionContext ctx, Address adr)
Sets an address as default shipment address for this user.void
setDefaultDeliveryAddress(Address adr)
Sets an address as default shipment address for this user.void
setDefaultShippingAddress(SessionContext ctx, Address adr)
Deprecated.since ages - please usesetDefaultDeliveryAddress(SessionContext, Address)
insteadvoid
setDefaultShippingAddress(Address adr)
Deprecated.since ages - please usesetDefaultDeliveryAddress(Address)
insteadvoid
setEncodedPassword(SessionContext ctx, java.lang.String password)
Changes decoded form of the password of this user.void
setEncodedPassword(SessionContext ctx, java.lang.String password, java.lang.String encoding)
Deprecated.since ages - useUserService.setEncodedPassword(UserModel, String, String)
void
setEncodedPassword(java.lang.String password)
Changes decoded form of the password of this user.void
setEncodedPassword(java.lang.String password, java.lang.String encoding)
Deprecated.since ages - useUserService.setEncodedPassword(UserModel, String)
void
setLogin(SessionContext ctx, java.lang.String login)
Deprecated.since ages - usesetUid(SessionContext, String)
void
setLogin(java.lang.String login)
Deprecated.since ages - useGeneratedPrincipal.setUid(String)
void
setLoginDisabled(SessionContext ctx, java.lang.Boolean disabled)
Changes login-disabled status for this user.void
setPassword(SessionContext ctx, java.lang.String password)
Deprecated.since ages - UseUserService.setPassword(UserModel, String)
void
setPassword(SessionContext ctx, java.lang.String newPassword, java.lang.String encoding)
Deprecated.since ages - UseUserService.setPassword(UserModel, String, String)
void
setPassword(java.lang.String password)
Deprecated.since ages - UseUserService.setPassword(UserModel, String)
void
setPassword(java.lang.String password, java.lang.String encoding)
Deprecated.since ages - UseUserService.setPassword(UserModel, String, String)
void
setUid(SessionContext ctx, java.lang.String value)
Generated method - Setter of thePrincipal.uid
attribute.-
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.DEFAULTPAYMENTADDRESS
insteadConstant identifier fordefaultPaymentAddress
attribute 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.DEFAULTSHIPMENTADDRESS
insteadConstant identifier fordefaultShipmentAddress
attribute of User type.- See Also:
- Constant Field Values
-
PASSWORD_QUESTION
@Deprecated public static final java.lang.String PASSWORD_QUESTION
Deprecated.since ages - UseGeneratedUser.PASSWORDQUESTION
insteadConstant identifier forpasswordQuestion
attribute of User type.- See Also:
- Constant Field Values
-
PASSWORD_ANSWER
@Deprecated public static final java.lang.String PASSWORD_ANSWER
Deprecated.since ages - UseGeneratedUser.PASSWORDANSWER
insteadConstant identifier forpasswordAnswer
attribute of User type.- See Also:
- Constant Field Values
-
PAYMENT_MODES
public static final java.lang.String PAYMENT_MODES
Constant identifier forpaymentModes
attribute of User type.- See Also:
- Constant Field Values
-
SESSION_LANGUAGE
@Deprecated public static final java.lang.String SESSION_LANGUAGE
Deprecated.since ages - UseGeneratedUser.SESSIONLANGUAGE
insteadConstant identifier forsessionLanguage
attribute of User type.- See Also:
- Constant Field Values
-
SESSION_CURRENCY
@Deprecated public static final java.lang.String SESSION_CURRENCY
Deprecated.since ages - UseSESSION_CURRENCY
insteadConstant identifier forsessionCurrency
attribute of User type.- See Also:
- Constant Field Values
-
LOGIN_DISABLED
@Deprecated public static final java.lang.String LOGIN_DISABLED
Deprecated.since ages - UseGeneratedUser.LOGINDISABLED
insteadConstant identifier forloginDisabled
attribute of User type.- See Also:
- Constant Field Values
-
LAST_LOGIN
@Deprecated public static final java.lang.String LAST_LOGIN
Deprecated.since ages - UseGeneratedUser.LASTLOGIN
insteadConstant identifier forlastLogin
attribute 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 forcurrentTime
attribute 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 forcurrentDate
attribute 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 forpassword
attribute 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:Item
Has 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:
createItem
in 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 ConsistencyCheckException
Deprecated.since ages - useUserService.isAdminEmployee(UserModel)
andUserService.isAnonymousUser(UserModel)
- Specified by:
checkSystemPrincipal
in classPrincipal
- Throws:
ConsistencyCheckException
-
setUid
public void setUid(SessionContext ctx, java.lang.String value) throws ConsistencyCheckException
Description copied from class:GeneratedPrincipal
Generated method - Setter of thePrincipal.uid
attribute.- Overrides:
setUid
in classGeneratedPrincipal
value
- 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.currentTime
attribute.- 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.currentDate
attribute.- 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 ConsistencyCheckException
Deprecated.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, PasswordEncoderNotFoundException
Deprecated.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 PasswordEncoderNotFoundException
Deprecated.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 PasswordEncoderNotFoundException
Deprecated.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:
setEncodedPassword
in 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:
setEncodedPassword
in 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:
setLoginDisabled
in classGeneratedUser
disabled
- 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 itsremove
method !
-
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 itsremove
method !
-
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 itsremove
method !
-
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 itsremove
method !
-
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 itsremove
method !
-
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 itsremove
method !
-
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 itsremove
method !
-
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 itsremove
method !
-
getDefaultShippingAddress
@Deprecated public Address getDefaultShippingAddress()
Deprecated.since ages - please usegetDefaultDeliveryAddress()
insteadGets the default shipment address of this user. This may returnnull
if 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 returnnull
if no such address was set.
-
getDefaultDeliveryAddress
public Address getDefaultDeliveryAddress()
Gets the default shipment address of this user. This may returnnull
if no such address was set.
-
getDefaultDeliveryAddress
public Address getDefaultDeliveryAddress(SessionContext ctx)
Gets the default shipment address of this user. This may returnnull
if 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 persistentcart
belonging 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 persistentcart
belonging to this user as copy of the current session cart.- Throws:
ConsistencyCheckException
-
getCart
public Cart getCart(java.lang.String code)
TheCart
with 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 thisCustomer
is the default anonymousCustomer
instance of this system. The anonymousCustomer
is used for unauthorizedJaloSession
s.- Returns:
true
if thisCustomer
is the default anonymousCustomer
instance of this system
-
getDisplayName
@Deprecated public java.lang.String getDisplayName(SessionContext ctx)
Deprecated.since ages - usePrincipalModel.getDisplayName()
- Specified by:
getDisplayName
in 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:Principal
Old jalo generated method from GeneratedPrincipal - Getter of thePrincipal.displayName
jalo localized attribute.- Specified by:
getAllDisplayName
in classPrincipal
- Returns:
- the localized displayName
-
checkRemovable
@Deprecated protected void checkRemovable(SessionContext ctx) throws ConsistencyCheckException
Deprecated.since agesDescription copied from class:Item
Checks whether or not this it may be removed or not. Called before the actual removal process.- Overrides:
checkRemovable
in classItem
- Throws:
ConsistencyCheckException
- to indicate that the item cannot be removed
-
-