use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SMDiscoveryProviderResourceIdMapperAddViewBean method handleButton1Request.
protected void handleButton1Request(Map data) {
SMDiscoveryServiceViewBean vb = (SMDiscoveryServiceViewBean) getViewBean(SMDiscoveryServiceViewBean.class);
Map attrValues = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
Set mapper = (Set) attrValues.get(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER);
if (mapper == null) {
mapper = new OrderedSet();
attrValues.put(AMAdminConstants.DISCOVERY_SERVICE_PROVIDER_RESOURCE_ID_MAPPER, mapper);
}
mapper.add(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 handleTblBootstrapResOffButtonDeleteRequest.
/**
* Handles remove resource offerings request.
*
* @param event Request Invocation Event.
*/
public void handleTblBootstrapResOffButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
setSubmitCycle(true);
CCActionTable table = (CCActionTable) getChild(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
try {
OrderedSet tblValues = (OrderedSet) getPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
SMDiscoveryServiceData smEntry = SMDiscoveryServiceData.getEntries(tblValues);
smEntry.deleteDiscoEntries(selected);
tblValues = (OrderedSet) smEntry.getDiscoveryEntries();
setPageSessionAttribute(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF, tblValues);
populateBootstrapResOffTable(tblValues);
} 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 FSSAMLTrustedPartnersViewBeanBase method setValues.
/**
* Set value of a entry from the cache value in page session.
*
* @param idx Index of the entry in the cache Set.
*/
protected void setValues(int idx) {
Map mapAttrs = (Map) getPageSessionAttribute(FSSAMLServiceViewBean.PROPERTY_ATTRIBUTE);
OrderedSet set = (OrderedSet) mapAttrs.get(FederationViewBean.TABLE_TRUSTED_PARTNERS);
setValues(AMPipeDelimitAttrTokenizer.getInstance().tokenizes((String) set.get(idx)));
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCPolicyResourceComparatorEditViewBean method handleButton1Request.
protected void handleButton1Request(PolicyResourceComparator rc) {
SCPolicyViewBean vb = (SCPolicyViewBean) getViewBean(SCPolicyViewBean.class);
Map mapAttrs = (Map) getPageSessionAttribute(SCPolicyViewBean.PROPERTY_ATTRIBUTE);
OrderedSet resourceComparators = (OrderedSet) mapAttrs.get(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR);
int index = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
resourceComparators.set(index, 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 WSAuthNServicesViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
resetButtonState(TBL_HANDLERS_DELETE_BTN);
if (!tablePopulated) {
if (!isSubmitCycle()) {
AMServiceProfileModel model = (AMServiceProfileModel) getModel();
if (model != null) {
Set handlers = new OrderedSet();
handlers.addAll(model.getAttributeValues(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS));
populateHandlersTable(handlers);
}
}
}
if (!isInlineAlertMessageSet()) {
String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
if ((flag != null) && flag.equals("1")) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
}
}
}
Aggregations