Class EntityViewUtil

java.lang.Object
org.iplass.mtp.view.generic.EntityViewUtil

public class EntityViewUtil
extends java.lang.Object
画面定義用ユーティリティクラス
  • Constructor Details

  • Method Details

    • isDisplayElement

      public static boolean isDisplayElement​(java.lang.String definitionName, java.lang.String elementRuntimeId, OutputType outputType, Entity entity)
      エレメントの表示可否を判定します。
      Parameters:
      definitionName - Entity定義名
      elementRuntimeId - エレメントのランタイムID
      outputType - 表示タイプ
      entity - 表示対象のエンティティ
      Returns:
      表示可否
    • getJspPath

      public static java.lang.String getJspPath​(Element element)
      エレメントのJSPファイルパスを取得します。
      Parameters:
      element - エレメント
      Returns:
      JSPファイルパス
    • getJspPath

      public static java.lang.String getJspPath​(Element element, java.lang.String key)
      エレメントのJSPファイルパスを取得します。
      Parameters:
      element - エレメント
      Returns:
      JSPファイルパス
    • getJspPath

      public static java.lang.String getJspPath​(PropertyEditor editor)
      プロパティエディタのJSPファイルパスを取得します。
      Parameters:
      editor - プロパティエディタ
      Returns:
      JSPファイルパス
    • getJspPath

      public static java.lang.String getJspPath​(PropertyEditor editor, java.lang.String key)
      プロパティエディタのJSPファイルパスを取得します。
      Parameters:
      editor - プロパティエディタ
      Returns:
      JSPファイルパス
    • perse

      public static java.util.List<Token> perse​(JoinPropertyEditor editor) throws java.io.IOException
      Throws:
      java.io.IOException
    • collectNestPropertyErrors

      public static ValidateError[] collectNestPropertyErrors​(JoinPropertyEditor editor, java.lang.String prefix, ValidateError[] errors)
    • getSelectPropertyLabel

      public static java.lang.String getSelectPropertyLabel​(java.util.List<LocalizedSelectValueDefinition> localizedList, EditorValue editorValue, java.util.List<SelectValue> valueList)
    • getSelectPropertyLabel

      public static java.lang.String getSelectPropertyLabel​(java.util.List<LocalizedSelectValueDefinition> localizedList, java.lang.String value, java.lang.String defaultLabel)
    • createEditorValueList

      public static java.util.List<EditorValue> createEditorValueList​(SelectProperty sp, java.lang.String lang)
      EditorValueのリストを生成します。
      Parameters:
      sp - 対象SelectProperty
      lang - 言語(多言語利用時に利用されます。nullの場合は、利用可能言語すべてが取得されます)
      Returns:
      EditorValueのリスト
    • createEditorValueList

      public static java.util.List<EditorValue> createEditorValueList​(SelectValueDefinition svd, java.lang.String lang)
      EditorValueのリストを生成します。
      Parameters:
      svd - 対象SelectValueDefinition
      lang - 言語(多言語利用時に利用されます。nullの場合は、利用可能言語すべてが取得されます)
      Returns:
      EditorValueのリスト
    • getStringPropertySelectTypeLabel

      public static java.lang.String getStringPropertySelectTypeLabel​(EditorValue editorValue)
    • getDefautlResourceString

      public static java.lang.String getDefautlResourceString​(java.lang.String key)
      Resourceファイルからデフォルト言語に対応した対象KEYの値を返します。
      Parameters:
      key - Resource Key
      Returns:
      デフォルト言語に対応するリソース値
    • getPropertyDefinition

      public static PropertyDefinition getPropertyDefinition​(java.lang.String propName, EntityDefinition entity)
    • getPropertyDefinition

      public static PropertyDefinition getPropertyDefinition​(VirtualPropertyItem property)
      画面表示用に仮想プロパティ用のプロパティ定義を作成
      Parameters:
      property -
      Returns:
    • getCustomStyle

      public static java.lang.String getCustomStyle​(java.lang.String definitionName, java.lang.String scriptKey, java.lang.String editorScriptKey, Entity entity, java.lang.Object propValue)
      Editorに定義されたカスタムスタイル(表示、入力)を取得
      Parameters:
      definitionName - Entity定義名
      scriptKey - Form/Sectionに設定されたScriptKey(EntityViewにてこのKEYでTemplateをキャッシュ)
      editorScriptKey - Editorに設定されたScriptKey(Sectio単位のキャッシュにこのKEYでEditorのTemplateをキャッシュ)
      entity - 対象Entityデータ(検索条件、新規登録などの場合はnullあり)
      propValue - 対象Propertyデータ
      Returns:
    • referenceSectionCount

      public static long referenceSectionCount​(DetailFormView view, java.lang.String propName)
      指定のプロパティ名を持つ参照セクションの件数を取得します。
      Parameters:
      view - 詳細画面定義
      propName - プロパティ名
      Returns:
      参照セクションの件数
    • getReferenceSectionList

      public static java.util.List<ReferenceSection> getReferenceSectionList​(java.util.List<ReferenceSection> sections, java.util.List<?> elem)
    • sortByOrderProperty

      public static java.util.List<Entity> sortByOrderProperty​(java.util.List<Entity> entities, java.lang.String propertyName, boolean research)
    • sortByOrderProperty

      public static java.util.List<Entity> sortByOrderProperty​(java.util.List<Entity> entities, java.lang.String propertyName)