Package com.easydesk.om.util
Class ItemFactory
java.lang.Object
com.easydesk.om.util.ItemFactory
새로운 Item 을 등록한다.
ItemFactory
- Author:
- Youngho Cho
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoCheckAttributeValueWorkflow(Map<Integer, AttributeValue> newAttVals, EasyDeskUser user) This method is used with the setAttributeValues() method to Make sure that workflow is valid.doCheckInitialAttributeValueWorkflow(Map<Integer, AttributeValue> newValues, EasyDeskUser actor, ActivitySet activitySet) This method is used with the setInitialAttributeValues() method to Make sure that workflow is valid for the initial values of a new item.static ItemFactorygetFactory(Item item) Item 에 대한 factory 를 구한다.protected booleanmakePending(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, Attachment attachment, EasyDeskUser user, boolean isCorrelated) 모든 Condition 을 확인해서 조건에 의하여 Blocking 이 되어 있는 경우 make pending or not checkprotected ActivitySetsetAttributeValues(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, Attachment attachment, EasyDeskUser user) Sets AttributeValues for an item based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.protected ActivitySetsetAttributeValues(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, Attachment attachment, EasyDeskUser user, boolean isCorrelated) Sets AttributeValues for an item based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.setAttributeValues(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, EasyDeskUser user) Sets AttributeValues for an item based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.setInitialAttributeValues(ActivitySet activitySet, Attachment attachment, Map<Integer, AttributeValue> newValues, EasyDeskUser user) Sets original AttributeValues for an new item based on a hashmap of attributeValues.
-
Constructor Details
-
ItemFactory
Item 에 대한 factory 를 생성한다.- Parameters:
item- 대상 Item
-
-
Method Details
-
getFactory
Item 에 대한 factory 를 구한다.- Parameters:
item- 대상 Item- Returns:
- ItemFactory
-
setInitialAttributeValues
public ActivitySet setInitialAttributeValues(ActivitySet activitySet, Attachment attachment, Map<Integer, AttributeValue> newValues, EasyDeskUser user) throws ExceptionSets original AttributeValues for an new item based on a hashmap of attributeValues. This is data is saved to the database and the proper ActivitySet is also recorded.- Parameters:
activitySet- 현재 처리중인 ActivitySetattachment- item을 저장하기 이전에는 itemId 가 없기 때문에 입력시에는 activitySet 에 attachment 를 미리 저장할 수가 없다.newValues- { attributeId, AttributeValue } mapuser- current working user @todo activitySet.getCurrentActor() 로 대치한다.- Returns:
- 저장에 사용된 ActivitySet
- Throws:
Exception- when the workflow has an error to report
-
doCheckInitialAttributeValueWorkflow
public Object doCheckInitialAttributeValueWorkflow(Map<Integer, AttributeValue> newValues, EasyDeskUser actor, ActivitySet activitySet) throws ExceptionThis method is used with the setInitialAttributeValues() method to Make sure that workflow is valid for the initial values of a new item. It will return a non-null String which is the workflow error message otherwise it will return null.- Parameters:
newValues- { attributeId, AttributeValue } mapactor- 작업하는 사용자activitySet- 현재 처리중인 ActivitySet- Returns:
- obj
- Throws:
Exception- workflow 확인 중 오류가 발생한 경우
-
doCheckAttributeValueWorkflow
public Object doCheckAttributeValueWorkflow(Map<Integer, AttributeValue> newAttVals, EasyDeskUser user) throws ExceptionThis method is used with the setAttributeValues() method to Make sure that workflow is valid. It will return a constraint object which is the workflow blocking condition, error message otherwise it will return null- Parameters:
newAttVals- { attributeId, AttributeValue } mapuser- 작업하는 사용자- Returns:
- constraint object if exists or null
- Throws:
Exception- workflow 확인 중 오류가 발생한 경우
-
setAttributeValues
public ActivitySet setAttributeValues(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, EasyDeskUser user) throws ExceptionSets AttributeValues for an item based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.- Parameters:
activitySet- ActivitySet instancenewAttVals- A map of attribute Id's vs new AttributeValuesuser- User responsible for this activity- Returns:
- ActivitySet object containing the changes made to the item
- Throws:
Exception- when the workflow has an error to report
-
setAttributeValues
protected ActivitySet setAttributeValues(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, Attachment attachment, EasyDeskUser user) throws ExceptionSets AttributeValues for an item based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.- Parameters:
activitySet- ActivitySet instancenewAttVals- A map of attribute Id's vs new AttributeValuesattachment- Attachment to the itemuser- User responsible for this activity- Returns:
- ActivitySet object containing the changes made to the item
- Throws:
Exception- when the workflow has an error to report
-
setAttributeValues
protected ActivitySet setAttributeValues(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, Attachment attachment, EasyDeskUser user, boolean isCorrelated) throws ExceptionSets AttributeValues for an item based on a hashmap of attribute values This is data is saved to the database and the proper ActivitySet is also recorded.- Parameters:
activitySet- ActivitySet instance which already registerednewAttVals- A map of attribute Id's vs new AttributeValuesattachment- Attachment to the itemuser- User responsible for this activityisCorrelated- correlated 이면 workfiow 를 처리하지 않는다. @todo review the function- Returns:
- ActivitySet object containing the changes made to the item
- Throws:
Exception- when the workflow has an error to report
-
makePending
protected boolean makePending(ActivitySet activitySet, Map<Integer, AttributeValue> newAttVals, Attachment attachment, EasyDeskUser user, boolean isCorrelated) throws Exception모든 Condition 을 확인해서 조건에 의하여 Blocking 이 되어 있는 경우 make pending or not check- Parameters:
activitySet- ActivitySet instance which already registerednewAttVals- A map of attribute Id's vs new AttributeValuesattachment- Attachment to the itemuser- User responsible for this activityisCorrelated- correlated 이면 workfiow 를 처리하지 않는다. @todo review the function- Returns:
- makePending or not
- Throws:
Exception- when the workflow has an error to report
-