Class Condition
- All Implemented Interfaces:
DeleteMarkerable,LocalizableOM,Serializable,Comparable<Condition>,ColumnAccessByName,ObjectModel,Persistent
Transition 이 가능한지 아닌지를 판단하는 조건이다.
정의 : Transition 을 허용하기 위하여는 설정된 모든 Condition 들을 만족하여야 한다.
Condition Matching 의 경우 INCLUDE 와 EXCULE 가 EQUAL 보다 더 효율적이다. 수학적으로 Condition 은 Coverage 의 개념이 더 정확하다.
EQUAL 의 경우 System 의 복잡성으로 인하여 Symmetry 가 깨지기 쉽다.
어떤 Transition 에 2개의 Condition 이 설정되었을때
(case A : ( role EQUAL role_a ), ( role EQUAL role_b )
case B : ( role EQUAL role_a ), ( permission EQUAL permission_a )
case C : ( role INCLUDE role_a), ( role EQUAL role_b )
case A 의 경우 Transition 을 허용하기 위하여는 role_a 와 role_b 를 동시에 만족하여야 한다.
case B 의 경우 Transition 을 허용하기 위하여는 role_a 와 permission_a 를 동시에 만족하여야 한다.
case C 의 경우 Transition 을 허용하기 위하여는 role_a 또는 role_b 이어야 한다.
Condition 의 Override 는 ModuleItemType > ItemType > GlobalAttribute 의 순으로 적용된다.
어떤 Transition 에 다음과 같이 Condition 이 설정되었을때 ( permission EQUAL a ), ( itemType b, permission EQUAL c ), ( ModuleItemType d, permission EQUAL e ) Condition 의 속성중 RoleName 과 PermissionName 은 OR 이다. 즉 두가지가 같이 존재하면 Role 이나 Permission 두가지중 한가지만 허용되면 통과된다. 그러나 그이외의 나머지 속성은 모두 AND 이다.
- Version:
- $id: Condition.java $Revision$, 12-09-21 1:00:11 PM KST
- Author:
- YounghoCho
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDOCUMENT ME!static enumDOCUMENT ME! -
Field Summary
Fields inherited from class com.easydesk.om.BaseCondition
collLocalizedConditionInfos -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintDOCUMENT ME!booleandelete(EasyDeskUser user) Checks if user has permission to delete module-item type mapping.조건의 대상 Attribute 를 구한다.조건의 적용 아이템 유형getLocalized(Locale locale) locale 에 해당하는 localized 정보를 구한다.조건의 적용 Module조건의 적용 속성Condition 의 Module, ItemType, Attribute, DpendType 의 설정 조건으로 Transition 의 Scope 를 결정한다.booleanattribute id 가 null 이면 action condition , null 이 아니면 attribute condition 이다.booleanisSatisfied(String value) 주어진 조건이 만족하는지 , 값만을 비교voidsave()Stores the object in the database.voidsetAttribute(Attribute attribute) 조건의 대상 Attribute 를 설정한다. same as setAttributeRelatedByAttributeId()voidsetRAttribute(Attribute attribute) 조건의 적용 속성을 설정한다. same as setAttributeRelatedByRAttributeId()Methods inherited from class com.easydesk.om.BaseCondition
addLocalizedConditionInfo, addLocalizedConditionInfo, copy, copy, copy, copy, copyInto, copyInto, copyInto, copyInto, equals, getAttributeId, getAttributeRelatedByAttributeId, getAttributeRelatedByAttributeId, getAttributeRelatedByRAttributeId, getAttributeRelatedByRAttributeId, getByName, getByPeerName, getByPosition, getConditionId, getDependType, getDependType, getDependTypeId, getFieldNames, getForeignKeyForAttributeRelatedByAttributeId, getForeignKeyForAttributeRelatedByRAttributeId, getForeignKeyForDependType, getForeignKeyForModuleItemType, getForeignKeyForTransition, getItemTypeId, getLocalizedConditionInfos, getLocalizedConditionInfos, getLocalizedConditionInfos, getLocalizedConditionInfos, getLocalizedConditionInfosJoinAttributeOption, getLocalizedConditionInfosJoinAttributeOption, getModuleId, getModuleItemType, getModuleItemType, getPeer, getPrimaryKey, getRAttributeId, getTableMap, getTransition, getTransition, getTransitionId, getType, getValue, hashCode, initLocalizedConditionInfos, isCacheOnSave, isDeleted, isDisabledIfBlocked, isLoading, isLocalizedConditionInfosInitialized, isModified, isNew, isRemoved, isSaving, resetLocalizedConditionInfo, resetModified, save, save, setAttributeId, setAttributeRelatedByAttributeId, setAttributeRelatedByAttributeIdKey, setAttributeRelatedByRAttributeId, setAttributeRelatedByRAttributeIdKey, setByName, setByPeerName, setByPosition, setConditionId, setDeleted, setDependType, setDependTypeId, setDependTypeKey, setDisabledIfBlocked, setItemTypeId, setLoading, setModified, setModuleId, setModuleItemType, setModuleItemTypeKey, setNew, setPrimaryKey, setPrimaryKey, setRAttributeId, setRemoved, setSaving, setTransition, setTransitionId, setTransitionKey, setType, setValue, toString, valueEqualsMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.easydesk.om.DeleteMarkerable
isDeletedMethods inherited from interface org.apache.torque.om.ObjectModel
getPrimaryKey, isModified, isNew, setModified, setNew, setPrimaryKey, setPrimaryKeyMethods inherited from interface org.apache.torque.om.Persistent
save, save
-
Constructor Details
-
Condition
public Condition()새로운Condition인스턴스를 생성한다.
-
-
Method Details
-
save
Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed.- Specified by:
savein interfacePersistent- Overrides:
savein classBaseCondition- Throws:
Exception- 저장 중 오류가 발생한 경우
-
delete
Checks if user has permission to delete module-item type mapping.- Specified by:
deletein interfaceDeleteMarkerable- Parameters:
user- who is acting- Returns:
- true success false not success
- Throws:
Exception- 삭제 중 오류가 발생한 경우
-
getTransitionScope
Condition 의 Module, ItemType, Attribute, DpendType 의 설정 조건으로 Transition 의 Scope 를 결정한다.- Returns:
- TransitionScopeEnum
-
getModule
조건의 적용 Module- Returns:
- Module, 설정되어 있지 않으면
null - Throws:
TorqueException- 조회 중 오류가 발생한 경우
-
getItemType
조건의 적용 아이템 유형- Returns:
- ItemType, 설정되어 있지 않으면
null - Throws:
TorqueException- 조회 중 오류가 발생한 경우
-
getAttribute
조건의 대상 Attribute 를 구한다.- Returns:
- attribute same as getAttributeRelatedByAttributeId()
- Throws:
TorqueException- 조회 중 오류가 발생한 경우
-
setAttribute
조건의 대상 Attribute 를 설정한다. same as setAttributeRelatedByAttributeId()- Parameters:
attribute- 대상 Attribute- Throws:
TorqueException- 설정 중 오류가 발생한 경우
-
getRAttribute
조건의 적용 속성- Returns:
- attribute same as getAttributeRelatedByRAttributeId()
- Throws:
TorqueException- 조회 중 오류가 발생한 경우
-
setRAttribute
조건의 적용 속성을 설정한다. same as setAttributeRelatedByRAttributeId()- Parameters:
attribute- 조건의 적용 속성(RAttribute)- Throws:
TorqueException- 설정 중 오류가 발생한 경우
-
isSatisfied
주어진 조건이 만족하는지 , 값만을 비교- Parameters:
value- test attributeValue- Returns:
- true or false
- Throws:
TorqueException
-
isAttributeCondition
public boolean isAttributeCondition()attribute id 가 null 이면 action condition , null 이 아니면 attribute condition 이다.- Returns:
- true/false about attributeId is null or not
-
compareTo
DOCUMENT ME!- Specified by:
compareToin interfaceComparable<Condition>- Parameters:
obj- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getLocalized
Description copied from interface:LocalizableOMlocale 에 해당하는 localized 정보를 구한다.- Specified by:
getLocalizedin interfaceLocalizableOM- Parameters:
locale-- Returns:
- localized[]
- Throws:
TorqueException- 조회 중 오류가 발생한 경우
-