Class EasyDeskModule

All Implemented Interfaces:
Cacheable, Artifactizable, Module, Group, Identifiable<Long>, SecurityEntity<Long>, Serializable, ColumnAccessByName, ObjectModel, Persistent
Direct Known Subclasses:
TemplateModule

public class EasyDeskModule extends BaseEasyDeskModule implements Module, Cacheable
DOCUMENT ME!
Version:
$id: EasyDeskModule.java $Revision$, 03-04-22 12:38:47 PM KST
Author:
YounghoCho
  • Constructor Details

    • EasyDeskModule

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

    • setName

      public void setName(String name)
      DOCUMENT ME!
      Specified by:
      setName in interface Module
      Specified by:
      setName in interface SecurityEntity<Long>
      Parameters:
      name - DOCUMENT ME!
    • getName

      public String getName()
      DOCUMENT ME!
      Specified by:
      getName in interface Module
      Specified by:
      getName in interface SecurityEntity<Long>
      Returns:
      DOCUMENT ME!
    • isTemplate

      public boolean isTemplate()
      DOCUMENT ME!
      Specified by:
      isTemplate in interface Module
      Returns:
      DOCUMENT ME!
    • getGroup

      public Group getGroup()
      Module 에 해당하는 security Group 을 구한다.
      Specified by:
      getGroup in interface Module
      Returns:
      Group
    • getRoles

      public RoleSet<? extends Role> getRoles()
      Description copied from interface: Group
      Returns the role set defined by this group.
      Specified by:
      getRoles in interface Group
      Returns:
      the role set associated with this group
    • hasRole

      public boolean hasRole(Role role)
      Description copied from interface: Group
      Checks whether the given role is assigned to this group.
      Specified by:
      hasRole in interface Group
      Parameters:
      role - the role to check
      Returns:
      true if the group contains the role, otherwise false
    • getUsers

      public UserSet<? extends User> getUsers(Role... roles)
      Description copied from interface: Group
      이 group 에 속한 사용자들을 구한다.
      Specified by:
      getUsers in interface Group
      Parameters:
      roles - 이 role 들을 가진 사용자만 구한다. 지정하지 않으면 모든 role 을 적용한다.
      Returns:
      the user set associated with this group
    • getParent

      public Module getParent()
      DOCUMENT ME!
      Specified by:
      getParent in interface Module
      Returns:
      DOCUMENT ME!
    • getTemplate

      public Module getTemplate() throws TorqueException
      Cast the getModuleRelatedByTemplateId() to a Module
      Specified by:
      getTemplate in interface Module
      Returns:
      The template module
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • save

      public void save() throws Exception
      TODO : save(con) 사용 검증 Stores an object in the database. If the object is new, it is inserted; otherwise an update is performed.
      Specified by:
      save in interface Module
      Specified by:
      save in interface Persistent
      Overrides:
      save in class BaseEasyDeskModule
      Throws:
      Exception - if an error occurs during saving.
    • getLocale

      public Locale getLocale()
      TODO : 내용 검증 필요. Locale 은 Artifactizable 로 설정할 수 가 없다. 왜냐하면 속성값을 Database 에서 load 할 때 DisplayValue 를 결정하기 위하여 locale 이 미리 설정되어 있어야 한다. 따라서 locale 이 속성값으로 얻어지면 logic 상 dead lock 이 발생한다. 딸사서 Description 에 저장된 정보로 locale 을 구한다. 이 값은 Item 의 기본 locale 로 그리고 Email 발송시에 유용하게 사용된다.
      Specified by:
      getLocale in interface Module
      Returns:
      module locale
    • setLocale

      public void setLocale(Locale locale)
      module 의 locale 을 설정한다.
      Specified by:
      setLocale in interface Module
      Parameters:
      locale - 설정할 locale
    • isActive

      public boolean isActive()
      DOCUMENT ME!
      Specified by:
      isActive in interface Module
      Returns:
      DOCUMENT ME!
    • getNewItem

      public Item getNewItem(ItemType itemType, ActivitySet activitySet) throws Exception
      Creates a new Item with a template item. Module 에 TemplateName 이 'Defaut' + itemType.getName() 이 존재하면, 이것을 적용한다.
      Specified by:
      getNewItem in interface Module
      Parameters:
      itemType - 생성할 item 의 ItemType
      activitySet - 현재 처리중인 ActivitySet
      Returns:
      new item
      Throws:
      Exception - item 생성 중 오류가 발생한 경우
    • getNewItem

      public Item getNewItem(ItemType itemType, Scope scope, ActivitySet activitySet) throws TorqueException
      Creates a new Item.
      Specified by:
      getNewItem in interface Module
      Parameters:
      itemType - 생성할 item 의 ItemType
      scope - 생성할 item 의 Scope
      activitySet - can be null, activitySet 이 필요한 경우는 새로운 모듈생성시에 기본 template 를 생성할 때 필요
      Returns:
      new item
      Throws:
      TorqueException - item 생성 중 오류가 발생한 경우
    • getNewItem

      public Item getNewItem(Item template) throws TorqueException
      Creates a new Item by template item.
      Specified by:
      getNewItem in interface Module
      Parameters:
      template - item
      Returns:
      new item
      Throws:
      TorqueException - item 생성 중 오류가 발생한 경우
    • add

      public void add(ItemType itemType) throws Exception
      Description copied from interface: Module
      DOCUMENT ME!
      Specified by:
      add in interface Module
      Parameters:
      itemType - DOCUMENT ME!
      Throws:
      Exception - DOCUMENT ME!
    • has

      public boolean has(ItemType itemType) throws TorqueException
      Module 에 itemType 이 등록되어 있는지 확인한다.
      Specified by:
      has in interface Module
      Parameters:
      itemType - 확인할 ItemType
      Returns:
      true/false
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • has

      public boolean has(ItemTypeAttribute itemTypeAttribute) throws TorqueException
      Module 에 ItemTypeAttribute 가 등록되어 있는지 확인한다.
      Specified by:
      has in interface Module
      Parameters:
      itemTypeAttribute - 확인할 ItemTypeAttribute
      Returns:
      true/false
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getTemplateTypes

      public List<ItemType> getTemplateTypes() throws Exception
      module 에 등록된 template ItemType 목록을 구한다.
      Specified by:
      getTemplateTypes in interface Module
      Returns:
      template itemType
      Throws:
      Exception - 조회 중 오류가 발생한 경우
    • getModuleItemType

      public ModuleItemType getModuleItemType(ItemType itemType) throws TorqueException
      itemType 에 해당하는 ModuleItemType 을 구한다.
      Specified by:
      getModuleItemType in interface Module
      Parameters:
      itemType - 대상 ItemType
      Returns:
      moduleItemType or null
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getModuleItemTypes

      public List<ModuleItemType> getModuleItemTypes(Attribute attribute) throws TorqueException
      Attribute 를 가지고 있는 모든 ItemType 를 구한다.
      Specified by:
      getModuleItemTypes in interface Module
      Parameters:
      attribute - 대상 Attribute
      Returns:
      ModuleItemType List
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getModuleItemTypes

      public List<ModuleItemType> getModuleItemTypes(AttributeGroupType agType) throws TorqueException
      DOCUMENT ME!
      Specified by:
      getModuleItemTypes in interface Module
      Parameters:
      agType - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • getModuleAttribute

      public ModuleAttribute getModuleAttribute(Attribute attribute, ItemType itemType) throws TorqueException
      DOCUMENT ME!
      Parameters:
      attribute - DOCUMENT ME!
      itemType - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • getAvailableItemTypes

      public List<ItemType> getAvailableItemTypes() throws Exception
      gets a list of all of the active item types that are not associated with this module
      Returns:
      itemTypes list
      Throws:
      Exception - 조회 중 오류가 발생한 경우
    • getUsers

      public LargeSelect<EasyDeskUserImpl> getUsers(int resultsPerPage, Permission... permissions) throws TorqueException
      Get a list of Confirmed <? extends User>'s that have the given permission in the given module.
      Specified by:
      getUsers in interface Module
      Parameters:
      resultsPerPage -
      permissions -
      Returns:
      LargeSelect
      Throws:
      Exception
      TorqueException
    • getUsers

      public LargeSelect<EasyDeskUserImpl> getUsers(int resultsPerPage, Role... role) throws TorqueException
      Specified by:
      getUsers in interface Module
      Parameters:
      resultsPerPage -
      role - Description of the Parameter*
      Returns:
      The users value
      Throws:
      Exception - Description of the Exception
      TorqueException
    • getAnonymousNotificationFilter

      public List<AnonymousNotificationFilter> getAnonymousNotificationFilter(String email) throws TorqueException
      Specified by:
      getAnonymousNotificationFilter in interface Module
      Parameters:
      email -
      Returns:
      blocked AnonymousNotificationFilters list
      Throws:
      TorqueException
    • getArchiveEmail

      public String getArchiveEmail()
      All emails related to this module will have a copy sent to this address. A system-wide default email address can be specified in JetTiger.properties with the key: scarab.email.archive.toAddress
      Specified by:
      getArchiveEmail in interface Module
      Returns:
      The archiveEmail value
    • getSystemEmail

      public String[] getSystemEmail() throws TorqueException
      The def ault address that is used to fill out either the From or ReplyTo header on emails related to this module. In many cases the From field is taken as the user who acted that resulted in the email, but replies should still go to the central location for the module, so in this address would be used in the ReplyTo field.
      Specified by:
      getSystemEmail in interface Module
      Returns:
      a String[] of length=2 where the first element is a name such as "EasyDesk" and the second is an email address.
      Throws:
      TorqueException
    • initialize

      protected void initialize() throws TorqueException
      새 module 을 초기화한다. template module 로부터 System Default ModuleItemType 등을 생성한다.
      Throws:
      TorqueException - 초기화 중 오류가 발생한 경우
    • getArtifactType

      public ItemType getArtifactType() throws TorqueException
      itemable Object 의 itemType
      Specified by:
      getArtifactType in interface Artifactizable
      Returns:
      itemType
      Throws:
      TorqueException - 조회 중 오류가 발생한 경우
    • getMethodCache

      public MethodResultCache getMethodCache()
      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