use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class AgentsViewBean method createTabModel.
protected void createTabModel() {
if (tabModel == null) {
AMViewConfig amconfig = AMViewConfig.getInstance();
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
if (realmName != null) {
tabModel = amconfig.getTabsModel("realms", realmName, getRequestContext().getRequest());
String tabIdx = (String) getPageSessionAttribute(getTrackingTabIDName());
if (tabIdx != null) {
selectedNode = addAgentsTab(Integer.parseInt(tabIdx));
setPageSessionAttribute("CCTabs.SelectedTabId", tabIdx);
} else {
addAgentsTab(-1);
}
registerChild(TAB_COMMON, CCTabs.class);
}
tabModel.clear();
registerChild(TAB_COMMON, CCTabs.class);
}
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class AgentsViewBean method addAgentsTab.
private CCNavNode addAgentsTab(int idx) {
AgentsModel model = (AgentsModel) getModel();
AMViewConfig config = AMViewConfig.getInstance();
return config.addAgentTabs(tabModel, model, idx);
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class HomeViewBean method forwardTo.
public void forwardTo(RequestContext reqContext) throws NavigationException {
EntitiesModel model = (EntitiesModel) getModel();
AMViewConfig config = AMViewConfig.getInstance();
List supported = config.getSupportedAgentTypes(model);
if (supported.isEmpty()) {
super.forwardTo(reqContext);
} else {
AgentsViewBean vb = (AgentsViewBean) getViewBean(AgentsViewBean.class);
setPageSessionAttribute(AgentsViewBean.PG_SESSION_AGENT_TYPE, (String) supported.iterator().next());
passPgSessionMap(vb);
vb.forwardTo(reqContext);
}
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class EntityPropertiesBase method createTabModel.
protected void createTabModel() {
String profile = getProfileName();
String entity = (String) getPageSessionAttribute(ENTITY_NAME);
String realm = (String) getPageSessionAttribute("entityRealm");
EntityModel eModel = (EntityModel) getEntityModel();
if (tabModel == null) {
if (profile.equals(eModel.SAMLV2)) {
AMViewConfig amconfig = AMViewConfig.getInstance();
List tabstoDisplay = eModel.getSAMLv2Roles(entity, realm);
tabModel = amconfig.getSAMLv2TabsModel("SAMLv2", "/", getRequestContext().getRequest(), tabstoDisplay);
registerChild(TAB_COMMON, CCTabs.class);
tabModel.clear();
} else if (!profile.equals(eModel.SAMLV2)) {
AMViewConfig amconfig = AMViewConfig.getInstance();
List entries = eModel.getTabMenu(profile, entity, realm);
if ((entries != null) && (entries.size() > 0)) {
amconfig.addTabEntries(profile, entries, true);
}
tabModel = amconfig.getTabsModel(profile, "/", getRequestContext().getRequest());
tabModel.clear();
tabModel.setSelectedNode(1);
}
}
}
use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.
the class RealmPropertiesBase method nodeClicked.
/**
* Handles tab selected event.
*
* @param event Request Invocation Event.
* @param nodeID Selected Node ID.
*/
public void nodeClicked(RequestInvocationEvent event, int nodeID) {
AMViewConfig amconfig = AMViewConfig.getInstance();
try {
AMViewBeanBase vb = getTabNodeAssociatedViewBean("realms", nodeID);
String tmp = (String) getPageSessionAttribute(AMAdminConstants.PREVIOUS_REALM);
vb.setPageSessionAttribute(AMAdminConstants.PREVIOUS_REALM, tmp);
tmp = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
vb.setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, tmp);
tmp = (String) getPageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID);
vb.setPageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID, tmp);
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (AMConsoleException e) {
debug.error("RealmPropertiesBase.nodeClicked", e);
forwardTo();
}
}
Aggregations