Search in sources :

Example 11 with AMViewConfig

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

the class ServerEditAdvancedViewBean 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("cscGeneral", nodeID);
        unlockPageTrailForSwapping();
        passPgSessionMap(vb);
        vb.forwardTo(getRequestContext());
    } catch (AMConsoleException e) {
        debug.error("ServerEditGeneralViewBean.nodeClicked", e);
        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)

Example 12 with AMViewConfig

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

the class ServerSiteViewBean method forwardToServerProfilePage.

private void forwardToServerProfilePage(String serverName) {
    setPageSessionAttribute(ServerEditGeneralViewBean.PG_ATTR_SERVER_NAME, serverName);
    String tabIdx = (String) getPageSessionAttribute(ServerEditGeneralViewBean.TAB_TRACKER);
    int idxTab = 421;
    if (tabIdx != null) {
        idxTab = Integer.parseInt(tabIdx);
    }
    AMViewConfig config = AMViewConfig.getInstance();
    try {
        AMViewBeanBase vb = config.getTabViewBean(this, "/", getModel(), ServerEditGeneralViewBean.TAB_NAME, idxTab, -1);
        unlockPageTrail();
        passPgSessionMap(vb);
        vb.forwardTo(getRequestContext());
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig) AMViewBeanBase(com.sun.identity.console.base.AMViewBeanBase) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 13 with AMViewConfig

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

the class ServerEditAdvancedViewBean method createTabModel.

protected void createTabModel() {
    if (tabModel == null) {
        AMViewConfig amconfig = AMViewConfig.getInstance();
        tabModel = amconfig.getTabsModel(ServerEditViewBeanBase.TAB_NAME, "/", getRequestContext().getRequest());
        registerChild(TAB_COMMON, CCTabs.class);
    }
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig)

Example 14 with AMViewConfig

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

the class ServerEditViewBeanBase method createTabModel.

protected void createTabModel(String serverName) {
    AMViewConfig amconfig = AMViewConfig.getInstance();
    tabModel = amconfig.getTabsModel(TAB_NAME, "/", getRequestContext().getRequest());
    if (serverName.equals(ServerConfiguration.DEFAULT_SERVER_CONFIG)) {
        CCNavNode node = (CCNavNode) tabModel.getNodeById(425);
        tabModel.removeNode(node);
    }
    registerChild(TAB_COMMON, CCTabs.class);
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig) CCNavNode(com.sun.web.ui.model.CCNavNode)

Example 15 with AMViewConfig

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

the class ServicesModelImpl method mapNameToDisplayName.

/**
     * Creates a mapping of the service name to the display name 
     * for the service.
     */
private Map mapNameToDisplayName(Set names) {
    Map map = new HashMap(names.size() * 2);
    AMViewConfig vConfig = AMViewConfig.getInstance();
    for (Iterator iter = names.iterator(); iter.hasNext(); ) {
        String name = (String) iter.next();
        /*
             * Have a way to hide policies in console by adding some entries
             * to amConsoleConfig.xml
             */
        if (vConfig.isServiceVisible(name)) {
            String displayName = getLocalizedServiceName(name);
            if (!name.equals(displayName)) {
                map.put(name, displayName);
            }
        }
    }
    return map;
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig) HashMap(java.util.HashMap) Iterator(java.util.Iterator) HashMap(java.util.HashMap) Map(java.util.Map)

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