Package org.iplass.mtp.view.generic
Class EntityViewUtil
java.lang.Object
org.iplass.mtp.view.generic.EntityViewUtil
画面定義用ユーティリティクラス
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ValidateError[]collectNestPropertyErrors(JoinPropertyEditor editor, String prefix, ValidateError[] errors) static List<EditorValue> createEditorValueList(SelectProperty sp, String lang) EditorValueのリストを生成します。static List<EditorValue> createEditorValueList(SelectValueDefinition svd, String lang) EditorValueのリストを生成します。static StringgetCustomStyle(String definitionName, String scriptKey, String editorScriptKey, Entity entity, Object propValue) Editorに定義されたカスタムスタイル(表示、入力)を取得static StringResourceファイルからデフォルト言語に対応した対象KEYの値を返します。static StringgetJspPath(PropertyEditor editor) プロパティエディタのJSPファイルパスを取得します。static StringgetJspPath(PropertyEditor editor, String key) プロパティエディタのJSPファイルパスを取得します。static StringgetJspPath(Element element) エレメントのJSPファイルパスを取得します。static StringgetJspPath(Element element, String key) エレメントのJSPファイルパスを取得します。static PropertyDefinitiongetNestTablePropertyDefinition(NestProperty nestProperty, EntityDefinition entityDefinition) ネストテーブルプロパティのプロパティ定義を取得static PropertyDefinitiongetPropertyDefinition(String propName, EntityDefinition entity) static PropertyDefinitiongetPropertyDefinition(VirtualPropertyItem property) 画面表示用に仮想プロパティ用のプロパティ定義を作成static List<ReferenceSection> getReferenceSectionList(List<ReferenceSection> sections, List<?> elem) static StringgetSelectPropertyLabel(List<LocalizedSelectValueDefinition> localizedList, String value, String defaultLabel) static StringgetSelectPropertyLabel(List<LocalizedSelectValueDefinition> localizedList, EditorValue editorValue, List<SelectValue> valueList) static StringgetStringPropertySelectTypeLabel(EditorValue editorValue) static booleanisDisplayElement(String definitionName, String elementRuntimeId, OutputType outputType, Entity entity) エレメントの表示可否を判定します。perse(JoinPropertyEditor editor) static longreferenceSectionCount(DetailFormView view, String propName) 指定のプロパティ名を持つ参照セクションの件数を取得します。sortByOrderProperty(List<Entity> entities, String propertyName) sortByOrderProperty(List<Entity> entities, String propertyName, boolean research)
-
Constructor Details
-
EntityViewUtil
public EntityViewUtil()
-
-
Method Details
-
isDisplayElement
public static boolean isDisplayElement(String definitionName, String elementRuntimeId, OutputType outputType, Entity entity) エレメントの表示可否を判定します。- Parameters:
definitionName- Entity定義名elementRuntimeId- エレメントのランタイムIDoutputType- 表示タイプentity- 表示対象のエンティティ- Returns:
- 表示可否
-
getJspPath
エレメントのJSPファイルパスを取得します。- Parameters:
element- エレメント- Returns:
- JSPファイルパス
-
getJspPath
エレメントのJSPファイルパスを取得します。- Parameters:
element- エレメント- Returns:
- JSPファイルパス
-
getJspPath
プロパティエディタのJSPファイルパスを取得します。- Parameters:
editor- プロパティエディタ- Returns:
- JSPファイルパス
-
getJspPath
プロパティエディタのJSPファイルパスを取得します。- Parameters:
editor- プロパティエディタ- Returns:
- JSPファイルパス
-
perse
- Throws:
IOException
-
collectNestPropertyErrors
public static ValidateError[] collectNestPropertyErrors(JoinPropertyEditor editor, String prefix, ValidateError[] errors) -
getSelectPropertyLabel
public static String getSelectPropertyLabel(List<LocalizedSelectValueDefinition> localizedList, EditorValue editorValue, List<SelectValue> valueList) -
getSelectPropertyLabel
public static String getSelectPropertyLabel(List<LocalizedSelectValueDefinition> localizedList, String value, String defaultLabel) -
createEditorValueList
EditorValueのリストを生成します。- Parameters:
sp- 対象SelectPropertylang- 言語(多言語利用時に利用されます。nullの場合は、利用可能言語すべてが取得されます)- Returns:
- EditorValueのリスト
-
createEditorValueList
EditorValueのリストを生成します。- Parameters:
svd- 対象SelectValueDefinitionlang- 言語(多言語利用時に利用されます。nullの場合は、利用可能言語すべてが取得されます)- Returns:
- EditorValueのリスト
-
getStringPropertySelectTypeLabel
-
getDefautlResourceString
Resourceファイルからデフォルト言語に対応した対象KEYの値を返します。- Parameters:
key- Resource Key- Returns:
- デフォルト言語に対応するリソース値
-
getPropertyDefinition
-
getPropertyDefinition
画面表示用に仮想プロパティ用のプロパティ定義を作成- Parameters:
property-- Returns:
-
getNestTablePropertyDefinition
public static PropertyDefinition getNestTablePropertyDefinition(NestProperty nestProperty, EntityDefinition entityDefinition) ネストテーブルプロパティのプロパティ定義を取得- Parameters:
nestProperty- ネストプロパティentityDefinition- ネストテーブルのEntity定義- Returns:
- プロパティ定義
-
getCustomStyle
public static String getCustomStyle(String definitionName, String scriptKey, String editorScriptKey, Entity entity, 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
指定のプロパティ名を持つ参照セクションの件数を取得します。- Parameters:
view- 詳細画面定義propName- プロパティ名- Returns:
- 参照セクションの件数
-
getReferenceSectionList
public static List<ReferenceSection> getReferenceSectionList(List<ReferenceSection> sections, List<?> elem) -
sortByOrderProperty
-
sortByOrderProperty
-