use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.
the class SAMLv2IDPAssertionProcessingViewBean method getExtendedValues.
private Map getExtendedValues() {
Map extendedValues = new HashMap();
try {
//gets extended metadata values
SAMLv2Model model = (SAMLv2Model) getModel();
Map attr = model.getExtendedIdentityProviderAttributes(realm, entityName);
Set entries = attr.entrySet();
Iterator iterator = entries.iterator();
//the list of values is converted to a set
while (iterator.hasNext()) {
Map.Entry entry = (Map.Entry) iterator.next();
extendedValues.put((String) entry.getKey(), convertListToSet((List) entry.getValue()));
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
return extendedValues;
}
use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.
the class SAMLv2PEPViewBean method populateValue.
private void populateValue() {
SAMLv2Model model = (SAMLv2Model) getModelInternal();
try {
Map values = model.getPEPDescriptor(realm, entityName);
values.putAll(model.getPEPConfig(realm, entityName, location));
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
ps.setAttributeValues(values, model);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.
the class SAMLv2PEPViewBean method handleButton1Request.
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
retrieveCommonProperties();
try {
SAMLv2Model model = (SAMLv2Model) getModel();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
// update standard metadata
Map origStdMeta = model.getPEPDescriptor(realm, entityName);
Map stdValues = ps.getAttributeValues(origStdMeta, false, model);
model.updatePEPDescriptor(realm, entityName, stdValues);
//update extended metadata
Map origExtMeta = model.getPEPConfig(realm, entityName, location);
Map extValues = ps.getAttributeValues(model.getXacmlPEPExtendedMetaMap(), false, model);
origExtMeta.putAll(extValues);
model.updatePEPConfig(realm, entityName, location, origExtMeta);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.entityDescriptor.provider.pep.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.
the class SAMLv2GeneralViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
SAMLv2Model samlModel = (SAMLv2Model) getModel();
super.beginDisplay(event);
setDisplayFieldValue(samlModel.TF_NAME, entityName);
}
use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.
the class SAMLv2AffiliateViewBean method handleButton1Request.
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
SAMLv2Model model = (SAMLv2Model) getModel();
CCAddRemove addRemoveList = (CCAddRemove) getChild(model.AFFILIATE_MEMBER);
addRemoveList.restoreStateData();
CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
Set members = new HashSet(getSelectedValues(addRemoveModel));
if (members.isEmpty() || members == null) {
throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.members"));
}
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
Map orig = getStandardAffiliationValues();
Map values = ps.getAttributeValues(orig, false, model);
model.setStdAffilationValues(realm, entityName, values, members);
//save for ext will be done once backend api is ready
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.affiliation.property.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
Aggregations