Search in sources :

Example 1 with CoreAttributesModel

use of com.sun.identity.console.authentication.model.CoreAttributesModel 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 2 with CoreAttributesModel

use of com.sun.identity.console.authentication.model.CoreAttributesModel 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)

Aggregations

CoreAttributesModel (com.sun.identity.console.authentication.model.CoreAttributesModel)2 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)2 Map (java.util.Map)2 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)1