Search in sources :

Example 76 with AMPropertySheet

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

the class AuthPropertiesViewBean method handleButton1Request.

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

Example 77 with AMPropertySheet

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

the class IDFFAffiliateViewBean method handleButton1Request.

/**
     * Handles save
     *
     * @param event Request invocation event
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    retrieveCommonProperties();
    IDFFModel model = (IDFFModel) getModel();
    try {
        // get affiliate members
        CCAddRemove addRemoveList = (CCAddRemove) getChild(model.ATTR_AFFILIATE_MEMBERS);
        addRemoveList.restoreStateData();
        CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
        Set members = new HashSet(getSelectedValues(addRemoveModel));
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        Map orig = model.getAffiliateProfileAttributeValues(realm, entityName);
        Map values = ps.getAttributeValues(orig, false, model);
        model.updateAffiliateProfile(realm, entityName, values, members);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.Affiliate.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        debug.warning("IDFFAffiliateViewBean.handleButton1Request", e);
    }
    forwardTo();
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel) CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) Set(java.util.Set) HashSet(java.util.HashSet) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove) Map(java.util.Map) HashSet(java.util.HashSet)

Example 78 with AMPropertySheet

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

the class IDFFIDPViewBean method populateValue.

private void populateValue(String name, String realm) {
    try {
        IDFFModel model = (IDFFModel) getModelInternal();
        Map values = model.getEntityIDPDescriptor(realm, name);
        values.putAll(model.getIDPEntityConfig(realm, name, location));
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        ps.setAttributeValues(values, model);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 79 with AMPropertySheet

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

the class IDFFIDPViewBean method handleButton1Request.

/**
     * Handles save
     *
     * @param event Request invocation event
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    retrieveCommonProperties();
    try {
        IDFFModel model = (IDFFModel) getModel();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        // update standard metadata and extended metadata           
        Map stdValues = ps.getAttributeValues(model.getEntityIDPDescriptor(realm, entityName), false, model);
        Map extValues = ps.getAttributeValues(model.getAllIDPExtendedMetaMap(), false, model);
        Map idpAllExtValues = model.getIDPEntityConfig(realm, entityName, ENTITY_LOCATION);
        idpAllExtValues.putAll(extValues);
        model.updateEntityIDPDescriptor(realm, entityName, stdValues, idpAllExtValues, isHosted());
        model.updateIDPEntityConfig(realm, entityName, idpAllExtValues);
        if (isHosted()) {
            //update Authentication Contexts
            model.updateIDPAuthenticationContexts(realm, entityName, getAuthenticationContexts());
        }
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.provider.idp.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) Map(java.util.Map)

Example 80 with AMPropertySheet

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

the class SAMLv2AffiliateViewBean method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        CCAddRemove addRemoveList = (CCAddRemove) getChild(model.AFFILIATE_MEMBER);
        addRemoveList.restoreStateData();
        CCAddRemoveModel addRemoveModel = (CCAddRemoveModel) addRemoveList.getModel();
        Set members = new HashSet(getSelectedValues(addRemoveModel));
        if (members.isEmpty() || members == null) {
            throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.members"));
        }
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        Map orig = getStandardAffiliationValues();
        Map values = ps.getAttributeValues(orig, false, model);
        model.setStdAffilationValues(realm, entityName, values, members);
        //save for ext will be done once backend api is ready
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.affiliation.property.updated");
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) Set(java.util.Set) HashSet(java.util.HashSet) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model) CCAddRemove(com.sun.web.ui.view.addremove.CCAddRemove) HashMap(java.util.HashMap) Map(java.util.Map) HashSet(java.util.HashSet)

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