Class CommonHandlers
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconvertDateTimeFormat(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) static voidconvertMillisToReadable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler converts the milliseconds to readable formatstatic voidcreateAttributeMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler creates a map with the given keys and valuesstatic ListfilterAdminObjects(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler filters out AdminObjects from a list-jms-resources, only return Connection Factories.static voidfilterMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) static ListfilterProtocols(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler filters out not required protocols from the list of protocols availablestatic voidfilterTable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) voidgetCurrentTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) Returns the current system time formattedstatic voidgetDefaultAdminTimeout(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) static voidgetFieldLengths(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will be called from baseLayout.xhtml to load the maximum field lengths (maximum number of characters that a user can enter in each field).static voidgetListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns String[] of the given java.util.Liststatic voidgetRequestValue(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns the requestParameter value based on the key.voidhandleError(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) static voidinitClusterSessionAttribute(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will be called during initialization when Cluster Support is detected.static voidinitProductInfoAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This function is called in login.jsf to set the various product specific attributes such as the product GIFs and product names.static voidinitSessionAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will be called during initialization for doing any initialization.static voidisAIX(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) static voidlogout(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method kills the session, and logs out Server Domain Attributes Page.voidlongAdd(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method adds two long integers together.static voidnavigate(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler is different than JSFT's default navigate handler in that it forces the request to NOT be a "partial request".static voidonlyDas(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) static voidredirect(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler redirects to the given page.static voidremoveEmptyProps(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) Remove the properties if the key(name) is empty.static voidremoveListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler removes the given element from the liststatic voidselectiveEncode(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns the encoded String using the type specified.static voidsetComponentRequired(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method sets the required attribute of a UI component .static voidsetPartialRequest(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler allows the "partialRequest" flag to be set.static voidsetValueExpression(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler sets a property on an object which is stored in an existing key For example "advance.lazyConnectionEnlistment".static voidtestExists(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) Test if a particular attribute exists.
-
Constructor Details
-
CommonHandlers
public CommonHandlers()Creates a new instance of CommonHandlers
-
-
Method Details
-
initClusterSessionAttribute
public static void initClusterSessionAttribute(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will be called during initialization when Cluster Support is detected. -
initSessionAttributes
public static void initSessionAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will be called during initialization for doing any initialization. -
getFieldLengths
public static void getFieldLengths(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler will be called from baseLayout.xhtml to load the maximum field lengths (maximum number of characters that a user can enter in each field).
-
initProductInfoAttributes
public static void initProductInfoAttributes(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This function is called in login.jsf to set the various product specific attributes such as the product GIFs and product names. A similar function is called for Sailfin to set Sailfin specific product GIFs and name. The function is defined in com.sun.extensions.comms.SipUtilities -
getListElement
public static void getListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns String[] of the given java.util.ListOutput value: "selectedIndex" -- Type:
Object/- Parameters:
handlerCtx- The HandlerContext.
-
removeListElement
public static void removeListElement(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler removes the given element from the listOutput value: "finalList" -- Type:
List/- Parameters:
handlerCtx- The HandlerContext.
-
convertMillisToReadable
public static void convertMillisToReadable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler converts the milliseconds to readable formatOutput value: "readableString" -- Type:
String/- Parameters:
handlerCtx- The HandlerContext.
-
createAttributeMap
public static void createAttributeMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler creates a map with the given keys and valuesOutput value: "map" -- Type:
Map/- Parameters:
handlerCtx- The HandlerContext.
-
selectiveEncode
public static void selectiveEncode(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns the encoded String using the type specified.If type is not specified, it defaults to UTF-8.
- Input value: "value" -- Type:
String - Input value: "delim" -- Type:
String - Input Value: "type" -- Type:
String - Output Value: "result" -- Type:
String
- Parameters:
handlerCtx- The HandlerContext.
- Input value: "value" -- Type:
-
logout
public static void logout(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method kills the session, and logs out Server Domain Attributes Page.Input value: "page" -- Type:
java.lang.String- Parameters:
handlerCtx- The HandlerContext.
-
setComponentRequired
public static void setComponentRequired(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method sets the required attribute of a UI component .- Input value: "id" -- Type:
java.lang.String - Input value: "required" -- Type:
java.lang.String
- Parameters:
handlerCtx- The HandlerContext.
- Input value: "id" -- Type:
-
testExists
public static void testExists(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) Test if a particular attribute exists. It will look at request scope, then page, then session. -
removeEmptyProps
public static void removeEmptyProps(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) Remove the properties if the key(name) is empty. -
getRequestValue
public static void getRequestValue(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler returns the requestParameter value based on the key. If it doesn't exists, then it will look at the request attribute. If there is no request attribute, it will return the default, if specified.This method will "html escape" any <, >, or & characters that appear in a String from the QUERY_STRING. This is to help prevent XSS vulnerabilities.
orig without escape is available, but be very cautious when using it.
- Input value: "key" -- Type:
String - Output value: "value" -- Type:
String - Output value: "orig" -- Type:
String
- Input value: "key" -- Type:
-
longAdd
public void longAdd(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This method adds two long integers together. The 2 longs should be stored in "long1" and "long2". The result will be stored as "result". -
getCurrentTime
public void getCurrentTime(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) Returns the current system time formattedOutput value: "Time" -- Type:
String -
handleError
public void handleError(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) -
onlyDas
public static void onlyDas(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) -
setValueExpression
public static void setValueExpression(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) This handler sets a property on an object which is stored in an existing key For example "advance.lazyConnectionEnlistment". Note: This does not evaluate the EL expression. Its value (e.g., "#{advance.lazyConnectionEnlistment}") is passed as is to the EL API. -
convertDateTimeFormat
public static void convertDateTimeFormat(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) -
setPartialRequest
public static void setPartialRequest(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler allows the "partialRequest" flag to be set. This was added to work-a-round a bug in JSF where the behavior was inconsistent between FF and other browsers. Namely it recognized redirects as "partial" requets in other browsers due to the header being preserved across the redirect, but not in FF.
-
redirect
public static void redirect(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler redirects to the given page.
Input value: "page" -- Type:
String- Parameters:
context- TheHandlerContext.
-
filterTable
public static void filterTable(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) -
filterMap
public static void filterMap(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) -
isAIX
public static void isAIX(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx) -
filterProtocols
public static List filterProtocols(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler filters out not required protocols from the list of protocols available
-
filterAdminObjects
public static List filterAdminObjects(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext context) This handler filters out AdminObjects from a list-jms-resources, only return Connection Factories.
-
getDefaultAdminTimeout
public static void getDefaultAdminTimeout(com.sun.jsftemplating.layout.descriptors.handler.HandlerContext handlerCtx)
-