Search in sources :

Example 36 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class CoreAttributesViewBean method getValues.

protected Map getValues() throws ModelControlException, AMConsoleException {
    Map values = null;
    CoreAttributesModel model = (CoreAttributesModel) getModelInternal();
    if (model != null) {
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
        values = ps.getAttributeValues(model.getAttributeValues(), model);
    }
    return values;
}
Also used : CoreAttributesModel(com.sun.identity.console.authentication.model.CoreAttributesModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) Map(java.util.Map)

Example 37 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class CoreAttributesViewBean method handleButton1Request.

/**
     * Handles cancel request.
     *
     * @param event Request invocation event.
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        CoreAttributesModel model = (CoreAttributesModel) getModel();
        Map original = model.getAttributeValues();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
        model.setAttributeValues(ps.getAttributeValues(original, true, model));
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.updated");
        forwardTo();
    } catch (AMConsoleException a) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", a.getMessage());
        forwardTo();
    }
}
Also used : CoreAttributesModel(com.sun.identity.console.authentication.model.CoreAttributesModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 38 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class EditAuthTypeViewBean method beginDisplay.

/**
     * This will populate the property sheet with attribute values for display. If this is called after
     * a dynamic request the values that was present on the UI (which might not have been persisted) will be used.
     * @param event The display event.
     * @throws ModelControlException
     */
public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    final AuthPropertiesModel model = getAuthModel();
    final String instance = (String) getPageSessionAttribute(SERVICE_TYPE);
    final AMPropertySheet propertySheet = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
    Map valueMap = unsavedAttributeValues;
    if (model != null && propertySheet != null) {
        // If this is not a dynamic request the UI is set with persisted values
        if (!dynamicRequest) {
            valueMap = model.getInstanceValues(instance);
        }
        if (valueMap != null) {
            propertySheet.setAttributeValues(valueMap, model);
        }
    }
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AuthPropertiesModel(com.sun.identity.console.authentication.model.AuthPropertiesModel) Map(java.util.Map)

Example 39 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class AuthConfigViewBean method cacheValues.

private void cacheValues() throws ModelControlException {
    AuthConfigurationModel acModel = (AuthConfigurationModel) getModel();
    try {
        Map original = acModel.getValues();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
        Map changedValues = (Map) ps.getAttributeValues(original, true, acModel);
        original.putAll(changedValues);
        setPageSessionAttribute(ReorderAuthChainsViewBean.PG_SESSION_TRACKING, (HashMap) changedValues);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        forwardTo();
    }
}
Also used : AuthConfigurationModel(com.sun.identity.console.authentication.model.AuthConfigurationModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 40 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.

the class NewAuthInstanceViewBean method createChild.

protected View createChild(String name) {
    View view = null;
    if (name.equals(PGTITLE_TWO_BTNS)) {
        view = new CCPageTitle(this, ptModel, name);
    } else if (name.equals(PROPERTY_ATTRIBUTE)) {
        view = new AMPropertySheet(this, propertySheetModel, name);
    } else if (propertySheetModel.isChildSupported(name)) {
        view = propertySheetModel.createChild(this, name, getModel());
        if (name.equals(INSTANCE_TYPE)) {
            //set the available options for the radio button
            CCRadioButton radio = (CCRadioButton) view;
            radio.setOptions(createAuthTypeOptionList());
        }
    } else if (ptModel.isChildSupported(name)) {
        view = ptModel.createChild(this, name);
    } else {
        view = super.createChild(name);
    }
    return view;
}
Also used : CCRadioButton(com.sun.web.ui.view.html.CCRadioButton) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) View(com.iplanet.jato.view.View) CCPageTitle(com.sun.web.ui.view.pagetitle.CCPageTitle)

Aggregations

AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)122 Map (java.util.Map)79 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)76 HashMap (java.util.HashMap)37 SAMLv2Model (com.sun.identity.console.federation.model.SAMLv2Model)28 Set (java.util.Set)21 HashSet (java.util.HashSet)15 List (java.util.List)10 View (com.iplanet.jato.view.View)9 IDFFModel (com.sun.identity.console.federation.model.IDFFModel)8 SubConfigModel (com.sun.identity.console.service.model.SubConfigModel)8 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)8 ArrayList (java.util.ArrayList)7 Iterator (java.util.Iterator)7 CCPageTitle (com.sun.web.ui.view.pagetitle.CCPageTitle)6 ModelControlException (com.iplanet.jato.model.ModelControlException)5 WSFedPropertiesModel (com.sun.identity.console.federation.model.WSFedPropertiesModel)5 EntitiesModel (com.sun.identity.console.idm.model.EntitiesModel)5 AbstractAuditModel (com.sun.identity.console.audit.model.AbstractAuditModel)4 FSAuthDomainsModel (com.sun.identity.console.federation.model.FSAuthDomainsModel)4