use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffEditViewBean method handleButton1Request.
protected void handleButton1Request(SMDiscoEntryData smData) throws AMConsoleException {
SMDiscoveryServiceViewBean vb = (SMDiscoveryServiceViewBean) getViewBean(SMDiscoveryServiceViewBean.class);
Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet resoff = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
SMDiscoveryServiceData smEntry = SMDiscoveryServiceData.getEntries(resoff);
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
smEntry.replaceResourceData(index, smData);
mapAttrs.put(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, (OrderedSet) smEntry.getDiscoveryEntries());
setPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE, (HashMap) mapAttrs);
setPageSessionAttribute(SMDiscoveryServiceViewBean.PAGE_MODIFIED, "1");
backTrail();
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingRequestHandlerListDupViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (dupIndex != -1) {
Map mapAttrs = (Map) getPageSessionAttribute(SCSAML2SOAPBindingViewBean.PROPERTY_ATTRIBUTE);
OrderedSet set = (OrderedSet) mapAttrs.get(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
setValues((String) set.get(dupIndex));
}
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingRequestHandlerListEditViewBean method handleButton1Request.
protected void handleButton1Request(Map values) throws AMConsoleException {
SCSAML2SOAPBindingViewBean vb = (SCSAML2SOAPBindingViewBean) getViewBean(SCSAML2SOAPBindingViewBean.class);
Map mapAttrs = (Map) getPageSessionAttribute(SCSAML2SOAPBindingViewBean.PROPERTY_ATTRIBUTE);
OrderedSet serverList = (OrderedSet) mapAttrs.get(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
String val = SAML2SOAPBindingRequestHandler.toString((String) values.get(ATTR_KEY), (String) values.get(ATTR_CLASS));
int count = 0;
for (Iterator i = serverList.iterator(); i.hasNext(); ) {
String v = (String) i.next();
if ((count != index) && v.equals(val)) {
throw new AMConsoleException("soapBinding.service.requestHandlerList.already.exist");
}
count++;
}
serverList.set(index, val);
setPageSessionAttribute(SCSAML2SOAPBindingViewBean.PAGE_MODIFIED, "1");
backTrail();
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingViewBean method handleTblRequestHandlerListButtonDeleteRequest.
/**
* Handles remove request handlers request.
*
* @param event Request Invocation Event.
*/
public void handleTblRequestHandlerListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
tblValues.removeAll(selected);
setPageSessionAttribute(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, tblValues);
populateRequestHandlerListTable(tblValues);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
setPageSessionAttribute(PAGE_MODIFIED, "1");
}
forwardTo();
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSOAPBindingRequestHandlerListAddViewBean method handleButton1Request.
protected void handleButton1Request(Map values) throws AMConsoleException {
SCSOAPBindingViewBean vb = (SCSOAPBindingViewBean) getViewBean(SCSOAPBindingViewBean.class);
Map attrValues = (Map) getPageSessionAttribute(SCSOAPBindingViewBean.PROPERTY_ATTRIBUTE);
Set handlers = (Set) attrValues.get(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
if ((handlers == null) || handlers.isEmpty()) {
handlers = new OrderedSet();
attrValues.put(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, (OrderedSet) handlers);
}
String val = SOAPBindingRequestHandler.toString((String) values.get(ATTR_KEY), (String) values.get(ATTR_CLASS), (String) values.get(ATTR_ACTION));
if (handlers.contains(val)) {
throw new AMConsoleException("soapBinding.service.requestHandlerList.already.exist");
}
handlers.add(val);
setPageSessionAttribute(SCSOAPBindingViewBean.PAGE_MODIFIED, "1");
backTrail();
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
Aggregations