use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ResponseProviderEditViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
PolicyModel model = (PolicyModel) getModel();
String i18nName = (String) propertySheetModel.getValue(RESPONSEPROVIDER_TYPE_NAME);
String title = model.getLocalizedString("page.title.policy.responseprovider.edit");
String[] param = { i18nName };
ptModel.setPageTitleText(MessageFormat.format(title, (Object[]) param));
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ReferralEditViewBean method getBreadCrumbDisplayName.
protected String getBreadCrumbDisplayName() {
PolicyModel model = (PolicyModel) getModel();
String origName = (String) getPageSessionAttribute(EDIT_REFERRAL_NAME);
String[] arg = { origName };
return MessageFormat.format(model.getLocalizedString("breadcrumbs.editReferral"), (Object[]) arg);
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ReferralOpViewBeanBase method createReferral.
protected Referral createReferral() throws ModelControlException, AMConsoleException {
Referral referral = null;
String referralType = (String) propertySheetModel.getValue(REFERRAL_TYPE);
String referralName = getReferralName();
if (referralName != null) {
Set values = getValues(referralType);
if (values != null) {
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
PolicyModel model = (PolicyModel) getModel();
referral = model.createReferral(realmName, referralType, values);
}
}
return referral;
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ReferralOpViewBeanBase method setPossibleValues.
private void setPossibleValues(CCSelect selectView) {
String filter = (String) propertySheetModel.getValue(FILTER);
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
String referralType = (String) propertySheetModel.getValue(REFERRAL_TYPE);
PolicyModel model = (PolicyModel) getModel();
ValidValues validValues = model.getReferralPossibleValues(realmName, referralType, filter);
if (validValues != null) {
int errCode = validValues.getErrorCode();
if (errCode == ValidValues.SIZE_LIMIT_EXCEEDED) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", "policy.referral.sizelimit.exceeded.message");
} else if (errCode == ValidValues.SIZE_LIMIT_EXCEEDED) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", "policy.referral.timelimit.exceeded.message");
}
OptionList optList = createOptionList(validValues.getSearchResults());
selectView.setOptions(optList);
}
}
use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.
the class ProfileViewBeanBase method getCachedPolicy.
protected CachedPolicy getCachedPolicy() throws AMConsoleException {
CachedPolicy policy = null;
String cacheID = (String) getPageSessionAttribute(PG_SESSION_POLICY_CACHE_ID);
if (cacheID != null) {
PolicyCache cache = PolicyCache.getInstance();
PolicyModel model = (PolicyModel) getModel();
policy = model.getCachedPolicy(cacheID);
}
return policy;
}
Aggregations