Search in sources :

Example 11 with IDFFModel

use of com.sun.identity.console.federation.model.IDFFModel 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 12 with IDFFModel

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

the class IDFFSPViewBean method populateAuthenticationContext.

private void populateAuthenticationContext(String name, IDFFAuthContexts authContexts, int index) {
    if (index != 0) {
        tblAuthContextsModel.appendRow();
    }
    IDFFModel model = (IDFFModel) getModelInternal();
    tblAuthContextsModel.setValue(TBL_DATA_CONTEXT_REFERENCE, name);
    tblAuthContextsModel.setValue(TBL_DATA_LABEL, model.getLocalizedString(getAuthContextI18nKey(name)));
    IDFFAuthContexts.IDFFAuthContext c = null;
    if (authContexts != null) {
        c = authContexts.get(name);
    }
    if (c == null) {
        tblAuthContextsModel.setValue(TBL_DATA_SUPPORTED, "");
        tblAuthContextsModel.setValue(TBL_DATA_LEVEL, "0");
    } else {
        tblAuthContextsModel.setValue(TBL_DATA_SUPPORTED, c.supported);
        tblAuthContextsModel.setValue(TBL_DATA_LEVEL, c.level);
    }
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel)

Example 13 with IDFFModel

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

the class IDFFAffiliateViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    IDFFModel model = (IDFFModel) getModelInternal();
    String[] args = { entityName };
    String pageTitle = MessageFormat.format(model.getLocalizedString("idff.page.title.entityDescriptors.Affiliate"), args);
    setPageTitle(pageTitle);
    psModel.setValue(IDFFModel.ATTR_PROVIDER_TYPE, (String) getPageSessionAttribute(ENTITY_LOCATION));
    populateValue(entityName);
}
Also used : IDFFModel(com.sun.identity.console.federation.model.IDFFModel)

Example 14 with IDFFModel

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

the class IDFFGeneralViewBean method handleButton1Request.

/**
     * Handles save
     *
     * @param event Request invocation event
     */
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    retrieveCommonProperties();
    IDFFModel model = (IDFFModel) getModel();
    try {
        Map orig = model.getCommonAttributeValues(realm, entityName);
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTES);
        Map values = ps.getAttributeValues(orig, false, model);
        model.modifyEntityProfile(realm, entityName, values);
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "idff.entityDescriptor.provider.general.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)

Aggregations

IDFFModel (com.sun.identity.console.federation.model.IDFFModel)14 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)11 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)8 Map (java.util.Map)8 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)2 HashSet (java.util.HashSet)2 Set (java.util.Set)2 CCAddRemove (com.sun.web.ui.view.addremove.CCAddRemove)1