Interface Module

All Superinterfaces:
Artifactizable, Identifiable<Long>
All Known Implementing Classes:
CategoryModule, EasyDeskModule, TemplateModule, UserModule

public interface Module extends Artifactizable, Identifiable<Long>
  • ALL : Dummy Module for All module Query
  • GLOBAL : Root Module for All Module
  • |--EASYDESK : Web Service Module
  • |--TemplateModule : Template Module for all User Module ( template itemtype lives only )
  • |--CategoryModule : Category User Module TOP Module
  • |-- CategoryModule CATEGORY_A
  • | |-- UserModule A
  • | |-- UserModule B
  • |
  • |-- CategoryModule CATEGORY_B
  • Author:
    Youngho Cho
    • Field Details

      • CODE_PATTERN

        static final Pattern CODE_PATTERN
        Module Code Pattern, all alpabet upper case length is from 4 to 8
    • Method Details

      • getPrimaryKey

        ObjectKey<?> getPrimaryKey()
        DOCUMENT ME!
        Specified by:
        getPrimaryKey in interface Artifactizable
        Returns:
        DOCUMENT ME!
      • isActive

        boolean isActive()
        module not deleted and not locked only active module can be used for new item creation
        Returns:
        DOCUMENT ME!
      • setName

        void setName(String name)
        DOCUMENT ME!
        Parameters:
        name - DOCUMENT ME!
      • getName

        String getName()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getCode

        String getCode()
        Gets the code attribute of the Module object
        Returns:
        The code value
      • setCode

        void setCode(String code)
        Sets the code attribute of the Module object
        Parameters:
        code - The new code value
        See Also:
      • getDomain

        String getDomain()
        www.foo.com
        Returns:
        The domain value
      • setDomain

        void setDomain(String domain)
        Sets the domain attribute of the Module object
        Parameters:
        domain - The new domain value
      • getGroup

        <G extends Group> G getGroup()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • getId

        Long getId()
        (non-Javadoc)
        Specified by:
        getId in interface Identifiable<Long>
        Returns:
        The Id of the entity.
        See Also:
      • setId

        void setId(Long id)
        (non-Javadoc)
        Specified by:
        setId in interface Identifiable<Long>
        Parameters:
        id - The new Id of the entity
        See Also:
      • getParentId

        Long getParentId()
        Group's hiearachy support
        Returns:
        DOCUMENT ME!
      • setParentId

        void setParentId(Long parentId)
        부모 module id 를 설정한다.
        Parameters:
        parentId - 부모 module id
      • getTemplateId

        Long getTemplateId()
        Returns:
        DOCUMENT ME!
      • setTemplateId

        void setTemplateId(Long templateId)
        template module id 를 설정한다.
        Parameters:
        templateId - template module id
      • getParent

        Module getParent()
        DOCUMENT ME!
        Returns:
        Parent Module
      • getTemplate

        Module getTemplate() throws TorqueException
        이 module 의 template module 을 구한다.
        Returns:
        Template Module
        Throws:
        TorqueException - 조회 중 오류가 발생한 경우
      • save

        void save() throws Exception
        Stores an object in the database. If the object is new, it is inserted; otherwise an update is performed.
        Throws:
        Exception - if an error occurs during saving.
      • getArchiveEmail

        String getArchiveEmail()
        All emails related to this module will have a copy sent to this address.
        Returns:
        The archiveEmail value
      • getSystemEmail

        String[] getSystemEmail() throws TorqueException
        The default 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.
        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
      • getLocale

        Locale getLocale()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • setLocale

        void setLocale(Locale locale)
        DOCUMENT ME!
        Parameters:
        locale - DOCUMENT ME!
      • getNewItem

        Item getNewItem(ItemType itemType, ActivitySet activitySet) throws Exception
        itemType template 를 적용하여 newItem 을 만든다.
        Parameters:
        itemType - 생성할 item 의 ItemType
        activitySet - 현재 처리중인 ActivitySet
        Returns:
        new item
        Throws:
        Exception - item 생성 중 오류가 발생한 경우
      • getNewItem

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

        Item getNewItem(Item template) throws TorqueException
        template item 으로부터 새 item 을 만든다.
        Parameters:
        template - template item
        Returns:
        new item
        Throws:
        TorqueException - item 생성 중 오류가 발생한 경우
      • isRoot

        default boolean isRoot()
        ALL 이 아닌 것 중, ParentId 가 자신의 id 와 같을 때 ( GroupEnum.GLOBAL only)
        Returns:
      • isGlobal

        default boolean isGlobal()
        Returns true if this module is the top level parent module.
        Returns:
        a boolean value
      • isTemplate

        boolean isTemplate()
        DOCUMENT ME!
        Returns:
        DOCUMENT ME!
      • has

        boolean has(ItemType itemType) throws TorqueException
        DOCUMENT ME!
        Parameters:
        itemType - DOCUMENT ME!
        Returns:
        true if thie module has ModuleItemType which is the same as ItemType
        Throws:
        TorqueException - DOCUMENT ME!
      • has

        boolean has(ItemTypeAttribute itemTypeAttribute) throws TorqueException
        Module 에 ItemTypeAttribute 가 등록되어 있는지 확인한다.
        Parameters:
        itemTypeAttribute - 확인할 ItemTypeAttribute
        Returns:
        등록되어 있으면 true
        Throws:
        TorqueException - 조회 중 오류가 발생한 경우
      • getDescendants

        List<Module> getDescendants(boolean template) throws TorqueException
        Parameters:
        template -
        Returns:
        Throws:
        TorqueException
      • getTemplateTypes

        List<ItemType> getTemplateTypes() throws Exception
        Template ItemType 은 ModuleItemType 이 존재하지 않는다. 따라서 Module 에서 Template ItemType 의 정보는 이 method 를 이용한다.
        Returns:
        template itemType
        Throws:
        Exception - 조회 중 오류가 발생한 경우
      • getModuleItemType

        @Nullable ModuleItemType getModuleItemType(ItemType itemType) throws TorqueException
        이 Module 에 등록되어 있는 ModuleItemType 을 구한다. TODO return Optional ?
        Parameters:
        itemType - itemType
        Returns:
        ModuleItemType
        Throws:
        TorqueException - DOCUMENT ME!
      • getModuleItemTypes

        List<ModuleItemType> getModuleItemTypes() throws TorqueException
        This method returns a complete list of ModuleItemTypes which are active and not deleted, have a ItemType.PARENT_ID of 0 and sorted ascending by PREFERRED_ORDER.
        Returns:
        ModuleItemType 목록
        Throws:
        TorqueException - 조회 중 오류가 발생한 경우
      • getModuleItemTypes

        List<ModuleItemType> getModuleItemTypes(Attribute attribute) throws TorqueException
        DOCUMENT ME!
        Parameters:
        attribute - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
        Throws:
        TorqueException - DOCUMENT ME!
      • getModuleItemTypes

        List<ModuleItemType> getModuleItemTypes(AttributeGroupType agType) throws TorqueException
        DOCUMENT ME!
        Parameters:
        agType - DOCUMENT ME!
        Returns:
        DOCUMENT ME!
        Throws:
        TorqueException - DOCUMENT ME!
      • getUsers

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

        LargeSelect<EasyDeskUserImpl> getUsers(int resultsPerPage, Role... role) throws TorqueException
        Parameters:
        resultsPerPage -
        role -
        Returns:
        The users LargeSelect who has the roles
        Throws:
        Exception - Description of the Exception
        TorqueException
      • getAnonymousNotificationFilter

        List<AnonymousNotificationFilter> getAnonymousNotificationFilter(String email) throws TorqueException
        Parameters:
        email -
        Returns:
        blocked AnonymousNotificationFilters list
        Throws:
        TorqueException