|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.object.ViewUtil
Field Summary | |
static java.lang.String |
code_id
|
protected static Trace |
trace
|
Constructor Summary | |
ViewUtil()
|
Method Summary | |
static boolean |
compareValues(java.lang.Object v1,
java.lang.Object v2)
Compare two values for differences, handling null. |
static void |
copy(java.util.Map src,
java.util.Map dest,
java.lang.String attname)
Copy an attribute from one view to another if it is non-null. |
static boolean |
getBoolean(java.lang.Object value)
Coerce an object into a primitive boolean value. |
static java.util.Date |
getDate(java.lang.Object value)
Coerce an object into a date. |
static EncryptedData |
getEncrypted(GenericObject obj,
java.lang.String name)
Coerce a view attribute into an encrypted string. |
static EncryptedData |
getEncrypted(java.lang.Object value)
Coerce an object into an encrypted string. |
static Form |
getForm(LighthouseContext ctx,
java.lang.String id)
Read a form object stored in the repostiory. |
static Form |
getForm(LighthouseContext ctx,
java.lang.String id,
Type baseType)
|
static Form |
getForm(LighthouseContext ctx,
java.lang.String id,
Type baseType,
boolean checkSystemConfigOverrides)
|
static java.util.List |
getList(java.lang.Object value)
Coerce an object into a list. |
static java.lang.String |
getString(java.lang.Object value)
Coerce an object into a string. |
static void |
put(GenericObject view,
java.lang.String attname,
boolean value)
|
static void |
put(GenericObject view,
java.lang.String attname,
java.util.Date date)
|
static void |
put(GenericObject view,
java.lang.String attname,
EncryptedData value)
|
static void |
put(GenericObject view,
java.lang.String attname,
java.lang.String value)
Assign a view attribute if it is non-null. |
static void |
resolveIncludes(Form form,
ObjectCache cache)
Resolve |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
protected static final Trace trace
Constructor Detail |
public ViewUtil()
Method Detail |
public static Form getForm(LighthouseContext ctx, java.lang.String id) throws WavesetException
WavesetException
public static Form getForm(LighthouseContext ctx, java.lang.String id, Type baseType) throws WavesetException
WavesetException
public static Form getForm(LighthouseContext ctx, java.lang.String id, Type baseType, boolean checkSystemConfigOverrides) throws WavesetException
WavesetException
public static void resolveIncludes(Form form, ObjectCache cache) throws WavesetException
Though includes are represented as ObjectRefs, we resolve them in an unusual way. Since forms can be large, we normally return references directly into the server cache, rather than copying them out to every session cache. This means we have to be careful not to let ObjectRefs resolved within the server cache leak beyond the Session, as this will in effect let a handle to the server cache escape, mayhem ensues.
Further, we can avoid form authorization issues by resolving before the Form leaves the session. The user session does not have to have access to every Configuration object containing forms.
Finally, in a few odd cases like the login form and the login/change password form, we may not even have a session yet, so the application won't have a session cache to use to resolve references.
The cache is expected to be the server cache.
WavesetException
public static boolean compareValues(java.lang.Object v1, java.lang.Object v2)
public static java.lang.String getString(java.lang.Object value)
public static EncryptedData getEncrypted(java.lang.Object value)
public static EncryptedData getEncrypted(GenericObject obj, java.lang.String name)
public static java.util.Date getDate(java.lang.Object value)
public static boolean getBoolean(java.lang.Object value)
public static java.util.List getList(java.lang.Object value)
public static void put(GenericObject view, java.lang.String attname, java.lang.String value) throws WavesetException
WavesetException
public static void put(GenericObject view, java.lang.String attname, boolean value) throws WavesetException
WavesetException
public static void put(GenericObject view, java.lang.String attname, EncryptedData value) throws WavesetException
WavesetException
public static void put(GenericObject view, java.lang.String attname, java.util.Date date) throws WavesetException
WavesetException
public static void copy(java.util.Map src, java.util.Map dest, java.lang.String attname)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |