|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.info.LyTag
leon.info.LyInfo
leon.info.LyObjectInfo
leon.info.LyFieldInfo
leon.info.LyFileFieldInfo
public final class LyFileFieldInfo
This class implements the description of a file (path) field from an application class. Displaying the content of this field will be up to the implementation of the graphical component.
Additionally, a fileFieldInfo may contain some extra information about the way the text should be shown (number of rows/columns).
See also tag
Nested Class Summary | |
---|---|
static class |
LyFileFieldInfo.Type
File types. |
Nested classes/interfaces inherited from class leon.info.LyTag |
---|
LyTag.Model |
Field Summary | |
---|---|
static java.lang.String |
__VERSION
|
static java.lang.String |
VALUE_ABSOLUTE
Value : absolute. |
Fields inherited from class leon.info.LyObjectInfo |
---|
NULL, PART_ALL, PART_BIND, PART_DATA, PART_GUI, PART_LABEL |
Method Summary | |
---|---|
LyValue |
buildFieldValue(java.lang.Object value)
Builds the appropriate LyValue corresponding to this field for the given value object. |
java.lang.String |
checkValue(LyEnvironment environment,
java.lang.Object fieldValue)
Checks the given value : - the value must end with gif or jpg or jpeg if image type. |
int |
compare(java.lang.Object value1,
java.lang.Object value2,
java.util.BitSet modifiers)
Compare two objects for the specified fieldInfo. |
boolean |
contains(java.lang.Object value1,
java.lang.Object value2,
java.util.BitSet modifiers)
Checks if the second value is contained in the first one, for this field. |
java.lang.String |
getAttachmentDirectory()
Get Attachment directory used to create the path of files submitted. |
java.lang.String |
getAttachmentHandler()
Get Attachment handler used to encode/decode files submitted. one default implementation is leon.view.web.LyFileDecoder |
java.lang.String |
getDirectory()
Get directory where value of this field is searched. |
java.lang.String |
getFilter()
Get filter applied to this file values. |
LyFilterExpression.Condition[] |
getFilterConditions()
Returns the filter conditions authorized on this field. |
java.lang.String |
getMimeTypes()
Get current mime-types supported by this file field. |
int |
getNCols()
Gets the expected number of columns shown to the end-user. |
int |
getNRows()
Gets the expected number of rows shown to the end-user. |
java.lang.Object |
getPeerValue(java.lang.Object value,
java.lang.Class<?> objectClass,
LyObject instance)
Returns an object of the given class from a value of this fieldInfo. |
LyFileFieldInfo.Type |
getType()
Get types of the file field. |
java.lang.String |
getUrl(LyEnvironment environment,
java.lang.String label)
Utility method to get an URL from a value. |
java.lang.Class<java.lang.String> |
getValueClass()
Returns class of values for this field. |
java.lang.Object |
getValueFromObject(java.lang.Object object,
LyObject instance)
Constructs a value for this fieldInfo from an object for a given instance. |
java.lang.Object |
parse(java.lang.String stringValue)
Builds internal value for an instance of this fieldInfo from a string (previously constructed by toString). |
java.lang.String |
toName(java.lang.Object fieldValue)
Return the specified value for this field as a "displayable" string. |
java.lang.String |
toString(java.lang.Object fieldValue)
Converts the specified value for this field to an "internal" string (string that enables reconstruction through parse). |
Methods inherited from class leon.info.LyObjectInfo |
---|
clone, getAlias, getData, getDataList, getDatas, getFilePrefix, getGroup, getInternalAlias, getInternalFilePrefix, getInternalName, getMarks, getName, getTemplate, getTip, getUserData, hasMark, hasMarks, hasTemplate, isTemplate, putData, putData, removeData, toName |
Methods inherited from class leon.info.LyInfo |
---|
getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString |
Methods inherited from class leon.info.LyTag |
---|
getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.data.LyField |
---|
getId |
Methods inherited from interface leon.parser.LyCommentInterface |
---|
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart |
Field Detail |
---|
public static final java.lang.String __VERSION
public static java.lang.String VALUE_ABSOLUTE
Method Detail |
---|
public java.lang.Class<java.lang.String> getValueClass()
getValueClass
in interface LyField
getValueClass
in class LyFieldInfo
LyObject.getValue(leon.info.LyFieldInfo)
public LyValue buildFieldValue(java.lang.Object value)
buildFieldValue
in interface LyField
buildFieldValue
in class LyFieldInfo
value
- Value from which the LyValue is built.
LyFileValue
public java.lang.Object parse(java.lang.String stringValue) throws LyFieldInfoFormatException
parse
in class LyFieldInfo
stringValue
- The value presented as a string as produced by the toString method.
LyFieldInfoFormatException
- If the string can't be parsed properly.toString(java.lang.Object)
public java.lang.String checkValue(LyEnvironment environment, java.lang.Object fieldValue)
checkValue
in class LyFieldInfo
environment
- Environment giving the user language if a message has to be produced.
LyFieldInfo.getValueClass()
public java.lang.String toName(java.lang.Object fieldValue)
toName
in class LyFieldInfo
LyFieldInfo.getValueClass()
public java.lang.String toString(java.lang.Object fieldValue)
toString
in class LyFieldInfo
parse(java.lang.String)
public int compare(java.lang.Object value1, java.lang.Object value2, java.util.BitSet modifiers)
compare
in class LyFieldInfo
value1
- First value.value2
- Second value.modifiers
- Modifiers used for checking (see MOD_XXX constants of LyFilterExpression).
LyFieldInfo.getValueClass()
public LyFilterExpression.Condition[] getFilterConditions()
getFilterConditions
in class LyFieldInfo
LyFilterExpression
public boolean contains(java.lang.Object value1, java.lang.Object value2, java.util.BitSet modifiers)
contains
in class LyFieldInfo
value1
- First value.value2
- Second value.modifiers
- Modifiers used for checking (see MOD_XXX constants of
LyFilterExpression).
public java.lang.Object getValueFromObject(java.lang.Object object, LyObject instance)
String, String[], Number | String |
getValueFromObject
in class LyFieldInfo
object
- The peer value.instance
- Instance containing the required value (could be null). This instance is
provided to be able to construct a value for complex bindings (bindings
involving other fields).
LyUnsupportedFieldBindingException
- If the requested conversion if none of the
supported conversions.LyFieldInfo.getPeerValue(java.lang.Object, java.lang.Class>, leon.data.LyObject)
,
LyFieldBinding
public java.lang.Object getPeerValue(java.lang.Object value, java.lang.Class<?> objectClass, LyObject instance)
String | String, String[], Number |
getPeerValue
in class LyFieldInfo
value
- Value of this fieldInfo. This value is an instance of the class
returned by getValueClass method.objectClass
- Expected class of the physical value.instance
- Instance containing the given value (could be null).
LyUnsupportedFieldBindingException
- If the requested conversion if none of the
supported conversions.LyFieldInfo.getValueClass()
public int getNRows()
public int getNCols()
public LyFileFieldInfo.Type getType()
public java.lang.String getMimeTypes()
public java.lang.String getAttachmentHandler()
public java.lang.String getAttachmentDirectory()
public java.lang.String getDirectory()
public java.lang.String getFilter()
public java.lang.String getUrl(LyEnvironment environment, java.lang.String label)
label
- the current label of the field
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |