Search in sources :

Example 36 with AMConsoleException

use of com.sun.identity.console.base.model.AMConsoleException 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 37 with AMConsoleException

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

Example 38 with AMConsoleException

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

the class SAMLv2AttrQueryViewBean method getExtendedAttrQueryValues.

private Map getExtendedAttrQueryValues() {
    Map extendedValues = new HashMap();
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        Map attr = model.getExtendedAttrQueryAttributes(realm, entityName);
        Set entries = attr.entrySet();
        Iterator iterator = entries.iterator();
        while (iterator.hasNext()) {
            Map.Entry entry = (Map.Entry) iterator.next();
            extendedValues.put((String) entry.getKey(), convertListToSet((List) entry.getValue()));
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return extendedValues;
}
Also used : Set(java.util.Set) HashMap(java.util.HashMap) Iterator(java.util.Iterator) List(java.util.List) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Example 39 with AMConsoleException

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

the class SAMLv2AttrQueryViewBean 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 attrQueryValues = ps.getAttributeValues(model.getStandardAttrQueryAttributes(realm, entityName), false, model);
        //save the standard metadata values for attribute authority
        model.setStdAttributeQueryValues(realm, entityName, attrQueryValues);
        //retrieve the extended metadata values from the property sheet
        Map attrQueryExtValues = ps.getAttributeValues(model.getattrQueryEXDataMap(), false, model);
        //save the extended metadata values for attribute authority
        model.setExtAttributeQueryValues(realm, entityName, attrQueryExtValues, location);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.attrquery.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 40 with AMConsoleException

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

the class SAMLv2AffiliateViewBean method getStandardAffiliationValues.

private Map getStandardAffiliationValues() {
    Map map = new HashMap();
    try {
        SAMLv2Model model = (SAMLv2Model) getModel();
        map = model.getStandardAffiliationAttributes(realm, entityName);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return map;
}
Also used : HashMap(java.util.HashMap) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map) SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Aggregations

AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)701 Map (java.util.Map)255 Set (java.util.Set)206 HashMap (java.util.HashMap)193 HashSet (java.util.HashSet)148 SSOException (com.iplanet.sso.SSOException)126 Iterator (java.util.Iterator)122 List (java.util.List)97 SMSException (com.sun.identity.sm.SMSException)83 ArrayList (java.util.ArrayList)78 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)76 IdRepoException (com.sun.identity.idm.IdRepoException)58 SAML2MetaException (com.sun.identity.saml2.meta.SAML2MetaException)47 SAML2MetaManager (com.sun.identity.saml2.meta.SAML2MetaManager)46 AMIdentity (com.sun.identity.idm.AMIdentity)44 SAMLv2Model (com.sun.identity.console.federation.model.SAMLv2Model)41 NameNotFoundException (com.sun.identity.policy.NameNotFoundException)41 CCActionTable (com.sun.web.ui.view.table.CCActionTable)40 TreeSet (java.util.TreeSet)39 CachedPolicy (com.sun.identity.console.policy.model.CachedPolicy)38