View Javadoc

1   package com.loribel.commons.business.abstraction;
2   
3   import javax.swing.*;
4   
5   import com.loribel.commons.abstraction.*;
6   
7   /***
8    * Abstraction of property for BusinessObject.
9    * 
10   * @see GB_BOPropertyTools
11   * 
12   * @author Gregory Borelli
13   */
14  public interface GB_BOProperty
15          extends
16              GB_BOPropertySimple,
17              GB_LabelsDescOwner,
18              GB_TsOwner
19  {
20      /***
21       * Values for property semantic.
22       */
23      public static final class SEMANTIC
24      {
25          public static final String DEFAULT = "default";
26          public static final String ID = "id";
27          public static final String FK = "fk";
28          public static final String FK_DB = "fk-db";
29          public static final String FK_LINK = "fk-link";
30          public static final String FK_BO = "fk-bo";
31          //public static final String SINGLE = "single";
32          public static final String CHILD = "child";
33          public static final String LINK = "link";
34          public static final String SEARCH = "search";
35          public static final String DB_INDEX = "db-index";
36      }
37  
38      String getBoType();
39  
40      /***
41       * Getter for defaultValue.
42       */
43      Object getDefaultValue();
44  
45      /***
46       * Getter for displayFormat.
47       */
48      String getDisplayFormat();
49  
50      /***
51       * Getter for editFormat.
52       */
53      String getEditFormat();
54  
55      /*** 
56       * Returns a name of the editor.
57       */
58      String getEditorName();
59  
60      /***
61       * Getter for editRegex.
62       */
63      String getEditRegex();
64  
65      GB_BOEnumValues getEnumValues();
66  
67      /***
68       * Getter for groupName.
69       */
70      String getGroupName();
71  
72      /***
73       * Returns the historyId.
74       */
75      String getHistoryId();
76  
77      /***
78       * Getter for icon.
79       */
80      Icon getIcon();
81  
82      /***
83       * Getter for icon.
84       */
85      //Icon getIcon(String a_name);
86      /***
87       * Getter for label.
88       */
89      //String getLabel(String a_name);
90      /***
91       * Getter for maxSize.
92       */
93      int getMaxSize();
94  
95      /***
96       * Getter for maxValue.
97       */
98      Object getMaxValue();
99  
100     /***
101      * Getter for minSize.
102      */
103     int getMinSize();
104 
105     /***
106      * Getter for minValue.
107      */
108     Object getMinValue();
109 
110     String getPropertyIdLink();
111 
112     /***
113      * Returns the ref id (BOName.propertyName) if the property is defined by reference. 
114      */
115     String getRefId();
116 
117     /***
118      * Getter for unit.
119      */
120     String getUnit();
121 
122     /***
123      * Getter for validationRegex.
124      */
125     String getValidationRegex();
126 
127     /***
128      * Getter for flagAttributeXml.
129      */
130     boolean isAttributeXml();
131 
132     boolean isAutoValidation();
133 
134     /***
135      * Getter for flagGroup.
136      */
137     boolean isGroup();
138 
139     /***
140      * Getter for flagLineWrap.
141      */
142     boolean isLineWrap();
143 
144     /***
145      * Getter for flagNotUse.
146      */
147     boolean isNotUse();
148 
149     /***
150      * Getter for flagOptional.
151      */
152     boolean isOptional();
153 
154     /***
155      * Getter for flagPassword.
156      */
157     boolean isPassword();
158 
159     /***
160      * Getter for flagPropertyMap.
161      */
162     boolean isPropertyMap();
163 
164     /***
165      * Getter for flagReadOnly.
166      */
167     boolean isReadOnly();
168 
169     /***
170      * Getter for flagScrollable.
171      */
172     boolean isScrollable();
173 
174     /***
175      * Getter for flagVisible.
176      */
177     boolean isVisible();
178 
179     /***
180      * Returns the semantics of the property.
181      */
182     String getSemantic();
183 
184     /***
185      * Returns the number to use to build preferred size.
186      * The number can be the number of characters, the number of rows, ...
187      * The value -1 == value not used.
188      */
189     int getPreferredSize();
190 }