use of com.sun.identity.console.federation.model.FSSAMLServiceModel in project OpenAM by OpenRock.
the class FSSAMLServiceViewBean method getValues.
private Map getValues(boolean modified, boolean matchPassword) throws ModelControlException, AMConsoleException {
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
FSSAMLServiceModel model = (FSSAMLServiceModel) getModel();
Map origValues = model.getAttributeValues();
Map origNonTableValues = new HashMap();
origNonTableValues.putAll(origValues);
AMAdminUtils.removeMapEntries(origNonTableValues, tabledAttributes);
Map mapAttrValues = ps.getAttributeValues(origNonTableValues, modified, matchPassword, model);
Map cachedValues = (Map) getPageSessionAttribute(PROPERTY_ATTRIBUTE);
for (Iterator i = cachedValues.keySet().iterator(); i.hasNext(); ) {
String attrName = (String) i.next();
Set values = (Set) cachedValues.get(attrName);
if (tabledAttributes.contains(attrName)) {
mapAttrValues.put(attrName, values);
}
}
return mapAttrValues;
}
use of com.sun.identity.console.federation.model.FSSAMLServiceModel in project OpenAM by OpenRock.
the class FederationViewBean method getTrustedPartnersSelectType.
private String getTrustedPartnersSelectType(String input) {
FSSAMLServiceModel model = (FSSAMLServiceModel) getSAMLModel();
String ret = null;
if (input.equals("artifact")) {
ret = model.getLocalizedString("saml.profile.trustedPartners.selectType.profile.artifact.label");
} else if (input.equals("post")) {
ret = model.getLocalizedString("saml.profile.trustedPartners.selectType.profile.post.label");
} else if (input.equals("soap")) {
ret = model.getLocalizedString("saml.profile.trustedPartners.selectType.profile.soap.label");
}
return ret;
}
use of com.sun.identity.console.federation.model.FSSAMLServiceModel in project OpenAM by OpenRock.
the class FederationViewBean method handleDeleteTPButtonRequest.
/**
* Handles the delete trusted partner request. The items which are
* selected in the SAML table will be removed. After the processing is
* complete a message will be displayed indicating the process succeeded,
* or what failed if it didn't succeed.
*
* @param event Request Invocation Event.
*/
public void handleDeleteTPButtonRequest(RequestInvocationEvent event) throws ModelControlException {
CCActionTable tbl = (CCActionTable) getChild(SAML_TABLE);
tbl.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(SAML_TABLE);
// get selected rows here
Integer[] selected = tblModel.getSelectedRows();
List currentList = (List) getPageSessionAttribute(SAML_TABLE_ATTRIBUTE);
Set selectedSet = new HashSet();
for (int i = 0; i < selected.length; i++) {
selectedSet.add(currentList.get(selected[i].intValue()));
}
try {
FSSAMLServiceModel model = (FSSAMLServiceModel) getSAMLModel();
model.deleteTrustPartners(selectedSet);
if (selected.length == 1) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "saml.message.trusted.partner.deleted");
} else {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "saml.message.trusted.partner.deleted.pural");
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.federation.model.FSSAMLServiceModel in project OpenAM by OpenRock.
the class FSSAMLServiceViewBean method setInlineHelps.
private void setInlineHelps() {
FSSAMLServiceModel model = (FSSAMLServiceModel) getModel();
Map helps = model.getAttributeInlineHelps();
for (Iterator iter = helps.keySet().iterator(); iter.hasNext(); ) {
String name = (String) iter.next();
try {
View view = getChild("help" + name);
if (DisplayField.class.isInstance(view)) {
((DisplayField) view).setValue((String) helps.get(name));
}
} catch (IllegalArgumentException e) {
// do nothing.
// child is not a help.
}
}
}
use of com.sun.identity.console.federation.model.FSSAMLServiceModel in project OpenAM by OpenRock.
the class FSSAMLServiceViewBean method setLabels.
private void setLabels() {
FSSAMLServiceModel model = (FSSAMLServiceModel) getModel();
Map labels = model.getAttributeLabels();
for (Iterator iter = labels.keySet().iterator(); iter.hasNext(); ) {
String name = (String) iter.next();
try {
View view = getChild("lbl" + name);
if (DisplayField.class.isInstance(view)) {
((DisplayField) view).setValue((String) labels.get(name));
}
} catch (IllegalArgumentException e) {
// do nothing.
// child is not a label.
}
}
}
Aggregations