use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class AuthPropertiesViewBean method handleButton1Request.
/**
* Handles save button request.
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
AuthPropertiesModel model = (AuthPropertiesModel) getModel();
Map original = model.getValues();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
model.setValues(ps.getAttributeValues(original, true, model));
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "authentication.profile.updated");
} catch (AMConsoleException a) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", a.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class IDFFAffiliateViewBean method handleButton1Request.
/**
* Handles save
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
retrieveCommonProperties();
IDFFModel model = (IDFFModel) getModel();
try {
// get affiliate members
CCAddRemove addRemoveList = (CCAddRemove) getChild(model.ATTR_AFFILIATE_MEMBERS);
addRemoveList.restoreStateData();
CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
Set members = new HashSet(getSelectedValues(addRemoveModel));
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
Map orig = model.getAffiliateProfileAttributeValues(realm, entityName);
Map values = ps.getAttributeValues(orig, false, model);
model.updateAffiliateProfile(realm, entityName, values, members);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.Affiliate.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
debug.warning("IDFFAffiliateViewBean.handleButton1Request", e);
}
forwardTo();
}
use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class IDFFIDPViewBean method populateValue.
private void populateValue(String name, String realm) {
try {
IDFFModel model = (IDFFModel) getModelInternal();
Map values = model.getEntityIDPDescriptor(realm, name);
values.putAll(model.getIDPEntityConfig(realm, name, 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.base.AMPropertySheet in project OpenAM by OpenRock.
the class IDFFIDPViewBean method handleButton1Request.
/**
* Handles save
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
retrieveCommonProperties();
try {
IDFFModel model = (IDFFModel) getModel();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
// update standard metadata and extended metadata
Map stdValues = ps.getAttributeValues(model.getEntityIDPDescriptor(realm, entityName), false, model);
Map extValues = ps.getAttributeValues(model.getAllIDPExtendedMetaMap(), false, model);
Map idpAllExtValues = model.getIDPEntityConfig(realm, entityName, ENTITY_LOCATION);
idpAllExtValues.putAll(extValues);
model.updateEntityIDPDescriptor(realm, entityName, stdValues, idpAllExtValues, isHosted());
model.updateIDPEntityConfig(realm, entityName, idpAllExtValues);
if (isHosted()) {
//update Authentication Contexts
model.updateIDPAuthenticationContexts(realm, entityName, getAuthenticationContexts());
}
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.provider.idp.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.base.AMPropertySheet 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