use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffEditViewBean method getCurrentServiceData.
protected SMDiscoEntryData getCurrentServiceData() {
SMDiscoEntryData curData = null;
int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet set = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
try {
SMDiscoveryServiceData smEntry = SMDiscoveryServiceData.getEntries(set);
List resourceData = smEntry.getResourceData();
curData = (SMDiscoEntryData) resourceData.get(currentIdx);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
return curData;
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SMDiscoveryProviderResourceIdMapperEditViewBean method getCurrentServiceData.
protected String getCurrentServiceData() {
int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet set = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
return (String) set.get(currentIdx);
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SMDiscoveryProviderResourceIdMapperEditViewBean method handleButton1Request.
protected void handleButton1Request(Map data) throws AMConsoleException {
SMDiscoveryServiceViewBean vb = (SMDiscoveryServiceViewBean) getViewBean(SMDiscoveryServiceViewBean.class);
Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet mapper = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
mapper.set(index, AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_PROVIDER_ID + "=" + (String) data.get(ATTR_PROVIDERID) + "|" + AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER_ID_MAPPER + "=" + (String) data.get(ATTR_IDMAPPER));
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 SMDiscoveryServiceViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
resetButtonState(TBL_BOOTSTRAP_RES_OFF_DELETE_BTN);
resetButtonState(TBL_PROVIDER_RESOURCEID_MAPPER_DELETE_BTN);
if (!tablePopulated) {
if (!isSubmitCycle()) {
SMDiscoveryServiceModel model = (SMDiscoveryServiceModel) getModel();
if (model != null) {
populateProviderResourceIdMapperTable(model.getProviderResourceIdMapper());
Set resoff = new OrderedSet();
resoff.addAll(model.getDiscoEntry(false));
populateBootstrapResOffTable(resoff);
}
}
}
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 SMDiscoveryServiceViewBean method handleTblProviderResourceIdMapperButtonDeleteRequest.
/**
* Handles remove provider resource id mapper request.
*
* @param event Request Invocation Event.
*/
public void handleTblProviderResourceIdMapperButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
tblValues.removeAll(selected);
populateProviderResourceIdMapperTable(tblValues);
}
forwardTo();
}
Aggregations