Search in sources :

Example 46 with AMPropertySheet

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

the class SAMLv2IDPAssertionContentViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
    ps.init();
    SAMLv2Model model = (SAMLv2Model) getModel();
    ps.setAttributeValues(getStandardValues(), model);
    ps.setAttributeValues(getExtendedValues(), model);
    if (isHosted()) {
        SAMLv2AuthContexts authContexts = null;
        try {
            authContexts = model.getIDPAuthenticationContexts(realm, entityName);
        } catch (AMConsoleException e) {
            setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        }
        populateAuthenticationContext(authContexts, tblAuthContextsModel, SAMLv2Model.IDP_AUTHN_CONTEXT_CLASS_REF_MAPPING_DEFAULT);
    }
}
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)

Example 47 with AMPropertySheet

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

the class SAMLv2IDPAssertionProcessingViewBean method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        //retrieve the extended metadata values from the property sheet
        Map idpExtValues = getExtendedValues();
        Map new_idpExtValues = ps.getAttributeValues(model.getIDPEXAPDataMap(), false, model);
        idpExtValues.putAll(new_idpExtValues);
        //save the extended metadata values for the Idp
        model.setIDPExtAttributeValues(realm, entityName, idpExtValues, location);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.idp.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)

Example 48 with AMPropertySheet

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

the class SAMLv2IDPServicesViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
    ps.init();
    SAMLv2Model model = (SAMLv2Model) getModel();
    ps.setAttributeValues(getStandardValues(), model);
    //only metalias from ext
    try {
        setDisplayFieldValue(model.IDP_META_ALIAS, model.getMetaalias(realm, entityName, EntityModel.IDENTITY_PROVIDER));
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
}
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)

Example 49 with AMPropertySheet

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

the class SAMLv2IDPServicesViewBean 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 idpStdValues = ps.getAttributeValues(model.getStandardIdentityProviderAttributes(realm, entityName), false, model);
        //save the standard metadata values for the Idp
        model.setIDPStdAttributeValues(realm, entityName, idpStdValues);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.idp.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)

Example 50 with AMPropertySheet

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

the class SAMLv2PDPViewBean method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    retrieveCommonProperties();
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        // update standard metadata
        Map origStdMeta = model.getPDPDescriptor(realm, entityName);
        Map stdValues = ps.getAttributeValues(origStdMeta, false, model);
        model.updatePDPDescriptor(realm, entityName, stdValues);
        //update extended metadata
        Map origExtMeta = model.getPDPConfig(realm, entityName, location);
        Map extValues = ps.getAttributeValues(model.getXacmlPDPExtendedMetaMap(), false, model);
        origExtMeta.putAll(extValues);
        model.updatePDPConfig(realm, entityName, location, origExtMeta);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.entityDescriptor.provider.pdp.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) 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