use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingRequestHandlerListAddViewBean method handleButton1Request.
protected void handleButton1Request(Map values) throws AMConsoleException {
SCSAML2SOAPBindingViewBean vb = (SCSAML2SOAPBindingViewBean) getViewBean(SCSAML2SOAPBindingViewBean.class);
Map attrValues = (Map) getPageSessionAttribute(SCSAML2SOAPBindingViewBean.PROPERTY_ATTRIBUTE);
Set handlers = (Set) attrValues.get(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
if ((handlers == null) || handlers.isEmpty()) {
handlers = new OrderedSet();
attrValues.put(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST, (OrderedSet) handlers);
}
String val = SAML2SOAPBindingRequestHandler.toString((String) values.get(ATTR_KEY), (String) values.get(ATTR_CLASS));
if (handlers.contains(val)) {
throw new AMConsoleException("soapBinding.service.requestHandlerList.already.exist");
}
handlers.add(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 SCPolicyResourceComparatorAddViewBean method handleButton1Request.
protected void handleButton1Request(PolicyResourceComparator rc) {
SCPolicyViewBean vb = (SCPolicyViewBean) getViewBean(SCPolicyViewBean.class);
Map attrValues = (Map) getPageSessionAttribute(SCPolicyViewBean.PROPERTY_ATTRIBUTE);
Set resourceComparator = (Set) attrValues.get(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
if ((resourceComparator == null) || resourceComparator.isEmpty()) {
resourceComparator = new OrderedSet();
attrValues.put(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR, (OrderedSet) resourceComparator);
}
resourceComparator.add(rc.toString());
setPageSessionAttribute(SCPolicyViewBean.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 SMG11NViewBean method handleTblSupportedCharsetsButtonDeleteRequest.
/**
* Handles remove supported container request.
*
* @param event Request Invocation Event.
*/
public void handleTblSupportedCharsetsButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS);
tblValues.removeAll(selected);
setPageSessionAttribute(SMG11NModelImpl.ATTRIBUTE_NAME_SUPPORTED_CHARSETS, tblValues);
populateSupportedCharsetsTable(tblValues);
}
forwardTo();
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class WSPPServiceDSAttributeMapListAddViewBean method handleButton1Request.
protected void handleButton1Request(Map values) {
WSPersonalProfileServiceViewBean vb = (WSPersonalProfileServiceViewBean) getViewBean(WSPersonalProfileServiceViewBean.class);
Map attrValues = (Map) getPageSessionAttribute(WSPersonalProfileServiceViewBean.PROPERTY_ATTRIBUTE);
Set mappings = (Set) attrValues.get(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
if ((mappings == null) || mappings.isEmpty()) {
mappings = new OrderedSet();
attrValues.put(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST, (OrderedSet) mappings);
}
mappings.add((String) values.get(ATTR_NAME) + "=" + (String) values.get(ATTR_MAPPING_ATTRIBUTE));
backTrail();
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class WSAuthNServicesHandlersAddViewBean method handleButton1Request.
protected void handleButton1Request(Map values) {
WSAuthNServicesViewBean vb = (WSAuthNServicesViewBean) getViewBean(WSAuthNServicesViewBean.class);
Map attrValues = (Map) getPageSessionAttribute(WSAuthNServicesViewBean.PROPERTY_ATTRIBUTE);
Set handlers = (Set) attrValues.get(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
if ((handlers == null) || handlers.isEmpty()) {
handlers = new OrderedSet();
attrValues.put(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS, (OrderedSet) handlers);
}
String key = (String) values.get(ATTR_KEY);
String val = (String) values.get(ATTR_CLASS);
WSAuthHandlerEntry e = new WSAuthHandlerEntry(key, val);
if (handlerExists(handlers, e)) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", "webservices.authentication.service.handlers.duplicates");
forwardTo(getRequestContext());
return;
}
handlers.add(e.toString());
setPageSessionAttribute(WSAuthNServicesViewBean.PAGE_MODIFIED, "1");
backTrail();
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
Aggregations