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);
}
}
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();
}
}
Aggregations