public class AttrLOV
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
DYNAMICLOV |
static int |
STATICLOV |
Modifier and Type | Method and Description |
---|---|
boolean |
addDisplayRealPair(java.lang.String display, java.lang.String real)
This method adds real value and corresponding display value pair to this object.
|
boolean |
addDisplayRealPair(java.lang.String display, java.lang.String real, java.util.Locale locale)
This method adds real value and corresponding locale specfic display value pair to this object.
|
static AttrLOV |
createAttrLOV(java.lang.String attrname, javax.naming.directory.DirContext ctx, java.lang.String attrdn, javax.naming.directory.Attributes attrEntry)
Factory method for creating instances of this class.
|
java.lang.String |
getDisplayVal(java.lang.String realval)
This methods returns "default" display value corresponding to the real value.
|
java.lang.String |
getDisplayVal(java.lang.String realval, java.util.Locale locale)
This methods returns "language specific" display value corresponding to the real value.
|
int |
getLOVType()
This methods returns one of the followings STATICLOV - LOV supports external representation for UI displayname and related value for setting the internal value of the attribute DYNAMICLOV - LOV uses the value as display and internal setting
|
java.lang.String[] |
getRealVals()
This methods returns array of all real values.
|
int |
getSize()
Returns LOV size.
|
java.util.List |
getSortedDisplayRealPairs(java.util.Locale locale)
This methods returns List of all Display-real value pairs present in this object.
|
static void |
main(java.lang.String[] args) |
boolean |
persistToDIR(javax.naming.directory.DirContext dirctx)
To persist LOV information to OID.
|
java.lang.String |
toString() |
public static AttrLOV createAttrLOV(java.lang.String attrname, javax.naming.directory.DirContext ctx, java.lang.String attrdn, javax.naming.directory.Attributes attrEntry)
attrname
- attribute namectx
- Directory context required for searchattrdn
- DN of attribute configuration entryattrEntry
- attributes of attribute configration entrypublic boolean persistToDIR(javax.naming.directory.DirContext dirctx) throws java.lang.Exception
java.lang.Exception
public int getSize()
public boolean addDisplayRealPair(java.lang.String display, java.lang.String real)
display
- display valuereal
- real valuepublic boolean addDisplayRealPair(java.lang.String display, java.lang.String real, java.util.Locale locale)
display
- display valuereal
- real valuelocale
- locale specfiying the languagepublic java.lang.String getDisplayVal(java.lang.String realval)
realval
- real valuepublic java.lang.String getDisplayVal(java.lang.String realval, java.util.Locale locale)
realval
- real valuelocale
- locale specifying the languagepublic java.lang.String[] getRealVals()
public java.util.List getSortedDisplayRealPairs(java.util.Locale locale)
locale
- locale specifying the languagepublic int getLOVType()
public static void main(java.lang.String[] args)
public java.lang.String toString()
toString
in class java.lang.Object