|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.adapter.WebjectConstants
wt.adapter.BasicWebjectDelegate
A repository for convenience methods which are useful in many webjects.
This class is abstract because it does not implement the required invoke
method. It is intended that concrete WebjectDelegates extend this class
and implement the invoke method, making use of the convenience methods
contained in this class.
Supported API: false
Extendable: false
Field Summary | |
static String |
ATTRIBUTE
|
private static AttributeHelper |
attributeHelper
|
static String |
CLASS
|
static String |
CLASS_ID
|
private static String |
CLASSNAME
|
private static boolean |
ENCODE_ATTRIBUTE_NAMES
|
static long |
EXTERNALIZATION_VERSION_UID
|
static String |
FIELD
|
static String |
GROUP_OUT
|
private static String |
IBARESOURCE
|
static String |
IDENTITY
|
private static String |
LOCAL_DOMAIN
|
private static String |
LOCAL_GUID
|
static String |
OBJECT_ID
|
protected static long |
OLD_FORMAT_VERSION_UID
|
private static ReferenceFactory |
referenceFactory
|
private static String |
RESOURCE
|
(package private) static long |
serialVersionUID
|
private static boolean |
VERBOSE
|
static String |
WHERE
|
Fields inherited from class wt.adapter.WebjectConstants |
FAILURE, MESSAGE, OBJECT, OUTPUT, STATUS, SUCCESS |
Constructor Summary | |
BasicWebjectDelegate()
|
Method Summary | |
protected void |
addAttributeToNode(Element node,
String attributeName,
int value)
Add the specified name/value pair as an attribute to a node. |
void |
addAttributeToNode(Element node,
String attributeName,
String value)
Add the specified name/value pair as an attribute to the node. |
protected Object |
assignValues(Object object,
Hashtable values,
Locale locale)
Assign the values contained in the Hashtable to the object. |
protected Object |
assignValues(Object object,
Hashtable values,
Locale locale,
Properties props)
Assign the values contained in the Hashtable to the object. |
protected Enumeration |
checkInObjects(Enumeration objects)
This method will checkin each object in the set which is checked out. |
protected Enumeration |
checkOutObjects(Enumeration objects)
This method will checkout each object in the set requiring checkout to be updated. |
protected Group |
createGroup(Enumeration results,
String[] outputAttributeNames,
Locale locale)
Create a Group containing all the incoming objects. |
protected Group |
createGroup(Enumeration results,
String[] outputAttributeNames,
Locale locale,
Properties props)
Create a Group containing all the incoming objects. |
protected Group |
createGroup(Object object,
String[] outputAttributeNames,
Locale locale)
Create a Group for one object. |
protected Group |
createGroup(Object object,
String[] outputAttributeNames,
Locale locale,
Properties props)
Create a Group for one object. |
protected Element |
createNode(Object obj,
String[] outputAttributeNames,
Locale locale)
Create a node for the specified object containing the requested attributes. |
protected Element |
createNode(Object obj,
String[] outputAttributeNames,
Locale locale,
Properties props)
Create a node for the specified object containing the requested attributes. |
protected Element |
createNode(Object obj,
String[] outputAttributeNames,
Locale locale,
Properties props,
boolean fresh)
Create a node for the specified object containing the requested attributes. |
protected Object |
createObject(String className,
Hashtable values,
Locale locale)
Create an instance of the specified class, using the values in the Hashtable to initialize the attributes for the instance. |
protected Object |
createObject(String className,
Hashtable values,
Locale locale,
Properties props)
Create an instance of the specified class, using the values in the Hashtable to initialize the attributes for the instance. |
protected Group |
createOutputGroup()
Supported API: false |
protected void |
debug(String message)
Output the specified message to the system console if the system property in wt..properties wt.adapter.verboseWebject=true. |
protected String[] |
getAllAttributeNames(String className)
Supported API: false |
protected AttributeHelper |
getAttributeHelper()
Supported API: false |
static String |
getLocalDomain()
Supported API: false |
protected Locale |
getLocale(Webject webject)
Return an appropriate Locale object, using the information in the ACCEPT-LANGUAGE parameter in the incoming webject. |
static String |
getLocalGuid()
Supported API: false |
private static void |
getLocalRepository()
|
protected Persistable |
getObject(String obid)
Use the specified object reference string to instantiate a wt.fc.Persistable object. |
static Persistable |
getObjectByUfid(String obid)
Supported API: false |
String |
getObjectPropertyValueString(Object object,
String attributeName,
Locale locale)
Return a string representation of the value for the specified attribute for the object. |
String |
getObjectPropertyValueString(Object object,
String attributeName,
Locale locale,
Properties props)
Return a string representation of the value for the specified attribute for the object. |
static WTReference |
getObjectRefByUfid(String obid)
Supported API: false |
protected Enumeration |
getObjects(String className,
String whereClause,
Locale locale)
Return all the objects matching the specified critieria in the whereClause parameter. |
String[] |
getProperties(Webject webject,
String attributeName)
Return an array of String values for the specified parameter from the webject. |
String |
getProperty(Webject webject,
String attributeName)
Return the String value of the specified parameter from the webject. |
protected ReferenceFactory |
getReferenceFactory()
Return an instance of a wt.fc.ReferenceFactory. |
static String |
getUfid(Persistable obj)
Supported API: false |
static String |
getUfid(WTReference ref)
Supported API: false |
static boolean |
isObjectLocal(String obid)
Supported API: false |
protected Hashtable |
parseFields(Webject webject)
Parse an incoming "Field' parameter for a Webject, returning a Hashtable containing the name/value pairs. |
Hashtable |
parseWhere(String whereClause)
Parse the string into a Hashtable containing name/value pairs. |
void |
readExternal(ObjectInput input)
Reads the non-transient fields of this class from an external source. |
private boolean |
readOldVersion(ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source, which is not the current version. |
protected boolean |
readVersion(BasicWebjectDelegate thisObject,
ObjectInput input,
long readSerialVersionUID,
boolean passThrough,
boolean superDone)
Reads the non-transient fields of this class from an external source. |
protected static String |
removeQuotes(String s)
|
void |
writeExternal(ObjectOutput output)
Writes the non-transient fields of this class to an external source. |
Methods inherited from class wt.adapter.WebjectConstants |
readVersion |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface wt.adapter.WebjectDelegate |
invoke |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
static final long serialVersionUID
public static final long EXTERNALIZATION_VERSION_UID
protected static final long OLD_FORMAT_VERSION_UID
private static final String IBARESOURCE
private static boolean VERBOSE
private static boolean ENCODE_ATTRIBUTE_NAMES
private static String LOCAL_DOMAIN
private static String LOCAL_GUID
private static ReferenceFactory referenceFactory
private static AttributeHelper attributeHelper
public static final String CLASS_ID
public static final String IDENTITY
public static final String OBJECT_ID
public static final String ATTRIBUTE
public static final String CLASS
public static final String FIELD
public static final String GROUP_OUT
public static final String WHERE
Constructor Detail |
public BasicWebjectDelegate()
Method Detail |
public void writeExternal(ObjectOutput output) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class WebjectConstants
output
-
IOException
public void readExternal(ObjectInput input) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class WebjectConstants
input
-
IOException
ClassNotFoundException
protected boolean readVersion(BasicWebjectDelegate thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
thisObject
- input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
private boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone) throws IOException, ClassNotFoundException
input
- readSerialVersionUID
- passThrough
- superDone
-
IOException
ClassNotFoundException
public String getProperty(Webject webject, String attributeName)
webject
- attributeName
-
public String[] getProperties(Webject webject, String attributeName)
webject
- attributeName
-
public void addAttributeToNode(Element node, String attributeName, String value)
node
- attributeName
- value
- public String getObjectPropertyValueString(Object object, String attributeName, Locale locale) throws WTException, WTIntrospectionException
object
- attributeName
- locale
-
WTException
WTIntrospectionException
AttributeHelper
public String getObjectPropertyValueString(Object object, String attributeName, Locale locale, Properties props) throws WTException, WTIntrospectionException
object
- attributeName
- locale
- props
-
WTException
WTIntrospectionException
AttributeHelper
public Hashtable parseWhere(String whereClause) throws WebjectServiceException
whereClause
-
WebjectServiceException
protected Element createNode(Object obj, String[] outputAttributeNames, Locale locale) throws WTException
obj
- outputAttributeNames
- locale
-
WTException
protected Element createNode(Object obj, String[] outputAttributeNames, Locale locale, Properties props) throws WTException
obj
- outputAttributeNames
- locale
- props
-
WTException
protected Group createGroup(Enumeration results, String[] outputAttributeNames, Locale locale) throws WTException
results
- outputAttributeNames
- locale
-
WTException
protected Group createGroup(Enumeration results, String[] outputAttributeNames, Locale locale, Properties props) throws WTException
results
- outputAttributeNames
- locale
- props
-
WTException
protected Group createGroup(Object object, String[] outputAttributeNames, Locale locale) throws WTException
object
- outputAttributeNames
- locale
-
WTException
protected Group createGroup(Object object, String[] outputAttributeNames, Locale locale, Properties props) throws WTException
object
- outputAttributeNames
- locale
- props
-
WTException
protected ReferenceFactory getReferenceFactory()
protected Hashtable parseFields(Webject webject)
webject
-
protected void addAttributeToNode(Element node, String attributeName, int value)
node
- attributeName
- value
- protected Persistable getObject(String obid) throws WTException
obid
-
WTException
protected Enumeration getObjects(String className, String whereClause, Locale locale) throws ClassNotFoundException, WTPropertyVetoException, WebjectServiceException, WTException
className
- whereClause
- locale
-
ClassNotFoundException
WTPropertyVetoException
WebjectServiceException
WTException
protected Enumeration checkOutObjects(Enumeration objects) throws WTException
objects
-
WTException
protected Enumeration checkInObjects(Enumeration objects) throws WTException
objects
-
WTException
protected void debug(String message)
message
- protected Object assignValues(Object object, Hashtable values, Locale locale) throws WTException
object
- values
- locale
-
WTException
AttributeHelper
protected Object assignValues(Object object, Hashtable values, Locale locale, Properties props) throws WTException
object
- values
- locale
- props
-
WTException
AttributeHelper
protected Object createObject(String className, Hashtable values, Locale locale) throws WTException
className
- values
- locale
-
WTException
protected Object createObject(String className, Hashtable values, Locale locale, Properties props) throws WTException
className
- values
- locale
- props
-
WTException
protected Locale getLocale(Webject webject)
webject
-
protected AttributeHelper getAttributeHelper()
protected String[] getAllAttributeNames(String className) throws WTException
className
-
WTException
protected Group createOutputGroup()
public static WTReference getObjectRefByUfid(String obid) throws WTException
obid
-
WTException
public static Persistable getObjectByUfid(String obid) throws WTException
obid
-
WTException
public static boolean isObjectLocal(String obid) throws WTException
obid
-
WTException
public static String getUfid(Persistable obj) throws WTException
obj
-
WTException
public static String getUfid(WTReference ref) throws WTException
ref
-
WTException
public static String getLocalDomain() throws WTException
WTException
public static String getLocalGuid() throws WTException
WTException
protected static String removeQuotes(String s)
private static void getLocalRepository() throws WTException
WTException
protected Element createNode(Object obj, String[] outputAttributeNames, Locale locale, Properties props, boolean fresh) throws WTException
obj
- The object from which to create the I*E node.outputAttributeNames
- The names of the attributes to
copy from the object to the I*E node.locale
- The caller's locale.props
- Properties affecting attribute value rendering.fresh
- true if the object is an IBAHolder and its attribute
container has been refreshed already by the caller.
WTException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |