Search in sources :

Example 6 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 7 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 8 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 9 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)

Example 10 with AMPropertySheet

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

the class SAMLv2AuthnAuthorityViewBean method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        //retrieve the standard metadata values from the property sheet
        Map authnAuthValues = ps.getAttributeValues(model.getStandardAuthnAuthorityAttributes(realm, entityName), false, model);
        //save the standard metadata values for attribute authority
        model.setStdAuthnAuthorityValues(realm, entityName, authnAuthValues);
        //retrieve the extended metadata values from the property sheet
        Map authnAuthExtValues = ps.getAttributeValues(model.getauthnAuthEXDataMap(), false, model);
        //save the extended metadata values for attribute authority
        model.setExtauthnAuthValues(realm, entityName, authnAuthExtValues, location);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.authnauth.property.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model) HashMap(java.util.HashMap) Map(java.util.Map)

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