use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFSPViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
IDFFModel model = (IDFFModel) getModelInternal();
psModel.setValue(IDFFModel.ATTR_PROVIDER_TYPE, (String) getPageSessionAttribute(ENTITY_LOCATION));
populateValue(realm, entityName);
if (isHosted()) {
IDFFAuthContexts authContexts = null;
try {
authContexts = model.getSPAuthenticationContexts(realm, entityName);
} catch (AMConsoleException e) {
debug.warning("IDFFSPViewBean", e);
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
populateAuthenticationContext(authContexts);
}
}
use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFSPViewBean 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.getEntitySPDescriptor(realm, entityName), false, model);
Map extValues = ps.getAttributeValues(model.getAllSPExtendedMetaMap(), false, model);
Map spAllExtValues = model.getSPEntityConfig(realm, entityName, ENTITY_LOCATION);
spAllExtValues.putAll(extValues);
model.updateEntitySPDescriptor(realm, entityName, stdValues, spAllExtValues, isHosted());
model.updateSPEntityConfig(realm, entityName, spAllExtValues);
if (isHosted()) {
// update Authentication Contexts
model.updateSPAuthenticationContexts(realm, entityName, getAuthenticationContexts());
}
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.provider.sp.updated");
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
debug.warning("IDFFSPViewBean -> handleButton1Request", e);
}
forwardTo();
}
use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFGeneralViewBean method populateValue.
private void populateValue(String name) {
IDFFModel model = (IDFFModel) getModel();
try {
Map values = model.getCommonAttributeValues(realm, name);
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.IDFFModel in project OpenAM by OpenRock.
the class IDFFIDPViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
IDFFModel model = (IDFFModel) getModelInternal();
psModel.setValue(IDFFModel.ATTR_PROVIDER_TYPE, (String) getPageSessionAttribute(ENTITY_LOCATION));
populateValue(entityName, realm);
if (isHosted()) {
IDFFAuthContexts authContexts = null;
try {
authContexts = model.getIDPAuthenticationContexts(realm, entityName);
} catch (AMConsoleException e) {
debug.warning("IDFFIDPViewBean", e);
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
populateAuthenticationContext(authContexts);
}
}
use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFAffiliateViewBean method populateValue.
private void populateValue(String name) {
IDFFModel model = (IDFFModel) getModelInternal();
try {
Map values = model.getAffiliateProfileAttributeValues(realm, name);
Set availableEntities = model.getAllEntityDescriptorNames(realm);
Set affliliatEntities = model.getAllAffiliateEntityDescriptorNames(realm);
Set affiliateMembers = model.getAllAffiliateMembers(realm, name);
availableEntities.removeAll(affiliateMembers);
availableEntities.removeAll(affliliatEntities);
if (affiliateMembersModel == null) {
affiliateMembersModel = new CCAddRemoveModel();
}
if ((availableEntities != null) && !availableEntities.isEmpty()) {
affiliateMembersModel.setAvailableOptionList(createOptionList(availableEntities));
}
if ((affiliateMembers != null) && !affiliateMembers.isEmpty()) {
affiliateMembersModel.setSelectedOptionList(createOptionList(affiliateMembers));
}
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
ps.setAttributeValues(values, model);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
Aggregations