Class MITList

All Implemented Interfaces:
Cacheable, LocalizableOM, Serializable, Iterable<MITListItem>, ColumnAccessByName, ObjectModel, Persistent

public class MITList extends BaseMITList implements Cacheable, Iterable<MITListItem>, LocalizableOM
Author:
Youngho Cho
  • Constructor Details

    • MITList

      public MITList()
      새로운 MITList 인스턴스를 생성한다.
  • Method Details

    • save

      public void save() throws Exception
      Stores the object in the database. If the object is new, it inserts it; otherwise an update is performed.
      Specified by:
      save in interface Persistent
      Overrides:
      save in class BaseMITList
      Throws:
      Exception - 저장 중 오류가 발생한 경우
    • size

      public int size()
      MITListItem 을 기본 단위로 펼쳤을때의 갯수
      Returns:
      raw item size, 내부에 오류가 있으면 크기는 0 를 보낸다.
    • isEmpty

      public boolean isEmpty()
      tests if the list is empty
      Returns:
      true if the list is empty, otherwise false
    • iterator

      public Iterator<MITListItem> iterator()
      모든 가능한 MITListItem 의 iterator 를 구한다.
      Specified by:
      iterator in interface Iterable<MITListItem>
      Returns:
      Iterator
    • contains

      public boolean contains(MITListItem item)
      동일한 item 을 같고 있는지 확인한다. 동일한 ModuleItemType 을 지시하면 포함하는것으로 간주한다.
      Parameters:
      item -
    • isAnonymous

      public boolean isAnonymous()
      저장되어 있는데 Name 이 설정되지 않은 것
      Returns:
      true/false
    • hasParentCondition

      public boolean hasParentCondition() throws TorqueException
      MitListItem 의 구성중에 ParentId 가 설정되어 있는것이 있는지 여부를 확인한다.
      Returns:
      true/false
      Throws:
      TorqueException
    • getParentId

      public Long getParentId() throws TorqueException
      MitListItem 의 구성중에 ParentId 가 설정되어 있는것을 구한다.
      Returns:
      parentId
      Throws:
      TorqueException
    • setEasyDeskUserImpl

      public void setEasyDeskUserImpl(EasyDeskUserImpl v)
      Declares an association between this object and a EasyDeskUser object 지금 MITList 를 이용하고 있는 사용자 ...
      Overrides:
      setEasyDeskUserImpl in class BaseMITList
      Parameters:
      v - current user which used this mitList class
    • getEasyDeskUser

      public EasyDeskUserImpl getEasyDeskUser() throws TorqueException
      object 에 local EasyDeskUser 가 존재하면 local jettiger User 를 구한다. local EasyDeskUser 가 존재하지 않으면 database 에 등록되어 있는 EasyDeskUser 를 구한다.

      사용상 주의는 MITListItem 의 정의에 currentModule, currentItemType 을 설정할 수 있기 때문에 이 object 을 사용할 때는 사용자가 항상 먼저 설정이 되어 있어야 한다.

      Returns:
      EasyDeskUser
      Throws:
      TorqueException
    • getCreator

      public EasyDeskUser getCreator() throws TorqueException
      same as super.getEasyDeskUserImpl() ; creator 가 필요할 경우 처리
      Throws:
      TorqueException
    • getPermittedSublist

      public MITList getPermittedSublist(EasyDeskUser user, List<Permission> permissions) throws TorqueException
      Creates a new MITList containing only those items from this list for which the searcher has at least one of the permission.
      Parameters:
      user - a EasyDeskUser value
      permissions - a List value
      Returns:
      a MITList value
      Throws:
      TorqueException
    • getPermittedSublist

      public MITList getPermittedSublist(EasyDeskUser user, Permission... permissions) throws TorqueException
      Creates a new MITList containing only those items from this list for which the searcher has at least one of the permission.
      Parameters:
      user - a EasyDeskUser value*
      permissions - a String[] value
      Returns:
      a MITList value
      Throws:
      TorqueException
    • getPermittedBitMatrix

      public BitMatrix getPermittedBitMatrix(EasyDeskUser user, Permission... permissions) throws TorqueException
      getPermittedSublist
      Parameters:
      user - a EasyDeskUser value
      permissions - a String[] value
      Returns:
      a BitMatrix value
      Throws:
      TorqueException
    • getPermittedSublist

      public MITList getPermittedSublist(ItemType type) throws TorqueException
      Creates a new MITList containing only itemType from this list for
      Parameters:
      type - a ItemType value
      Returns:
      a MITList value
      Throws:
      TorqueException
    • getPermittedBitMatrix

      public BitMatrix getPermittedBitMatrix(ItemType type) throws TorqueException
      Creates a new MITList containing only itemType from this list for
      Parameters:
      type -
      Returns:
      BitMatrix
      Throws:
      TorqueException
    • getFirstItem

      public MITListItem getFirstItem() throws TorqueException
      첫번째 MITListItem 을 구한다.
      Returns:
      first MITListItem
      Throws:
      TorqueException
    • isSingleModuleItemType

      public boolean isSingleModuleItemType()
      DOCUMENT ME!
      Returns:
      true if SingleModuleItemType or error happens internally
    • isSingleModule

      public boolean isSingleModule()
      DOCUMENT ME!
      Returns:
      true if SingleModule or happens error internally
    • isSingleItemType

      public boolean isSingleItemType()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getModule

      public Module getModule() throws TorqueException
      이 Object 이 속하여 있는 것이 아니라 현재 처리하고자 하는 Module 임으로 이름이 적절하지 못하다. Artifactizable 과 구분하여야 한다.
      Throws:
      TorqueException
    • getItemType

      public ItemType getItemType() throws TorqueException
      이 Object 이 속하여 있는 것이 아니라 현재 처리하고자 하는 Module 임으로 이름이 적절하지 못하다. Artifactizable 과 구분하여야 한다.
      Returns:
      Throws:
      TorqueException
    • getAssociatedItemTypes

      public Collection<ItemType> getAssociatedItemTypes(Attribute attribute) throws TorqueException
      이 object 안에서 attribute 를 같고 있는 itemType 을 구한다.
      Parameters:
      attribute -
      Returns:
      itemType list
      Throws:
      TorqueException
    • has

      public boolean has(Attribute attribute) throws TorqueException
      FeatureDetection 이다. ModuleAttribute 를 가지고 있는지
      Parameters:
      attribute -
      Returns:
      true/false which has ModuleAttribute ( FeatureDetection )
      Throws:
      TorqueException
    • getAttributes

      public List<Attribute> getAttributes(boolean activeOnly, boolean commonOnly) throws TorqueException
      Get the list of all attributes in this MITList. If activeOnly is set to true, return only active attrivutes. If commonOnly is true,return only attributes, which are common in all MITListItems in this list.
      Parameters:
      activeOnly -
      commonOnly -
      Returns:
      Attribute list
      Throws:
      TorqueException
    • getAllAttributes

      public List<Attribute> getAllAttributes() throws TorqueException
      Not Active 를 포함한 모든 속성을 구한다.
      Returns:
      all attributes list including not active attribute
      Throws:
      TorqueException
    • getCommonAttributes

      public List<Attribute> getCommonAttributes() throws TorqueException
      공통 속성을 구한다.
      Returns:
      common attributes list including not active attribute
      Throws:
      TorqueException
    • getCommonAttributes

      public List<Attribute> getCommonAttributes(boolean activeOnly) throws TorqueException
      DOCUMENT ME!
      Parameters:
      activeOnly - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • isCommon

      public boolean isCommon(Attribute attribute, boolean activeOnly) throws TorqueException
      Checks all items to see if they contain the attribute.
      Parameters:
      attribute - an Attribute value
      Returns:
      a boolean value
      Throws:
      TorqueException
    • isCommon

      public boolean isCommon(Attribute attribute) throws TorqueException
      DOCUMENT ME!
      Parameters:
      attribute - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • getCommonNonUserAttributes

      public List<Attribute> getCommonNonUserAttributes() throws Exception
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      Exception - DOCUMENT ME!
    • getCommonOptionAttributes

      public List<Attribute> getCommonOptionAttributes() throws Exception
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      Exception - DOCUMENT ME!
    • getCommonUserAttributes

      public List<Attribute> getCommonUserAttributes(boolean activeOnly) throws TorqueException
      gets a list of all of the User Attributes common to all modules in the list.
      Parameters:
      activeOnly -
      Throws:
      TorqueException
    • getCommonUserAttributes

      public List<Attribute> getCommonUserAttributes() throws TorqueException
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • getPotentialAssignees

      public List<EasyDeskUser> getPotentialAssignees(boolean includeCommitters) throws Exception
      potential assignee must have at least one of the permissions for the user attributes in all the modules.
      Throws:
      Exception
    • getUserAttributePermissions

      public Permission[] getUserAttributePermissions() throws TorqueException
      gets a list of permissions associated with the User Attributes that are active for this Module.
      Throws:
      TorqueException
    • getCommonModuleUserAttributes

      public List<ModuleUserAttribute> getCommonModuleUserAttributes(Module module) throws Exception
      List 보기에서 사용되는 moduleUserAttribute list 를 구한다.
      Parameters:
      module - 이 MITList 를 사용하고 있는 Query, Report 가 속하여 있는 모듈 null 이나 new 를 허용하지 않는다.
      Returns:
      moduleUserAttribute list
      Throws:
      Exception
    • getNewModuleUserAttribute

      public ModuleUserAttribute getNewModuleUserAttribute(Module module, Attribute attribute) throws TorqueException
      Attribute 에 대한 ModuleUserAttribute 를 만든다.
      Parameters:
      module - MITList 를 사용하고 있는 Query , Report 가 속하여 있는 Module
      attribute -
      Throws:
      TorqueException
    • getSavedRMUAs

      public List<ModuleUserAttribute> getSavedRMUAs(Module module) throws TorqueException
      db 에 저장되어 있는 List Order 를 위한 MUA 를 구한다. 먼저 사용자의 것을 구하고 없으면 생성자의 것을 구한다.
      Parameters:
      module - 이 MITList 를 사용하고 있는 Query, Report 의 Module
      Throws:
      TorqueException
    • getSavedRMUAs

      protected List<ModuleUserAttribute> getSavedRMUAs(EasyDeskUser user, Module module) throws TorqueException
      db 에 저장되어 있는 MUA 를 구한다.
      Parameters:
      user -
      module - 이 MITList 를 사용하고 있는 Query, Report 의 Module
      Throws:
      TorqueException
    • getCommonLeafModuleOptions

      public List<ModuleOption> getCommonLeafModuleOptions(Attribute attribute) throws TorqueException
      DOCUMENT ME!
      Parameters:
      attribute - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      Exception - DOCUMENT ME!
      TorqueException
    • getCommonModuleOptionTree

      public List<ModuleOption> getCommonModuleOptionTree(Attribute attribute) throws TorqueException
      DOCUMENT ME!
      Parameters:
      attribute - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      Exception - DOCUMENT ME!
      TorqueException
    • getDescendantsUnion

      public List<ModuleOption> getDescendantsUnion(AttributeOption option) throws TorqueException
      DOCUMENT ME!
      Parameters:
      option - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      Exception - DOCUMENT ME!
      TorqueException
    • isCommon

      public boolean isCommon(AttributeOption option) throws TorqueException
      DOCUMENT ME!
      Parameters:
      option - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • isCommon

      public boolean isCommon(AttributeOption option, boolean activeOnly) throws TorqueException
      Checks all items after the first to see if they contain the attribute. It is assumed the attribute is included in the first item.
      Parameters:
      option - an Attribute value
      Returns:
      a boolean value
      Throws:
      TorqueException
    • addToCriteria

      public boolean addToCriteria(Criteria crit) throws TorqueException
      Parameters:
      crit -
      Returns:
      where clause 에 join 이 존재하는지
      Throws:
      TorqueException
    • addAll

      public void addAll(MITList list) throws TorqueException
      MITList 를 추가한다. 추가 MITList 에 있는 모든 MITListItem 을 추가하는 것과 동일하다.
      Parameters:
      list - 추가 mitList
      Throws:
      TorqueException
    • addMITListItem

      public void addMITListItem(MITListItem item) throws TorqueException
      Description copied from class: BaseMITList
      Method called to associate a MITListItem object to this object through the collMITListItems foreign key attribute. If the associated objects were not retrieved before and this object is not new, the associated objects are retrieved from the database before adding the toAdd object.
      Overrides:
      addMITListItem in class BaseMITList
      Parameters:
      item -
      Throws:
      TorqueException - if retrieval of the associated objects fails.
    • getAssociatedModuleAttributes

      public List<ModuleAttribute> getAssociatedModuleAttributes(Attribute attribute) throws TorqueException
      각 mitListItem 에 대응하는 ModuleAttribute 를 구한다.
      Parameters:
      attribute -
      Returns:
      list
      Throws:
      TorqueException
    • getExpandedMITListItems

      public List<MITListItem> getExpandedMITListItems() throws TorqueException
      Search 를 위한 single MITListItem List 를 구한다.
      Returns:
      all item list with 'Issue | Search' permission
      Throws:
      TorqueException
    • getPermission

      public Permission[] getPermission() throws TorqueException
      이 MITList 의 사용에 필요한 검색 권한을 구한다. 정의가 안되어 있는면 PermissionEnum.ISSUE_SEARCH 를 return 한다.
      Returns:
      Throws:
      TorqueException
    • scheduleItemForDeletion

      public void scheduleItemForDeletion(MITListItem item)
      itemList 를 db 에서 제거한다.
      Parameters:
      item - mitListItem in this MITList
    • getModuleIds

      public List<Long> getModuleIds() throws TorqueException
      MITList 가 설정하고 있는 모든 ModuleId 들을 구한다.
      Returns:
      ModuleId List
      Throws:
      TorqueException
    • getModuleIdsAsFixedBitSet

      public org.apache.lucene.util.FixedBitSet getModuleIdsAsFixedBitSet() throws TorqueException
      MITList 가 설정하고 있는 모든 ModuleId 들을 구한다.
      Returns:
      ModuleId List
      Throws:
      TorqueException
    • getModules

      public List<EasyDeskModule> getModules() throws TorqueException
      MITList 가 설정하고 있는 모든 Module 들을 구한다.
      Returns:
      Module List
      Throws:
      TorqueException
    • getItemTypes

      public List<ItemType> getItemTypes() throws TorqueException
      Returns:
      itemType list
      Throws:
      TorqueException
    • getItemTypeIds

      public List<Integer> getItemTypeIds()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • toString

      public String toString()
      DOCUMENT ME!
      Overrides:
      toString in class BaseMITList
      Returns:
      DOCUMENT ME!
    • toKeyString

      public String toKeyString()
      for cache key
    • toKeyAsCSV

      public String toKeyAsCSV()
      for key array when report create
      Returns:
      CSV of the listItems
    • getDisplayName

      public String getDisplayName() throws Exception
      MITList 의 DisplayName 을 구한다.
      Returns:
      display name String
      Throws:
      Exception
    • mirrorCopy

      public MITList mirrorCopy(Module fromModule, Module toModule, EasyDeskUser user) throws TorqueException
      Query/Report 의 이동 복사에 사용된다. mitListItem 의 대상 Module 도 같이 변경된다.
      Parameters:
      fromModule - category 변경시
      toModule - category 변경시
      user -
      Throws:
      TorqueException
    • mirrorCopy

      public MITList mirrorCopy(Module fromModule, Module toModule, EasyDeskUser user, boolean change) throws TorqueException
      Query/Report 의 이동 복사에 사용된다. mitListItem 의 대상 Module 도 같이 변경되는 것을 설정할 수 있다.
      Parameters:
      fromModule - category 변경시
      toModule - category 변경시
      user -
      change - if true set mitListItem to request module
      Throws:
      TorqueException
    • getQueryId

      protected Long getQueryId(Module module) throws TorqueException
      DOCUMENT ME!
      Parameters:
      module - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • getReportHeadId

      protected Long getReportHeadId(Module module) throws TorqueException
      DOCUMENT ME!
      Parameters:
      module - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • getBitMatrix

      public BitMatrix getBitMatrix() throws TorqueException
      모든 MITListItem 의 BitMatrix 를 합친다. (Substract item 은 제외한다.)
      Returns:
      a BitMatrix for this mitList (x : Module id, y : ItemType id), item 이 없으면 빈 BitMatrix (null 이 아니다)
      Throws:
      TorqueException
    • getLocalized

      public Localized[] getLocalized(Locale locale) throws TorqueException
      Description copied from interface: LocalizableOM
      locale 에 해당하는 localized 정보를 구한다.
      Specified by:
      getLocalized in interface LocalizableOM
      Parameters:
      locale -
      Returns:
      localized[]
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getMethodCache

      public MethodResultCache getMethodCache()
      Description copied from interface: Cacheable
      Returns the method result cache for this object.
      Specified by:
      getMethodCache in interface Cacheable
      Returns:
      MethodResultCache
    • clear

      public void clear()
      Description copied from interface: Cacheable
      clear this Serializable instance cache
      Specified by:
      clear in interface Cacheable