wt.enterprise
Class ObjectPropertyValue

java.lang.Object
  extended bywt.enterprise.ObjectPropertyValue

public class ObjectPropertyValue
extends Object



Supported API: false

Extendable: false


Field Summary
protected static String BLANK_SPACE
           
static String PLAIN_TEXT_ONLY
           
protected static boolean VERBOSE
           
 
Constructor Summary
ObjectPropertyValue()
           
 
Method Summary
static Method getGetterMethod(String attribute, Object obj)
          This uses introspection to find the getter method for the object passed in and it's attribute.
protected static String getObjectIdentity(Object object, Locale locale)
           
protected  String getObjectPropertyValueString(String propertyName, Properties parameters, Locale locale, Object obj)
          A utility method that implements some of the basic functionality needed by objectPropertyValue().
protected  String getObjectPropertyValueString(String propertyName, Properties parameters, Locale locale, Object obj, boolean warn)
           
protected  String getParentFolderLink(CabinetBased cabinet_based, String label, Locale locale)
          Returns the String containing the HTML code to display a Hyperlink to the object properties page of the parent folder of the given FolderEntry object.
protected  String getPrincipalEmailLink(WTPrincipalReference principal, String args)
          Returns a String containing the HTML code to display a mail-to hyperlink to the e-mail of the principal referenced by the given WTPrincipalReference.
protected  String getPrincipalEmailLink(WTPrincipal principal, String args)
          Returns a String containing the HTML code to display a mail-to hyperlink to the e-mail of the given principal.
 String getSearchResultsURL(String attribute, String value, String label, String search_objs, Locale locale)
          

Supported API: false
static String objectActionLinkAux(Object obj, String action, String label, Locale locale)
          A utility method that implements some of the basic functionality needed by objectActionLink().
static String objectActionLinkAux(Object obj, String action, String label, Properties params, Locale locale)
          A utility method that implements some of the basic functionality needed by objectActionLink().
static String objectActionLinkAux(Object obj, String action, String label, Properties params, String href_props, Locale locale)
          A utility method that implements some of the basic functionality needed by objectActionLink().
static String objectActionLinkAux(Object obj, String action, String label, String href_props, Locale locale)
          A utility method that implements some of the basic functionality needed by objectActionLink().
 String objectPropertyValueString(Object source, String propertyName, Properties parameters, Locale locale)
           
private  String removeEnclosingQuotes(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERBOSE

protected static boolean VERBOSE

BLANK_SPACE

protected static final String BLANK_SPACE
See Also:
Constant Field Values

PLAIN_TEXT_ONLY

public static final String PLAIN_TEXT_ONLY
See Also:
Constant Field Values
Constructor Detail

ObjectPropertyValue

public ObjectPropertyValue()
Method Detail

objectPropertyValueString

public String objectPropertyValueString(Object source,
                                        String propertyName,
                                        Properties parameters,
                                        Locale locale)
                                 throws WTIntrospectionException,
                                        WTException
Throws:
WTIntrospectionException
WTException

getObjectPropertyValueString

protected String getObjectPropertyValueString(String propertyName,
                                              Properties parameters,
                                              Locale locale,
                                              Object obj)
                                       throws WTIntrospectionException,
                                              WTException
A utility method that implements some of the basic functionality needed by objectPropertyValue(). This method can be called in the java code of TemplateProcessors to retrieve the value of an attribute associated with the context object of that TemplateProcessor.

Supported API: false

Throws:
WTIntrospectionException
WTException

getObjectPropertyValueString

protected String getObjectPropertyValueString(String propertyName,
                                              Properties parameters,
                                              Locale locale,
                                              Object obj,
                                              boolean warn)
                                       throws WTIntrospectionException,
                                              WTException
Throws:
WTIntrospectionException
WTException

removeEnclosingQuotes

private String removeEnclosingQuotes(String value)

getParentFolderLink

protected String getParentFolderLink(CabinetBased cabinet_based,
                                     String label,
                                     Locale locale)
Returns the String containing the HTML code to display a Hyperlink to the object properties page of the parent folder of the given FolderEntry object. If the label used as the text of the hyperlink is not given, this method will use the display identity of the parent folder.

Supported API: false

Parameters:
cabinet_based - the CabinetBased object for which the link to the properties page of the parent folder is returned
label - the String label to use as the link text. If no label is given, the display identity of the parent folder is used.
locale - the Locale in which the link will be displayed
Returns:
a String containing the HTML code to display a hyperlink to the object properties page of the parent folder.

objectActionLinkAux

public static String objectActionLinkAux(Object obj,
                                         String action,
                                         String label,
                                         Locale locale)
                                  throws WTException
A utility method that implements some of the basic functionality needed by objectActionLink(). Returns a String representation of a URL to the specified action on the specified object. This method creates a URL to the given action on the given object with the given label as the link text via the URLProcessor.

Supported API: false

Parameters:
obj - the Object to be the context object of the link
action - the action to link to (i.e. ObjProps)
label - the label to use as the text of the HREF link
Returns:
a String representation of the URL formed
Throws:
WTException

objectActionLinkAux

public static String objectActionLinkAux(Object obj,
                                         String action,
                                         String label,
                                         String href_props,
                                         Locale locale)
                                  throws WTException
A utility method that implements some of the basic functionality needed by objectActionLink(). Returns a String representation of a URL to the specified action on the specified object. This method creates a URL to the given action on the given object with the given label as the link text and the given String HTML to include in the HREF tag.

Supported API: false

Parameters:
obj - the Object to be the context object of the link
action - the action to link to (i.e. ObjProps)
label - the label to use as the text of the HREF link
href_props - a String containing HTML code to be used in the HREF tags.
Returns:
a String representation of the URL formed
Throws:
WTException

objectActionLinkAux

public static String objectActionLinkAux(Object obj,
                                         String action,
                                         String label,
                                         Properties params,
                                         Locale locale)
                                  throws WTException
A utility method that implements some of the basic functionality needed by objectActionLink().

Supported API: false

Throws:
WTException

getPrincipalEmailLink

protected String getPrincipalEmailLink(WTPrincipalReference principal,
                                       String args)
Returns a String containing the HTML code to display a mail-to hyperlink to the e-mail of the principal referenced by the given WTPrincipalReference. The display name of the principal is used as the text of the link. Any additional code to be used in formatting the HREF can be optionally given in the given args string.

Supported API: false

Parameters:
principal - the WTPrincipalReference referencing the principal for which a hyperlink to his/her e-mail is returned.
args - an optional string containing HTML code to be used in building the HREF link.
Returns:
the String containing the HTML code to display a hyperlink to the e-mail of the given principal.

getPrincipalEmailLink

protected String getPrincipalEmailLink(WTPrincipal principal,
                                       String args)
Returns a String containing the HTML code to display a mail-to hyperlink to the e-mail of the given principal. The display name of the principal is used as the text of the link. Any additional code to be used in formatting the HREF can be optionally given in the given args string.

Supported API: false

Parameters:
principal - the WTPrincipal for which a hyperlink to his/her e-mail is returned.
args - an optional string containing HTML code to be used in building the HREF link.
Returns:
the String containing the HTML code to display a hyperlink to the e-mail of the given principal.

getSearchResultsURL

public String getSearchResultsURL(String attribute,
                                  String value,
                                  String label,
                                  String search_objs,
                                  Locale locale)


Supported API: false


getObjectIdentity

protected static String getObjectIdentity(Object object,
                                          Locale locale)

getGetterMethod

public static Method getGetterMethod(String attribute,
                                     Object obj)
                              throws WTException
This uses introspection to find the getter method for the object passed in and it's attribute.

Supported API: false

Parameters:
attribute - for which to find the getter
Throws:
WTException

objectActionLinkAux

public static String objectActionLinkAux(Object obj,
                                         String action,
                                         String label,
                                         Properties params,
                                         String href_props,
                                         Locale locale)
                                  throws WTException
A utility method that implements some of the basic functionality needed by objectActionLink().

Supported API: false

Throws:
WTException