Search in sources :

Example 1 with AMViewConfig

use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.

the class SMProfileViewBean method addSessionsTab.

// Assign the Session SubTabs
protected void addSessionsTab(SMProfileModel model, int selectedNode) {
    AMViewConfig config = AMViewConfig.getInstance();
    config.addSessionTabs(tabModel, model);
    registerChild(TAB_COMMON, CCTabs.class);
    tabModel.setSelectedNode(selectedNode);
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig)

Example 2 with AMViewConfig

use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.

the class AgentsViewBean method createTableModel.

private void createTableModel() {
    String agentType = getDisplayIDType();
    AMViewConfig viewCfg = AMViewConfig.getInstance();
    combinedType = viewCfg.isCombineAgentType(agentType);
    centralizable = agentType.equals(AgentConfiguration.AGENT_TYPE_J2EE) || agentType.equals(AgentConfiguration.AGENT_TYPE_WEB);
    String xml = null;
    if (centralizable) {
        xml = "com/sun/identity/console/tblAgentsJ2EEWebAgent.xml";
    } else if (combinedType) {
        xml = "com/sun/identity/console/tblAgentsCombined.xml";
    } else {
        xml = "com/sun/identity/console/tblAgents.xml";
    }
    tblModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream(xml));
    tblModel.setTitleLabel("label.items");
    tblModel.setActionValue(TBL_BUTTON_ADD, "table.agents.button.new");
    tblModel.setActionValue(TBL_BUTTON_DELETE, "table.agents.button.delete");
    tblModel.setActionValue(TBL_COL_NAME, "table.agents.name.column.name");
    tblModel.setActionValue(TBL_COL_LOCAL, "table.agents.name.column.repo");
    if (combinedType) {
        tblModel.setActionValue(TBL_COL_TYPE, "table.agents.name.column.type");
    }
    xml = (!combinedType) ? "com/sun/identity/console/tblAgentGroups.xml" : "com/sun/identity/console/tblAgentGroupsCombined.xml";
    tblGroupModel = new CCActionTableModel(getClass().getClassLoader().getResourceAsStream(xml));
    tblGroupModel.setTitleLabel("label.items");
    tblGroupModel.setActionValue(TBL_BUTTON_ADD_GROUP, "table.agent.groups.button.new");
    tblGroupModel.setActionValue(TBL_BUTTON_DELETE_GROUP, "table.agent.groups.button.delete");
    tblGroupModel.setActionValue(TBL_COL_NAME_GROUP, "table.agent.groups.name.column.name");
    if (combinedType) {
        tblGroupModel.setActionValue(TBL_COL_TYPE_GROUP, "table.agent.groups.name.column.type");
    }
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel)

Example 3 with AMViewConfig

use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.

the class EntitiesViewBean method addEntitiesTab.

private void addEntitiesTab() {
    EntitiesModel model = (EntitiesModel) getModel();
    String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    AMViewConfig config = AMViewConfig.getInstance();
    config.addEntityTabs(tabModel, curRealm, model);
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig) EntitiesModel(com.sun.identity.console.idm.model.EntitiesModel)

Example 4 with AMViewConfig

use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.

the class RMRealmViewBean method handleTblDataActionHrefRequest.

/**
     * Handles edit realm request.
     *
     * @param event Request Invocation Event.
     * @throws ModelControlException if table model cannot be restored.
     */
public void handleTblDataActionHrefRequest(RequestInvocationEvent event) throws ModelControlException {
    // store the current realm name and the current selected tab
    // in the page session. Need to do this so after returning 
    // from profile object we get placed in the correct location.
    String prevRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    setPageSessionAttribute(AMAdminConstants.PREVIOUS_REALM, prevRealm);
    String newRealm = hexToString((String) getDisplayFieldValue(TBL_DATA_ACTION_HREF));
    setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, newRealm);
    setCurrentLocation(newRealm);
    // store the current selected tab in the page session
    String tmp = (String) getPageSessionAttribute(getTrackingTabIDName());
    setPageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID, tmp);
    AMViewConfig config = AMViewConfig.getInstance();
    RMRealmModel model = (RMRealmModel) getModel();
    unlockPageTrail();
    try {
        AMViewBeanBase vb = config.getTabViewBean(this, newRealm, model, "realms", -1, -1);
        passPgSessionMap(vb);
        vb.forwardTo(getRequestContext());
    } catch (AMConsoleException e) {
        setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, prevRealm);
        removePageSessionAttribute(AMAdminConstants.PREVIOUS_TAB_ID);
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        forwardTo();
    }
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig) AMViewBeanBase(com.sun.identity.console.base.AMViewBeanBase) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) RMRealmModel(com.sun.identity.console.realm.model.RMRealmModel)

Example 5 with AMViewConfig

use of com.sun.identity.console.base.AMViewConfig in project OpenAM by OpenRock.

the class RealmPropertiesBase method createTabModel.

protected void createTabModel() {
    if (tabModel == null) {
        AMViewConfig amconfig = AMViewConfig.getInstance();
        String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_PROFILE);
        if (realmName != null) {
            tabModel = amconfig.getTabsModel("realms", realmName, getRequestContext().getRequest());
            registerChild(TAB_COMMON, CCTabs.class);
        }
    }
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig)

Aggregations

AMViewConfig (com.sun.identity.console.base.AMViewConfig)21 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)7 AMViewBeanBase (com.sun.identity.console.base.AMViewBeanBase)6 List (java.util.List)4 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)3 AgentsModel (com.sun.identity.console.agentconfig.model.AgentsModel)2 CCNavNode (com.sun.web.ui.model.CCNavNode)2 HashMap (java.util.HashMap)2 Map (java.util.Map)2 AMPostViewBean (com.sun.identity.console.base.AMPostViewBean)1 EntityModel (com.sun.identity.console.federation.model.EntityModel)1 RMRealmModel (com.sun.identity.console.realm.model.RMRealmModel)1 CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)1 CCButton (com.sun.web.ui.view.html.CCButton)1 ArrayList (java.util.ArrayList)1 HashSet (java.util.HashSet)1 Iterator (java.util.Iterator)1 Set (java.util.Set)1 TreeSet (java.util.TreeSet)1