use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class PolicyReferralViewBeanBase method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
try {
populateAttributes();
PolicyModel model = (PolicyModel) getModel();
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
if (model.getActiveReferralTypes(realmName).isEmpty()) {
CCButton btn = (CCButton) getChild("tblReferralsButtonAdd");
btn.setDisabled(true);
}
CCButton btn = (CCButton) getChild("tblReferralsButtonDelete");
btn.setDisabled(true);
} catch (AMConsoleException e) {
CCButton btn = (CCButton) getChild("tblReferralsButtonAdd");
btn.setDisabled(true);
btn = (CCButton) getChild("tblReferralsButtonDelete");
btn.setDisabled(true);
}
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class SelectTypeViewBeanBase method getCachedPolicy.
protected CachedPolicy getCachedPolicy() throws AMConsoleException {
CachedPolicy policy = null;
String cacheID = (String) getPageSessionAttribute(ProfileViewBeanBase.PG_SESSION_POLICY_CACHE_ID);
if (cacheID != null) {
PolicyModel model = (PolicyModel) getModel();
policy = model.getCachedPolicy(cacheID);
}
return policy;
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ResponseProviderOpViewBeanBase method getValues.
protected Map getValues(String providerType) throws ModelControlException, AMConsoleException {
PolicyModel model = (PolicyModel) getModel();
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
Map values = getResponseProviderValues(model, realmName, providerType);
if (values.isEmpty()) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", getMissingValuesMessage());
values = null;
}
return values;
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ResponseProviderOpViewBeanBase method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (!submitCycle) {
PolicyModel model = (PolicyModel) getModel();
String providerName = (String) getPageSessionAttribute(PG_SESSION_PROVIDER_NAME);
String providerType = (String) getPageSessionAttribute(PG_SESSION_PROVIDER_TYPE);
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
propertySheetModel.setValue(RESPONSEPROVIDER_NAME, providerName);
propertySheetModel.setValue(RESPONSEPROVIDER_TYPE, providerType);
Map map = model.getActiveResponseProviderTypes(realmName);
String i18nName = (String) map.get(providerType);
propertySheetModel.setValue(RESPONSEPROVIDER_TYPE_NAME, i18nName);
setPropertiesValues(getDefaultValues(), model);
}
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ResponseProviderOpViewBeanBase method createResponseProvider.
private ResponseProvider createResponseProvider(String providerType, Map values) throws AMConsoleException {
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
PolicyModel model = (PolicyModel) getModel();
return model.createResponseProvider(realmName, providerType, values);
}
Aggregations