use of com.sun.identity.console.federation.model.IDFFModel 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.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFSPViewBean method populateAuthenticationContext.
private void populateAuthenticationContext(String name, IDFFAuthContexts authContexts, int index) {
if (index != 0) {
tblAuthContextsModel.appendRow();
}
IDFFModel model = (IDFFModel) getModelInternal();
tblAuthContextsModel.setValue(TBL_DATA_CONTEXT_REFERENCE, name);
tblAuthContextsModel.setValue(TBL_DATA_LABEL, model.getLocalizedString(getAuthContextI18nKey(name)));
IDFFAuthContexts.IDFFAuthContext c = null;
if (authContexts != null) {
c = authContexts.get(name);
}
if (c == null) {
tblAuthContextsModel.setValue(TBL_DATA_SUPPORTED, "");
tblAuthContextsModel.setValue(TBL_DATA_LEVEL, "0");
} else {
tblAuthContextsModel.setValue(TBL_DATA_SUPPORTED, c.supported);
tblAuthContextsModel.setValue(TBL_DATA_LEVEL, c.level);
}
}
use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFAffiliateViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
IDFFModel model = (IDFFModel) getModelInternal();
String[] args = { entityName };
String pageTitle = MessageFormat.format(model.getLocalizedString("idff.page.title.entityDescriptors.Affiliate"), args);
setPageTitle(pageTitle);
psModel.setValue(IDFFModel.ATTR_PROVIDER_TYPE, (String) getPageSessionAttribute(ENTITY_LOCATION));
populateValue(entityName);
}
use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFGeneralViewBean method handleButton1Request.
/**
* Handles save
*
* @param event Request invocation event
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
retrieveCommonProperties();
IDFFModel model = (IDFFModel) getModel();
try {
Map orig = model.getCommonAttributeValues(realm, entityName);
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
Map values = ps.getAttributeValues(orig, false, model);
model.modifyEntityProfile(realm, entityName, values);
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.provider.general.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
Aggregations