use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class WSPersonalProfileServiceViewBean method handleTblDSAttributeMapListButtonDeleteRequest.
/**
* Handles remove LDAP Attribute Mapping request.
*
* @param event Request Invocation Event.
*/
public void handleTblDSAttributeMapListButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST);
tblValues.removeAll(selected);
setPageSessionAttribute(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST, tblValues);
populateDSAttributeMapListTable(tblValues);
}
resetButtonState(TBL_DS_ATTRIBUTE_MAP_LIST_DELETE_BTN);
forwardTo();
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class WSAuthNServicesHandlersEditViewBean method getRequestData.
/**
* Used to extract the mechanism handler data passed in the page session.
* The mechanism name is needed to construct the breadcrumb trail.
*/
private void getRequestData() {
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
Map mapAttrs = (Map) getPageSessionAttribute(WSAuthNServicesViewBean.PROPERTY_ATTRIBUTE);
OrderedSet set = (OrderedSet) mapAttrs.get(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
mechanismEntry = (String) set.get(index);
WSAuthHandlerEntry entry = new WSAuthHandlerEntry(mechanismEntry);
mechanismName = entry.strKey;
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class WSAuthNServicesHandlersEditViewBean method handleButton1Request.
protected void handleButton1Request(Map values) {
WSAuthNServicesViewBean vb = (WSAuthNServicesViewBean) getViewBean(WSAuthNServicesViewBean.class);
Map mapAttrs = (Map) getPageSessionAttribute(WSAuthNServicesViewBean.PROPERTY_ATTRIBUTE);
OrderedSet handlers = (OrderedSet) mapAttrs.get(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
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.set(index, e.toString());
setPageSessionAttribute(WSAuthNServicesViewBean.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 WSAuthNServicesViewBean method handleTblHandlersButtonDeleteRequest.
/**
* Handles remove handler request.
*
* @param event Request Invocation Event.
*/
public void handleTblHandlersButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS);
tblValues.removeAll(selected);
setPageSessionAttribute(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS, tblValues);
populateHandlersTable(tblValues);
}
forwardTo();
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class WSPersonalProfileServiceViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (!tablePopulated) {
if (!isSubmitCycle()) {
AMServiceProfileModel model = (AMServiceProfileModel) getModel();
if (model != null) {
Set supportedContainers = new OrderedSet();
supportedContainers.addAll(model.getAttributeValues(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS));
populateSupportedContainersTable(supportedContainers);
Set dsAttributeMapList = new OrderedSet();
dsAttributeMapList.addAll(model.getAttributeValues(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST));
populateDSAttributeMapListTable(dsAttributeMapList);
}
}
}
}
Aggregations