Package com.sun.identity.console.base
Class AMViewBeanBase
- java.lang.Object
-
- com.iplanet.jato.view.ViewBase
-
- com.iplanet.jato.view.ContainerViewBase
-
- com.iplanet.jato.view.RequestHandlingViewBase
-
- com.iplanet.jato.view.ViewBeanBase
-
- org.forgerock.openam.console.base.ConsoleViewBeanBase
-
- com.sun.identity.console.base.AMViewBeanBase
-
- All Implemented Interfaces:
com.iplanet.jato.RequestCompletionListener,com.iplanet.jato.RequestHandler,com.iplanet.jato.RequestParticipant,com.iplanet.jato.view.ContainerView,com.iplanet.jato.view.View,com.iplanet.jato.view.ViewBean,com.iplanet.jato.view.WebActionHandler,com.iplanet.jato.view.WebActions
- Direct Known Subclasses:
AMAdminFrameViewBean,AMInvalidURLViewBean,AMPrimaryMastHeadViewBean,AMUncaughtExceptionViewBean,AuthenticatedViewBean,CloseWindowViewBean,ConditionProxyViewBean,FileUploaderViewBean,MAPClientManagerViewBean,MAPCreateDeviceTwoViewBean,MAPCreateDeviceViewBean,MAPDeviceProfileViewBean,MAPDuplicationDeviceViewBean,MessageViewBean,PolicyConditionPluginViewBeanBase,PolicySubjectPluginViewBeanBase,ReferralProxyViewBean,ResponseProviderPluginViewBeanBase,ResponseProviderProxyViewBean,ScriptUploaderViewBean,SelectRealmViewBean,SubjectProxyViewBean,VersionViewBean
public abstract class AMViewBeanBase extends ConsoleViewBeanBase
This is the base class for all view beans in Console.
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringBTN_GHOSTstatic Debugdebugprotected booleaninitializedprotected static StringPG_SESSION_ATTRprotected static StringPG_SESSION_ATTR_IDprotected static StringPG_SESSION_SSO_IDprotected static StringSZ_CACHE-
Fields inherited from class com.iplanet.jato.view.ViewBeanBase
DEFAULT_COMMAND_CHILD_NVP_NAME, DISPLAY_EVENT_COMPLETED_REQUEST_ATTRIBUTE_NAME, OPTION_USE_PAGE_SESSION_FOR_DEFAULT_COMMAND_CHILD
-
Fields inherited from class com.iplanet.jato.view.RequestHandlingViewBase
HANDLE_REQUEST_METHOD_PREFIX, HANDLE_REQUEST_METHOD_SUFFIX
-
Fields inherited from class com.iplanet.jato.view.ContainerViewBase
BEGIN_DISPLAY_EVENT_METHOD_PREFIX, BEGIN_DISPLAY_EVENT_METHOD_SUFFIX, END_DISPLAY_EVENT_METHOD_PREFIX, END_DISPLAY_EVENT_METHOD_SUFFIX, eventMethodRegistry, OPTION_ENABLE_QUALIFIELD_CHILD_NAME_LOOKUPS, OPTION_USE_LEGACY_DISPLAY_EVENT_SIGNATURES
-
Fields inherited from interface com.iplanet.jato.view.ViewBean
PAGE_SESSION_ATTRIBUTE_NVP_NAME, VIEW_BEAN_NAME_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description AMViewBeanBase(String name)Creates an instance of base view bean object
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddBlankTextField(String name)Includes a static text field that should be blanked.protected StringappendPgSession(String url)Appends page session string to URLbooleanbeginChildDisplay(com.iplanet.jato.view.event.ChildDisplayEvent event)voidbeginDisplay(com.iplanet.jato.view.event.DisplayEvent event)protected voidbypassForwardTo(com.iplanet.jato.RequestContext rc)static StringcharToHex(char c)protected com.iplanet.jato.view.ViewcreateChild(String name)Creates user interface components used by this view bean.com.iplanet.jato.view.html.OptionListcreateOptionList(Collection collection)Returns an option list object that contains options for a given collection of string.static com.iplanet.jato.view.html.OptionListcreateOptionList(Collection collection, Locale locale)Returns an option list object that contains options for a given collection of string.static com.iplanet.jato.view.html.OptionListcreateOptionList(Collection collection, Locale locale, boolean bSort)Returns an option list object that contains options for a given collection of string.com.iplanet.jato.view.html.OptionListcreateOptionList(Map map)Returns a option list object that contains options for a given map of value to its localized string.static com.iplanet.jato.view.html.OptionListcreateOptionList(Map map, Locale locale)Returns a option list object that contains options for a given map of value to its localized string.protected voiddeserializePageAttributes()voiddisableButton(String btnName, boolean disable)voidforwardTo(com.iplanet.jato.RequestContext rc)protected StringgetBackButtonLabel(String label)Creates the label used to take the user back to the previous page they were viewing.SetgetBlankTextFields()Returns a set of static text field' names that should be blanked.AMViewBeanBasegetCallingView()protected StringgetCharset()StringgetCharset(AMModel model)Gets current charsetprotected StringgetContentType()StringgetCurrentLocation()Gets the name of the current location.StringgetCurrentLocationDN()Gets the current location DN.protected StringgetCurrentRealm()protected StringgetCurrentRealmEncoded()Get the current realm, encoded as a path element.static ListgetList(com.iplanet.jato.view.html.OptionList optList)Returns a list of string from a option list items.AMModelgetModel()Returns model for this view bean.protected abstract AMModelgetModelInternal()Returns model for this view bean.protected MapgetPageSessionAttributes()StringgetPageSessionAttributeString()StringgetPath(String child)protected StringgetRequestURL()protected StringgetServiceNameForAccessControl()LocalegetUserLocale()static SetgetValues(com.iplanet.jato.view.html.OptionList optList)Returns a set of string from a option list items.voidhandleGRequest(com.iplanet.jato.view.event.RequestInvocationEvent event)Does nothing, just forwards to the same view beanstatic StringhexToString(String str)voidhideTableSelectionIcons(String tableName)Hides the selection checkboxes in table.protected voidinitialize()protected booleanisInlineAlertMessageSet()Returns true if inline alert message is set.protected voidmapRequestParameter(com.iplanet.jato.view.DisplayField field, Object[] childValues)Overwriting this map so that we correct the set value for OpenSSO's proprietory taglib component,SerializedField.voidpassPgSessionMap(com.iplanet.jato.view.ViewBean other)Pass session attribute map to other view beanvoidpassPgSessionMap(com.iplanet.jato.view.ViewBean other, Map attributes)Pass session attribute map to other view beanprotected voidperformDelegationTasks()protected voidredirectToStartURL()protected voidregisterChildren()Registers user interface components used by this view bean.protected voidresetButtonState(String btnName)voidresetView()Reset the view bean.voidsetCurrentLocation(String dn)Set location DNprotected voidsetInlineAlertMessage(String type, String title, String message)Set inline alert message.protected voidsetInlineAlertMessage(String type, String title, String message, boolean encode)Set inline alert message.protected voidsetPageSessionAttributes(Map value)protected voidsetRequestContentInitialize(com.iplanet.jato.RequestContext context)voidsetRequestContext(com.iplanet.jato.RequestContext context)static StringstringToHex(String str)-
Methods inherited from class com.iplanet.jato.view.ViewBeanBase
clearPageSessionAttributes, forward, forwardTo, getDefaultCommandDescriptor, getDefaultDisplayURL, getDisplayURL, getLogicalName, getModuleURL, getPageSessionAttribute, getPageSessionAttributeString, getRequestInvocationName, getRequestInvocationName, handleDeserializePageAttributesException, include, include, include, invokeRequestHandler, invokeRequestHandlerInternal, mapRequestParameters, removePageSessionAttribute, securityCheck, setDefaultCommandDescriptor, setDefaultDisplayURL, setPageSessionAttribute
-
Methods inherited from class com.iplanet.jato.view.RequestHandlingViewBase
acceptRequest, afterAllModelsExecute, afterAllWebActionModelsExecute, afterHandleRequestCommandExecution, afterModelExecutes, afterWebActionModelExecutes, appMessage, beforeHandleRequestCommandExecution, beforeModelExecutes, beforeWebActionModelExecutes, createDefaultExecutionContext, executeAutoDeletingModel, executeAutoDeletingModels, executeAutoExecutingModel, executeAutoExecutingModels, executeAutoInsertingModel, executeAutoInsertingModels, executeAutoRetrievingModel, executeAutoRetrievingModels, executeAutoRetrievingModels, executeAutoUpdatingModel, executeAutoUpdatingModels, getAutoDeletingModels, getAutoExecutingModels, getAutoInsertingModels, getAutoRetrieveExecutionContext, getAutoRetrievingModels, getAutoUpdatingModels, getFirstActionExecutionContext, getLastActionExecutionContext, getModel, getNextActionExecutionContext, getPreviousActionExecutionContext, getRefreshActionExecutionContext, getRequestCompletionListenerChildNames, getRequestContext, getRequestParticipantChildNames, getSession, getViewBean, getWebActionModelOffset, getWebActionModels, getWebActionRowOffsetSessionKey, handleRequest, handleWebAction, isAutoRetrieveEnabled, onHandleRequestCommandExecutionError, onModelError, onNoModelDataAvailable, onWebActionExecutionError, requestComplete, setAutoDeletingModels, setAutoExecutingModels, setAutoInsertingModels, setAutoRetrieveEnabled, setAutoRetrieveExecutionContext, setAutoRetrievingModels, setAutoUpdatingModels, setWebActionModelOffset
-
Methods inherited from class com.iplanet.jato.view.ContainerViewBase
beginChildDisplay, beginComponentDisplay, beginDisplay, childExists, createChildReserved, endChildDisplay, endChildDisplay, endComponentDisplay, endDisplay, endDisplay, ensureChild, getChild, getChildNames, getChildNames, getChildType, getCommandChildNames, getDefaultModel, getDisplayField, getDisplayFieldBooleanValue, getDisplayFieldDoubleValue, getDisplayFieldIntValue, getDisplayFieldStringValue, getDisplayFieldValue, getNumChildren, getQualifiedCommandChildNames, onValidationException, registerChild, registerDisplayEventHandlers, removeAllChildren, removeChild, removeQualifiedNameIndices, resetChildren, setDefaultModel, setDisplayFieldValue, setDisplayFieldValue, setDisplayFieldValue, setDisplayFieldValue, unregisterChild
-
Methods inherited from class com.iplanet.jato.view.ViewBase
getName, getParent, getParentViewBean, getQualifiedName, getQualifiedViewNameSeparator, getRootView, getRootView, getSimpleQualifiedName, isVisible, setName, setParent, setQualifiedViewNameSeparator, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.iplanet.jato.view.ContainerView
endChildDisplay, endDisplay, getChild, getChildNames, getChildType, getDefaultModel, getDisplayField, getDisplayFieldValue, getNumChildren, resetChildren, setDisplayFieldValue
-
Methods inherited from interface com.iplanet.jato.RequestHandler
acceptRequest, getRequestContext, handleRequest
-
-
-
-
Field Detail
-
debug
public static Debug debug
-
PG_SESSION_ATTR_ID
protected static final String PG_SESSION_ATTR_ID
- See Also:
- Constant Field Values
-
PG_SESSION_SSO_ID
protected static final String PG_SESSION_SSO_ID
- See Also:
- Constant Field Values
-
PG_SESSION_ATTR
protected static final String PG_SESSION_ATTR
- See Also:
- Constant Field Values
-
SZ_CACHE
protected static final String SZ_CACHE
- See Also:
- Constant Field Values
-
BTN_GHOST
protected static final String BTN_GHOST
- See Also:
- Constant Field Values
-
initialized
protected boolean initialized
-
-
Constructor Detail
-
AMViewBeanBase
public AMViewBeanBase(String name)
Creates an instance of base view bean object- Parameters:
name- of page
-
-
Method Detail
-
forwardTo
public void forwardTo(com.iplanet.jato.RequestContext rc) throws com.iplanet.jato.NavigationException- Specified by:
forwardToin interfacecom.iplanet.jato.view.ViewBean- Overrides:
forwardToin classcom.iplanet.jato.view.ViewBeanBase- Throws:
com.iplanet.jato.NavigationException
-
setRequestContext
public void setRequestContext(com.iplanet.jato.RequestContext context)
- Specified by:
setRequestContextin interfacecom.iplanet.jato.RequestParticipant- Overrides:
setRequestContextin classcom.iplanet.jato.view.ViewBeanBase
-
setRequestContentInitialize
protected void setRequestContentInitialize(com.iplanet.jato.RequestContext context)
-
initialize
protected void initialize()
-
registerChildren
protected void registerChildren()
Registers user interface components used by this view bean.
-
createChild
protected com.iplanet.jato.view.View createChild(String name)
Creates user interface components used by this view bean.- Overrides:
createChildin classcom.iplanet.jato.view.ContainerViewBase- Parameters:
name- of component- Returns:
- child component
-
getCharset
public String getCharset(AMModel model)
Gets current charset- Parameters:
model- object- Returns:
- current charset
-
beginDisplay
public void beginDisplay(com.iplanet.jato.view.event.DisplayEvent event) throws com.iplanet.jato.model.ModelControlException- Specified by:
beginDisplayin interfacecom.iplanet.jato.view.ContainerView- Overrides:
beginDisplayin classcom.iplanet.jato.view.RequestHandlingViewBase- Throws:
com.iplanet.jato.model.ModelControlException
-
passPgSessionMap
public void passPgSessionMap(com.iplanet.jato.view.ViewBean other)
Pass session attribute map to other view bean- Parameters:
other- view bean
-
passPgSessionMap
public void passPgSessionMap(com.iplanet.jato.view.ViewBean other, Map attributes)Pass session attribute map to other view bean- Parameters:
other- view beanattributes- Map of attribute name to values.
-
getModel
public AMModel getModel()
Returns model for this view bean. Dervived class need to implement this method.- Returns:
- model for this view bean.
-
setInlineAlertMessage
protected void setInlineAlertMessage(String type, String title, String message, boolean encode)
Set inline alert message.- Parameters:
type- Type of message such as Error, Warning, etc.title- Title of message.message- Message.encode- Should the message be encoded for HTML.
-
setInlineAlertMessage
protected void setInlineAlertMessage(String type, String title, String message)
Set inline alert message.- Parameters:
type- Type of message such as Error, Warning, etc.title- Title of message.message- Message.
-
isInlineAlertMessageSet
protected boolean isInlineAlertMessageSet()
Returns true if inline alert message is set.- Returns:
- true if inline alert message is set.
-
mapRequestParameter
protected void mapRequestParameter(com.iplanet.jato.view.DisplayField field, Object[] childValues)Overwriting this map so that we correct the set value for OpenSSO's proprietory taglib component,SerializedField. Without doing this, string value will be set to the value of this component, this is incorrect because the string value of this component is actually a serialized string of the value. Doing asetValueon this component will serialize the original twice and thus this component returns incorrect value in the execution cycle.- Overrides:
mapRequestParameterin classcom.iplanet.jato.view.ContainerViewBase- Parameters:
field- Display field.childValues- Values of child component.
-
getModelInternal
protected abstract AMModel getModelInternal()
Returns model for this view bean. Dervived class need to implement this method.- Returns:
- model for this view bean.
-
createOptionList
public com.iplanet.jato.view.html.OptionList createOptionList(Map map)
Returns a option list object that contains options for a given map of value to its localized string.- Parameters:
map- Map of value to its localized string.- Returns:
- a option list object that contains options for a given map of value to its localized string.
-
createOptionList
public static com.iplanet.jato.view.html.OptionList createOptionList(Map map, Locale locale)
Returns a option list object that contains options for a given map of value to its localized string.- Parameters:
map- Map of value to its localized string.- Returns:
- a option list object that contains options for a given map of value to its localized string.
-
createOptionList
public static com.iplanet.jato.view.html.OptionList createOptionList(Collection collection, Locale locale)
Returns an option list object that contains options for a given collection of string.- Parameters:
collection- Collection of strings to be included in option list.locale- Locale defining how the entries should be sorted.- Returns:
- a option list object that contains options for a given collection of string.
-
createOptionList
public com.iplanet.jato.view.html.OptionList createOptionList(Collection collection)
Returns an option list object that contains options for a given collection of string.- Parameters:
collection- Collection of strings to be included in option list.- Returns:
- a option list object that contains options for a given collection of string.
-
createOptionList
public static com.iplanet.jato.view.html.OptionList createOptionList(Collection collection, Locale locale, boolean bSort)
Returns an option list object that contains options for a given collection of string.- Parameters:
collection- Collection of strings to be included in option list.locale- Locale defining how the entries should be sorted.bSort-trueto sort the options.- Returns:
- a option list object that contains options for a given collection of string.
-
getValues
public static Set getValues(com.iplanet.jato.view.html.OptionList optList)
Returns a set of string from a option list items.- Parameters:
optList- Option list that contains the items.- Returns:
- Set of string from a option list items.
-
getList
public static List getList(com.iplanet.jato.view.html.OptionList optList)
Returns a list of string from a option list items.- Parameters:
optList- Option list that contains the items.- Returns:
- list of string from a option list items.
-
appendPgSession
protected String appendPgSession(String url)
Appends page session string to URL- Parameters:
url- Target URL
-
resetButtonState
protected void resetButtonState(String btnName)
-
disableButton
public void disableButton(String btnName, boolean disable)
-
getCharset
protected String getCharset()
-
getContentType
protected String getContentType()
-
handleGRequest
public void handleGRequest(com.iplanet.jato.view.event.RequestInvocationEvent event)
Does nothing, just forwards to the same view bean- Parameters:
event- - request invocation event
-
resetView
public void resetView()
Reset the view bean.
-
bypassForwardTo
protected void bypassForwardTo(com.iplanet.jato.RequestContext rc)
-
setCurrentLocation
public void setCurrentLocation(String dn)
Set location DN- Parameters:
dn- the location distinguished name to set
-
getCurrentLocationDN
public String getCurrentLocationDN()
Gets the current location DN.- Returns:
- location DN
-
getCurrentLocation
public String getCurrentLocation()
Gets the name of the current location.- Returns:
- name of location
-
hideTableSelectionIcons
public void hideTableSelectionIcons(String tableName)
Hides the selection checkboxes in table.- Parameters:
tableName- Name of table.
-
getBlankTextFields
public Set getBlankTextFields()
Returns a set of static text field' names that should be blanked. This field is a a action table as a label for a hyperlink. Blanking it out will hide the hyperlink accordingly.- Returns:
- Set of static text field' names that should be blanked.
-
addBlankTextField
public void addBlankTextField(String name)
Includes a static text field that should be blanked. This field is a a action table as a label for a hyperlink. Blanking it out will hide the hyperlink accordingly.- Parameters:
name- Name of static text field.
-
performDelegationTasks
protected void performDelegationTasks()
-
beginChildDisplay
public boolean beginChildDisplay(com.iplanet.jato.view.event.ChildDisplayEvent event)
- Specified by:
beginChildDisplayin interfacecom.iplanet.jato.view.ContainerView- Overrides:
beginChildDisplayin classcom.iplanet.jato.view.ContainerViewBase
-
getServiceNameForAccessControl
protected String getServiceNameForAccessControl()
-
getCallingView
public AMViewBeanBase getCallingView()
-
getUserLocale
public Locale getUserLocale()
-
getPageSessionAttributeString
public String getPageSessionAttributeString()
- Overrides:
getPageSessionAttributeStringin classcom.iplanet.jato.view.ViewBeanBase
-
deserializePageAttributes
protected void deserializePageAttributes()
- Overrides:
deserializePageAttributesin classConsoleViewBeanBase
-
setPageSessionAttributes
protected void setPageSessionAttributes(Map value)
- Overrides:
setPageSessionAttributesin classcom.iplanet.jato.view.ViewBeanBase
-
getPageSessionAttributes
protected Map getPageSessionAttributes()
- Overrides:
getPageSessionAttributesin classcom.iplanet.jato.view.ViewBeanBase
-
redirectToStartURL
protected void redirectToStartURL()
-
getBackButtonLabel
protected String getBackButtonLabel(String label)
Creates the label used to take the user back to the previous page they were viewing. The label is defined in the property file as "Back to {0}" which lets us control the format of the label in different locales. If the label passed in cannot be found it will use the default value of "previous view".
-
getCurrentRealm
protected String getCurrentRealm()
-
getCurrentRealmEncoded
protected String getCurrentRealmEncoded()
Get the current realm, encoded as a path element.- Returns:
- The current realm encoded as a path element.
-
getRequestURL
protected String getRequestURL()
-
charToHex
public static String charToHex(char c)
-
-