use of com.sun.identity.console.policy.model.SelectRealmModel in project OpenAM by OpenRock.
the class SelectRealmViewBean method setSchemes.
private void setSchemes(String realm) {
if ((realm == null) || (realm.length() == 0)) {
realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
}
SelectRealmModel model = (SelectRealmModel) getModel();
try {
Set schemes = model.getAuthenticationInstances(realm);
CCSelect sl = (CCSelect) getChild(ATTR_SCHEMES);
sl.setOptions(createOptionList(schemes));
} catch (AMConsoleException e) {
if (!isInlineAlertMessageSet()) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
}
use of com.sun.identity.console.policy.model.SelectRealmModel in project OpenAM by OpenRock.
the class SelectRealmViewBean method getRealmNames.
private Set getRealmNames(String filter) {
Set realmNames = null;
SelectRealmModel model = (SelectRealmModel) getModel();
try {
realmNames = model.getRealmNames("/", filter);
if (realmNames.isEmpty()) {
if (!isInlineAlertMessageSet()) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "policy.condition.selectrealm.no.search.result.message");
}
} else {
disableButton("button1", false);
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
if ((realmNames == null) || realmNames.isEmpty()) {
realmNames = new HashSet(1);
}
realmNames.add("");
return realmNames;
}
Aggregations