use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFGeneralViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
psModel.setValue(TF_NAME, entityName);
IDFFModel model = (IDFFModel) getModel();
try {
if (model.isAffiliate(realm, entityName)) {
psModel.setValue(TXT_TYPE, "idff.entityDescriptor.type.affiliate.label");
} else {
psModel.setValue(TXT_TYPE, "idff.entityDescriptor.type.provider.label");
}
} catch (AMConsoleException e) {
debug.error("IDFFGeneralViewBean.beginDisplay", e);
}
populateValue(entityName);
}
use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFIDPViewBean 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_LEVEL, "0");
tblAuthContextsModel.setValue(TBL_DATA_KEY, "none");
tblAuthContextsModel.setValue(TBL_DATA_SUPPORTED, "");
tblAuthContextsModel.setValue(TBL_DATA_VALUE, "");
} else {
tblAuthContextsModel.setValue(TBL_DATA_LEVEL, c.level);
tblAuthContextsModel.setValue(TBL_DATA_KEY, c.key);
tblAuthContextsModel.setValue(TBL_DATA_SUPPORTED, c.supported);
tblAuthContextsModel.setValue(TBL_DATA_VALUE, c.value);
}
}
use of com.sun.identity.console.federation.model.IDFFModel in project OpenAM by OpenRock.
the class IDFFSPViewBean method populateValue.
private void populateValue(String realm, String name) {
try {
IDFFModel model = (IDFFModel) getModelInternal();
Map values = model.getEntitySPDescriptor(realm, name);
values.putAll(model.getSPEntityConfig(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.federation.model.IDFFModel 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.federation.model.IDFFModel 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());
}
}
Aggregations