Class OptionAttribute

All Implemented Interfaces:
Viewable, Cacheable, Observed, Retrievable, Serializable, ColumnAccessByName, ObjectModel, Persistent
Direct Known Subclasses:
MultiOptionValueAttribute, SelectOneAttribute

public abstract class OptionAttribute extends FreeFormAttribute
this is a superclass for attributes which use option lists (SelectOne, Voted) Default Behavior 로 AttributeValue 의 값은 여러개를 허용한다.
Version:
$Revision: 1.38 $ $Date: 2008/12/25 04:03:44 $
Author:
Youngho Cho
See Also:
  • Constructor Details

    • OptionAttribute

      protected OptionAttribute()
      Creates a new OptionAttribute object.
  • Method Details

    • setOption

      public void setOption(ModuleOption option) throws TorqueException
      DOCUMENT ME!
      Parameters:
      option - DOCUMENT ME!
      Throws:
      TorqueException - DOCUMENT ME!
    • setResources

      public void setResources(Object resources)
      this method is used by an Attribute instance to obtain specific resources such as option list for SelectOneAttribute. It may, for example put them into instance variables. Attribute may use common resources as-is or create it's own resources based on common, it should not, however, modify common resources since they will be used by other Attribute instances.
      Overrides:
      setResources in class FreeFormAttribute
      Parameters:
      resources - Resources common for Attributes with the specified id.
    • loadResources

      public Object loadResources(ActivitySet activitySet) throws Exception
      Returns null
      Overrides:
      loadResources in class FreeFormAttribute
      Parameters:
      activitySet - specific activitySet
      Returns:
      Object containing Attribute resources which will be used in setResources.
      Throws:
      Exception - 처리 중 오류가 발생한 경우
    • hasValue

      public boolean hasValue(Object checkValue) throws Exception
      DOCUMENT ME!
      Specified by:
      hasValue in class AttributeValue
      Parameters:
      checkValue - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
      Throws:
      Exception - DOCUMENT ME!
    • getDisplayedValue

      public CharSequence getDisplayedValue(String type) throws Exception
      기본 locale(아이템의 locale)로 화면에 표시할 값을 구한다.
      Overrides:
      getDisplayedValue in class FreeFormAttribute
      Parameters:
      type - 표시 형식
      Returns:
      화면에 표시할 값
      Throws:
      Exception - 값을 구하는 중 오류가 발생한 경우
    • getDisplayedValue

      public CharSequence getDisplayedValue(String type, Locale locale) throws Exception
      지정한 locale 로 화면에 표시할 값을 구한다. 현재는 저장된 값을 그대로 반환한다.
      Overrides:
      getDisplayedValue in class FreeFormAttribute
      Parameters:
      type - 표시 형식
      locale - 표시에 사용할 locale
      Returns:
      화면에 표시할 값
      Throws:
      Exception - 값을 구하는 중 오류가 발생한 경우
    • getFormatter

      public Object getFormatter(Locale locale) throws Exception
      default same as value
      Overrides:
      getFormatter in class FreeFormAttribute
      Parameters:
      locale - 표시에 사용할 locale
      Returns:
      object
      Throws:
      Exception - 값을 구하는 중 오류가 발생한 경우