use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class FSSAMLServiceViewBean method handleTblSiteIDButtonDeleteRequest.
public void handleTblSiteIDButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
Map modifiedValues = null;
try {
modifiedValues = getValues(false, false);
} catch (AMConsoleException e) {
/* exception will not be thrown because we are instructing
* AMPropertySheet to return values without doing password
* validation.
*/
}
CCActionTable tbl = (CCActionTable) getChild(TABLE_SITE_ID);
tbl.restoreStateData();
Integer[] selected = tblSiteIdModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) modifiedValues.get(TABLE_SITE_ID);
tblValues.removeAll(selected);
modifiedValues.put(TABLE_SITE_ID, tblValues);
}
setPageSessionAttribute(PROPERTY_ATTRIBUTE, (HashMap) modifiedValues);
setPageSessionAttribute(MODIFIED, "1");
setValues();
forwardTo();
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class FSSAMLTargetURLsAddViewBean method handleButton1Request.
protected void handleButton1Request(String value) throws AMConsoleException {
FSSAMLServiceViewBean vb = (FSSAMLServiceViewBean) getViewBean(FSSAMLServiceViewBean.class);
Map mapAttrs = (Map) getPageSessionAttribute(FSSAMLServiceViewBean.PROPERTY_ATTRIBUTE);
Set targetURLs = (Set) mapAttrs.get(FSSAMLServiceViewBean.TABLE_TARGET_URLS);
if ((targetURLs == null) || targetURLs.isEmpty()) {
targetURLs = new OrderedSet();
mapAttrs.put(FSSAMLServiceViewBean.TABLE_TARGET_URLS, (OrderedSet) targetURLs);
}
if (targetURLs.contains(value)) {
throw new AMConsoleException("saml.profile.targetURLs.already.exists");
}
targetURLs.add(value);
backTrail();
unlockPageTrailForSwapping();
setPageSessionAttribute(FSSAMLServiceViewBean.MODIFIED, "1");
passPgSessionMap(vb);
vb.setValues();
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class FSSAMLTargetURLsEditViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (populateValues) {
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
Map mapAttrs = (Map) getPageSessionAttribute(FSSAMLServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet targets = (OrderedSet) mapAttrs.get(FSSAMLServiceViewBean.TABLE_TARGET_URLS);
setValues((String) targets.get(index));
}
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class FSSAMLTargetURLsEditViewBean method handleButton1Request.
protected void handleButton1Request(String value) throws AMConsoleException {
FSSAMLServiceViewBean vb = (FSSAMLServiceViewBean) getViewBean(FSSAMLServiceViewBean.class);
Map mapAttrs = (Map) getPageSessionAttribute(FSSAMLServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet targets = (OrderedSet) mapAttrs.get(FSSAMLServiceViewBean.TABLE_TARGET_URLS);
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
int count = 0;
for (Iterator i = targets.iterator(); i.hasNext(); ) {
String t = (String) i.next();
if ((count != index) && t.equals(value)) {
throw new AMConsoleException("saml.profile.targetURLs.already.exists");
}
count++;
}
targets.set(index, value);
backTrail();
unlockPageTrailForSwapping();
setPageSessionAttribute(FSSAMLServiceViewBean.MODIFIED, "1");
passPgSessionMap(vb);
vb.setValues();
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class FSSAMLSiteIDEditViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (populateValues) {
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
Map mapAttrs = (Map) getPageSessionAttribute(FSSAMLServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet siteIDs = (OrderedSet) mapAttrs.get(FSSAMLServiceViewBean.TABLE_SITE_ID);
setValues(AMPipeDelimitAttrTokenizer.getInstance().tokenizes((String) siteIDs.get(index)));
}
}
Aggregations