Search in sources :

Example 56 with SerializedField

use of com.sun.identity.console.components.view.html.SerializedField in project OpenAM by OpenRock.

the class STSHomeViewBean method populateRestSTSTableModel.

private void populateRestSTSTableModel(Set<String> publishedInstances) {
    tblModelRestSTSInstances.clearAll();
    SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
    Map<String, Set<String>> cacheMap = (Map<String, Set<String>>) szCache.getSerializedObj();
    if (cacheMap == null) {
        cacheMap = new HashMap<>();
    }
    if ((publishedInstances != null) && !publishedInstances.isEmpty()) {
        boolean firstEntry = true;
        for (String instanceName : publishedInstances) {
            if (firstEntry) {
                firstEntry = false;
            } else {
                tblModelRestSTSInstances.appendRow();
            }
            tblModelRestSTSInstances.setValue(TBL_REST_STS_INSTANCES_DATA_NAME, instanceName);
            tblModelRestSTSInstances.setValue(TBL_REST_STS_INSTANCES_DATA_ACTION_HREF, instanceName);
        }
        cacheMap.put(REST_STS_PUBLISHED_INSTANCES_CACHE_KEY, publishedInstances);
        szCache.setValue(cacheMap);
    } else {
        szCache.setValue(null);
    }
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) SerializedField(com.sun.identity.console.components.view.html.SerializedField) HashMap(java.util.HashMap) Map(java.util.Map)

Example 57 with SerializedField

use of com.sun.identity.console.components.view.html.SerializedField in project OpenAM by OpenRock.

the class STSHomeViewBean method getPublishedInstancesFromCache.

private Set<String> getPublishedInstancesFromCache(String cacheKey) {
    SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
    Map<String, Set<String>> instancesCache = (Map<String, Set<String>>) szCache.getSerializedObj();
    if (instancesCache != null) {
        return instancesCache.get(cacheKey);
    } else {
        return Collections.emptySet();
    }
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) SerializedField(com.sun.identity.console.components.view.html.SerializedField) HashMap(java.util.HashMap) Map(java.util.Map)

Aggregations

SerializedField (com.sun.identity.console.components.view.html.SerializedField)57 ArrayList (java.util.ArrayList)33 List (java.util.List)31 CCActionTable (com.sun.web.ui.view.table.CCActionTable)28 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)19 Iterator (java.util.Iterator)19 HashSet (java.util.HashSet)17 Set (java.util.Set)17 Map (java.util.Map)15 HashMap (java.util.HashMap)14 View (com.iplanet.jato.view.View)10 SMSubConfig (com.sun.identity.console.base.model.SMSubConfig)9 CCPageTitle (com.sun.web.ui.view.pagetitle.CCPageTitle)9 CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)8 AgentsModel (com.sun.identity.console.agentconfig.model.AgentsModel)6 ServerSiteModel (com.sun.identity.console.service.model.ServerSiteModel)6 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)5 IdRepoException (com.sun.identity.idm.IdRepoException)4 SSOToken (com.iplanet.sso.SSOToken)3 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)3