use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class STSEditViewBeanBase method handleButton3Request.
/**
* Handles back button request.
*
* @param event Request invocation event
*/
public void handleButton3Request(RequestInvocationEvent event) throws ModelControlException, AMConsoleException {
removePageSessionAttribute(PAGE_MODIFIED);
AMViewBeanBase vb = getPreviousPage();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class AgentsViewBean method handleTblDataActionGroupHrefRequest.
/**
* Forwards request to edit agent group view bean.
*
* @param event Request Invocation Event.
*/
public void handleTblDataActionGroupHrefRequest(RequestInvocationEvent event) {
AgentsModel model = (AgentsModel) getModel();
String idType = getDisplayIDType();
String universalId = hexToString((String) getDisplayFieldValue(TBL_DATA_ACTION_HREF_GROUP));
setPageSessionAttribute(AgentProfileViewBean.UNIVERSAL_ID, universalId);
SSOToken ssoToken = model.getUserSSOToken();
String realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
StringTokenizer st = new StringTokenizer(universalId, "=,");
st.nextToken();
String agentGrpName = st.nextToken();
try {
AMIdentity amid = new AMIdentity(ssoToken, agentGrpName, IdType.AGENTGROUP, realm, null);
String vbName = (String) agentViewBeans.get(idType);
if (vbName == null) {
vbName = GENERIC_VIEW_BEAN;
}
Class clazz = Thread.currentThread().getContextClassLoader().loadClass(vbName);
AMViewBeanBase vb = (AMViewBeanBase) getViewBean(clazz);
removePageSessionAttribute(GenericAgentProfileViewBean.PS_TABNAME);
setPageSessionAttribute(PG_SESSION_SUPERCEDE_AGENT_TYPE, model.getAgentType(amid));
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
} catch (ClassNotFoundException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class AgentsViewBean method handleTblDataActionHrefRequest.
/**
* Forwards request to edit agent view bean.
*
* @param event Request Invocation Event.
*/
public void handleTblDataActionHrefRequest(RequestInvocationEvent event) {
AgentsModel model = (AgentsModel) getModel();
String agentType = getDisplayIDType();
String universalId = hexToString((String) getDisplayFieldValue(TBL_DATA_ACTION_HREF));
setPageSessionAttribute(AgentProfileViewBean.UNIVERSAL_ID, universalId);
SSOToken ssoToken = model.getUserSSOToken();
String realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
StringTokenizer st = new StringTokenizer(universalId, "=,");
st.nextToken();
String agentName = st.nextToken();
try {
AMIdentity amid = new AMIdentity(ssoToken, agentName, IdType.AGENTONLY, realm, null);
if (agentType.equals(AgentsViewBean.AGENT_WEB) || (agentType.equals(AgentsViewBean.DEFAULT_ID_TYPE))) {
if (isPropertiesLocallyStored(amid)) {
setPageSessionAttribute(LOCAL_OR_NOT, PROP_LOCAL);
} else {
setPageSessionAttribute(LOCAL_OR_NOT, PROP_CENTRAL);
}
}
Class clazz = getAgentCustomizedViewBean(model.getAgentType(amid));
AMViewBeanBase vb = (AMViewBeanBase) getViewBean(clazz);
setPageSessionAttribute(PG_SESSION_SUPERCEDE_AGENT_TYPE, model.getAgentType(amid));
removePageSessionAttribute(GenericAgentProfileViewBean.PS_TABNAME);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (IdRepoException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
} catch (SSOException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
} catch (ClassNotFoundException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
forwardTo();
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class AgentConfigInheritViewBean method handleButton3Request.
/**
* Handles return to server configuration page request.
*
* @param event Request invocation event
*/
public void handleButton3Request(RequestInvocationEvent event) throws ModelControlException {
try {
AMViewBeanBase vb = (AMViewBeanBase) getViewBean(Class.forName((String) getPageSessionAttribute(PG_ATTR_CONFIG_PAGE)));
removePageSessionAttribute(PG_ATTR_CONFIG_PAGE);
removePageSessionAttribute(PG_ATTR_PROPERTY_NAMES);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (ClassNotFoundException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.identity.console.base.AMViewBeanBase in project OpenAM by OpenRock.
the class AgentDumpViewBean method handleButton1Request.
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
AMViewBeanBase vb = (AMViewBeanBase) getViewBean(Class.forName((String) getPageSessionAttribute(PG_ATTR_CONFIG_PAGE)));
removePageSessionAttribute(PG_ATTR_CONFIG_PAGE);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (ClassNotFoundException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
Aggregations