Package com.easydesk.attribute
Class HashedStringAttribute
java.lang.Object
com.easydesk.om.BaseAttributeValue
com.easydesk.om.AttributeValue
com.easydesk.attribute.FreeFormAttribute
com.easydesk.attribute.StringAttribute
com.easydesk.attribute.HashedStringAttribute
- All Implemented Interfaces:
Viewable,Cacheable,Observed,Retrievable,Serializable,ColumnAccessByName,ObjectModel,Persistent
- Direct Known Subclasses:
EncryptAttribute
plain text 를 hash 하여 저장하는 문자열 속성.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.easydesk.om.AttributeValue
AttributeValue.AccessEnum -
Field Summary
Fields inherited from class com.easydesk.om.AttributeValue
activitySet, chainedFields inherited from interface com.easydesk.validator.Retrievable
KEY_SEPERATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDisplayedValue(String type) 기본 locale(아이템의 locale)로 화면에 표시할 값을 구한다.getDisplayedValue(String type, Locale locale) 지정한 locale 로 화면에 표시할 값을 구한다.DOCUMENT ME!voidsetPassword(String plain, String salt) plain text password 를 encryptPassword 로 변경 저장한다.toHashedString(String plain, String salt) plain text 를 hash 문자열로 변환한다.toHashedString(String plain, String algorithm, String salt, int iteration) plain text 를 hash 문자열로 변환한다.Methods inherited from class com.easydesk.attribute.StringAttribute
getLocalizedValue, getLocalizedValue, hasValueMethods inherited from class com.easydesk.attribute.FreeFormAttribute
getFormatter, init, loadResources, setResourcesMethods inherited from class com.easydesk.om.AttributeValue
alwaysNeedActivity, clear, copy, copy, endActivitySet, getActivity, getActivityDescription, getAttachment, getChainedValue, getChainedValue, getChainedValue, getInputValue, getLocalizedValue, getLocalizedValue, getLocalizedValue, getLocalizedValues, getLocalizedValues, getMethodCache, getModuleAttribute, getNewInstance, getNewInstance, getNumericValues, getNumericValues, getNumericValuesAsString, getNumericValuesAsString, getObserverOption, getOptionIdAsString, getOptionIds, getOptionIds, getOptionIdsAsString, getOptionIdsAsString, getOptionValues, getPossibleTransitionCount, getPossibleTransitionCount, getPrimitiveOptionIds, getPrimitiveUserIds, getQueryKey, getRelativePath, getRelativePath, getRepository, getResource, getTransactionId, getUser, getUserIds, getValueList, getValueList, getValues, getValues, getValuesAsString, getValuesAsString, hasAlreadyChained, isModified, isQuickSearchAttribute, isSet, isSetOnly, needActivity, performAfter, performBefore, register, save, setActivity, setActivityDescription, setAttachment, setChainedValue, setInputValue, setNumericValue, setNumericValueOnly, setNumericValues, setOptionId, setOptionIdOnly, setOptionIds, setOptionValues, setPrimitiveOptionIds, setPrimitiveUserIds, setProperties, setTransactionId, setUser, setUserId, setUserIdOnly, setUserIds, setValue, setValueOnly, setValues, startActivitySet, toStringMethods inherited from class com.easydesk.om.BaseAttributeValue
copy, copy, copyInto, copyInto, copyInto, copyInto, equals, getAttribute, getAttribute, getAttributeId, getAttributeOption, getAttributeOption, getByName, getByPeerName, getByPosition, getDepend, getDepend, getDependId, getEasyDeskUserImpl, getEasyDeskUserImpl, getFieldNames, getForeignKeyForAttribute, getForeignKeyForAttributeOption, getForeignKeyForDepend, getForeignKeyForEasyDeskUserImpl, getForeignKeyForItem, getItem, getItem, getItemId, getNumericValue, getOptionId, getPeer, getPrimaryKey, getTableMap, getUserId, getValue, getValueId, hashCode, isCacheOnSave, isDeleted, isLoading, isModified, isNew, isRemoved, isSaving, resetModified, save, save, setAttribute, setAttributeId, setAttributeKey, setAttributeOption, setAttributeOptionKey, setByName, setByPeerName, setByPosition, setDeleted, setDepend, setDependId, setDependKey, setEasyDeskUserImpl, setEasyDeskUserImplKey, setItem, setItemId, setItemKey, setLoading, setModified, setNew, setPrimaryKey, setPrimaryKey, setRemoved, setSaving, setValueId, valueEqualsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.easydesk.attribute.Viewable
getComponentName
-
Constructor Details
-
HashedStringAttribute
public HashedStringAttribute()Creates a new HashedStringAttribute object.
-
-
Method Details
-
setPassword
plain text password 를 encryptPassword 로 변경 저장한다.- Parameters:
plain- textsalt- hash 에 사용할 salt- Throws:
Exception- hash 중 오류가 발생한 경우
-
getPassword
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
toHashedString
plain text 를 hash 문자열로 변환한다. 반복 횟수는 item id 로부터 결정한다.- Parameters:
plain- hash 할 문자열salt- hash 에 사용할 salt- Returns:
- hash 문자열
- Throws:
Exception- hash 중 오류가 발생한 경우UnsupportedOperationException- item 이 아직 저장되지 않은 경우
-
toHashedString
public String toHashedString(String plain, String algorithm, String salt, int iteration) throws Exception plain text 를 hash 문자열로 변환한다. 현재는 구현되어 있지 않다.- Parameters:
plain- hash 할 문자열algorithm- hash 알고리즘,null이면 기본 알고리즘을 사용한다.salt- hash 에 사용할 saltiteration- hash 반복 횟수- Returns:
- hash 문자열
- Throws:
Exception- hash 중 오류가 발생한 경우UnsupportedOperationException- 항상 발생 (미구현)
-
getDisplayedValue
기본 locale(아이템의 locale)로 화면에 표시할 값을 구한다.- Overrides:
getDisplayedValuein classFreeFormAttribute- Parameters:
type- 표시 형식- Returns:
- 화면에 표시할 값
- Throws:
Exception- 값을 구하는 중 오류가 발생한 경우
-
getDisplayedValue
지정한 locale 로 화면에 표시할 값을 구한다. 기본 구현은 저장된 값을 그대로 반환한다.- Overrides:
getDisplayedValuein classFreeFormAttribute- Parameters:
type- 표시 형식locale- 표시에 사용할 locale- Returns:
- 화면에 표시할 값
- Throws:
Exception- 값을 구하는 중 오류가 발생한 경우
-