Search in sources :

Example 71 with PolicyModel

use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.

the class RuleAddViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (ruleName != null) {
        propertySheetModel.setValue(RULE_NAME, ruleName);
    }
    if (serviceType != null) {
        propertySheetModel.setValue(SERVICE_TYPE, serviceType);
        PolicyModel model = (PolicyModel) getModel();
        Map map = model.getServiceTypeNames();
        String i18nName = (String) map.get(serviceType);
        propertySheetModel.setValue(SERVICE_TYPE_NAME_LBL, i18nName);
        propertySheetModel.setValue(SERVICE_TYPE_NAME, i18nName);
    } else {
        String i18nName = (String) propertySheetModel.getValue(SERVICE_TYPE_NAME);
        propertySheetModel.setValue(SERVICE_TYPE_NAME_LBL, i18nName);
    }
    try {
        populateActionsTable(true);
    } catch (AMConsoleException e) {
        debug.warning("RuleAddViewBean.beginDisplay", e);
    //NO-OP
    }
}
Also used : PolicyModel(com.sun.identity.console.policy.model.PolicyModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 72 with PolicyModel

use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.

the class RuleOpViewBeanBase method getManagedResources.

protected void getManagedResources() {
    if (canModify) {
        PolicyModel model = (PolicyModel) getModel();
        String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
        String serviceType = (String) propertySheetModel.getValue(SERVICE_TYPE);
        CCSelectableList cb = (CCSelectableList) getChild(MANAGED_RESOURCES);
        cb.setOptions(createOptionList(model.getManagedResources(realmName, serviceType)));
    }
}
Also used : CCSelectableList(com.sun.web.ui.view.html.CCSelectableList) PolicyModel(com.sun.identity.console.policy.model.PolicyModel)

Example 73 with PolicyModel

use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.

the class SelectConditionTypeViewBean method getTypeOptions.

protected OptionList getTypeOptions() {
    PolicyModel model = (PolicyModel) getModel();
    String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    return createOptionList(model.getActiveConditionTypes(curRealm), model.getUserLocale());
}
Also used : PolicyModel(com.sun.identity.console.policy.model.PolicyModel)

Example 74 with PolicyModel

use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.

the class SelectReferralTypeViewBean method getTypeOptions.

protected OptionList getTypeOptions() {
    PolicyModel model = (PolicyModel) getModel();
    String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    return createOptionList(model.getActiveReferralTypes(curRealm), model.getUserLocale());
}
Also used : PolicyModel(com.sun.identity.console.policy.model.PolicyModel)

Example 75 with PolicyModel

use of com.sun.identity.console.policy.model.PolicyModel in project OpenAM by OpenRock.

the class SelectResponseProviderTypeViewBean method getTypeOptions.

protected OptionList getTypeOptions() {
    PolicyModel model = (PolicyModel) getModel();
    String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    return createOptionList(model.getActiveResponseProviderTypes(curRealm), model.getUserLocale());
}
Also used : PolicyModel(com.sun.identity.console.policy.model.PolicyModel)

Aggregations

PolicyModel (com.sun.identity.console.policy.model.PolicyModel)84 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)28 Map (java.util.Map)27 CachedPolicy (com.sun.identity.console.policy.model.CachedPolicy)26 HashMap (java.util.HashMap)14 Policy (com.sun.identity.policy.Policy)12 Set (java.util.Set)12 NameNotFoundException (com.sun.identity.policy.NameNotFoundException)11 Iterator (java.util.Iterator)8 OptionList (com.iplanet.jato.view.html.OptionList)7 PolicyCache (com.sun.identity.console.policy.model.PolicyCache)6 QueryResults (com.sun.identity.console.base.model.QueryResults)5 Syntax (com.sun.identity.policy.Syntax)5 Rule (com.sun.identity.policy.Rule)3 Referral (com.sun.identity.policy.interfaces.Referral)3 CCButton (com.sun.web.ui.view.html.CCButton)3 List (java.util.List)3 IdentitySubjectModel (com.sun.identity.console.policy.model.IdentitySubjectModel)2 ActionSchema (com.sun.identity.policy.ActionSchema)2 ValidValues (com.sun.identity.policy.ValidValues)2