Search in sources :

Example 51 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2PEPViewBean method populateValue.

private void populateValue() {
    SAMLv2Model model = (SAMLv2Model) getModelInternal();
    try {
        Map values = model.getPEPDescriptor(realm, entityName);
        values.putAll(model.getPEPConfig(realm, entityName, location));
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        ps.setAttributeValues(values, model);
    } 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) Map(java.util.Map)

Example 52 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2PEPViewBean 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.getPEPDescriptor(realm, entityName);
        Map stdValues = ps.getAttributeValues(origStdMeta, false, model);
        model.updatePEPDescriptor(realm, entityName, stdValues);
        //update extended metadata
        Map origExtMeta = model.getPEPConfig(realm, entityName, location);
        Map extValues = ps.getAttributeValues(model.getXacmlPEPExtendedMetaMap(), false, model);
        origExtMeta.putAll(extValues);
        model.updatePEPConfig(realm, entityName, location, origExtMeta);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "samlv2.entityDescriptor.provider.pep.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 53 with SAMLv2Model

use of com.sun.identity.console.federation.model.SAMLv2Model in project OpenAM by OpenRock.

the class SAMLv2GeneralViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    SAMLv2Model samlModel = (SAMLv2Model) getModel();
    super.beginDisplay(event);
    setDisplayFieldValue(samlModel.TF_NAME, entityName);
}
Also used : SAMLv2Model(com.sun.identity.console.federation.model.SAMLv2Model)

Aggregations

SAMLv2Model (com.sun.identity.console.federation.model.SAMLv2Model)53 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)41 Map (java.util.Map)33 HashMap (java.util.HashMap)29 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)28 List (java.util.List)14 Set (java.util.Set)11 Iterator (java.util.Iterator)9 ArrayList (java.util.ArrayList)7 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)3 HashSet (java.util.HashSet)3 AssertionConsumerServiceElement (com.sun.identity.saml2.jaxb.metadata.AssertionConsumerServiceElement)2 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)1 EncodeAction (com.sun.identity.security.EncodeAction)1 CCAddRemove (com.sun.web.ui.view.addremove.CCAddRemove)1 CCActionTable (com.sun.web.ui.view.table.CCActionTable)1