use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSOAPBindingRequestHandlerListDupViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (dupIndex != -1) {
Map mapAttrs = (Map) getPageSessionAttribute(SCSOAPBindingViewBean.PROPERTY_ATTRIBUTE);
OrderedSet set = (OrderedSet) mapAttrs.get(SCSOAPBindingModelImpl.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 SCSOAPBindingViewBean 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(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
tblValues.removeAll(selected);
setPageSessionAttribute(SCSOAPBindingModelImpl.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 SCSOAPBindingViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
resetButtonState(TBL_REQUEST_HANDLER_LIST_DELETE_BTN);
if (!tablePopulated) {
if (!isSubmitCycle()) {
AMServiceProfileModel model = (AMServiceProfileModel) getModel();
if (model != null) {
Set handlers = new OrderedSet();
handlers.addAll(model.getAttributeValues(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST));
populateRequestHandlerListTable(handlers);
}
}
}
if (!isInlineAlertMessageSet()) {
String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
if ((flag != null) && flag.equals("1")) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
}
}
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffAddViewBean method handleButton1Request.
protected void handleButton1Request(SMDiscoEntryData smData) {
SMDiscoveryServiceViewBean vb = (SMDiscoveryServiceViewBean) getViewBean(SMDiscoveryServiceViewBean.class);
Map attrValues = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
Set resoff = (Set) attrValues.get(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
try {
SMDiscoveryServiceData smEntry = ((resoff == null) || resoff.isEmpty()) ? new SMDiscoveryServiceData() : SMDiscoveryServiceData.getEntries(resoff);
smEntry.addResourceData(smData);
attrValues.put(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, (OrderedSet) smEntry.getDiscoveryEntries());
setPageSessionAttribute(SMDiscoveryServiceViewBean.PAGE_MODIFIED, "1");
backTrail();
unlockPageTrailForSwapping();
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
forwardTo();
}
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSOAPBindingViewBean method prePopulateRequestHandlerListTable.
private void prePopulateRequestHandlerListTable(Map attributeValues) {
Set handlers = null;
if (attributeValues != null) {
handlers = new OrderedSet();
Set set = (Set) attributeValues.get(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
if ((set != null) && !set.isEmpty()) {
handlers.addAll(set);
}
} else {
handlers = (Set) removePageSessionAttribute(SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
}
if (handlers != null) {
populateRequestHandlerListTable(handlers);
}
}
Aggregations