Search in sources :

Example 21 with AMViewConfig

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();
    String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    AMViewConfig config = AMViewConfig.getInstance();
    List supported = config.getSupportedEntityTypes(curRealm, model);
    if (supported.isEmpty()) {
        super.forwardTo(reqContext);
    } else {
        EntitiesViewBean vb = (EntitiesViewBean) getViewBean(EntitiesViewBean.class);
        setPageSessionAttribute(EntitiesViewBean.PG_SESSION_ENTITY_TYPE, (String) supported.iterator().next());
        passPgSessionMap(vb);
        vb.forwardTo(reqContext);
    }
}
Also used : AMViewConfig(com.sun.identity.console.base.AMViewConfig) List(java.util.List) EntitiesModel(com.sun.identity.console.idm.model.EntitiesModel)

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