Search in sources :

Example 21 with AMPropertySheet

use of com.sun.identity.console.base.AMPropertySheet 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 22 with AMPropertySheet

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

the class SessionPropertyOpViewBeanBase method getValues.

protected Map getValues() throws ModelControlException, AMConsoleException {
    AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
    Map values = ps.getAttributeValues(ATTRIBUTE_NAMES);
    String name = null;
    Set setName = (Set) values.get(ATTR_NAME);
    if ((setName != null) && !setName.isEmpty()) {
        name = (String) setName.iterator().next();
        name = name.trim();
        if (name.length() == 0) {
            name = null;
        }
    }
    if (name == null) {
        throw new AMConsoleException("policy.condition.missing.session.property.name.message");
    }
    if (name.equals(SessionPropertyCondition.VALUE_CASE_INSENSITIVE)) {
        throw new AMConsoleException("policy.condition.session.property.reserved.name.message");
    }
    Set propertyValues = (Set) values.get(ATTR_VALUES);
    if ((propertyValues == null) || propertyValues.isEmpty()) {
        throw new AMConsoleException("policy.condition.missing.session.property.message");
    }
    Map map = new HashMap(4);
    map.put(ATTR_NAME, name);
    map.put(ATTR_VALUES, propertyValues);
    return map;
}
Also used : Set(java.util.Set) HashSet(java.util.HashSet) HashMap(java.util.HashMap) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 23 with AMPropertySheet

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

the class GenericAgentProfileViewBean method getFormValues.

protected Map getFormValues() throws AMConsoleException, ModelControlException {
    AMPropertySheet prop = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
    Map values = prop.getAttributeValues(getPropertyNames());
    addAgentRootURLKey(values);
    return values;
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) Map(java.util.Map)

Example 24 with AMPropertySheet

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

the class AbstractEventHandlerAddViewBean method beginDisplay.

@Override
public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    AbstractAuditModel model = (AbstractAuditModel) getModel();
    String schemaName = (String) getPageSessionAttribute(AUDIT_HANDLER_TYPE);
    if (!submitCycle) {
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
        propertySheetModel.clear();
        try {
            ps.setAttributeValues(model.getEventHandlerDefaultValues(schemaName), model);
        } catch (AMConsoleException a) {
            setInlineAlertMessage(CCAlert.TYPE_WARNING, "message.warning", "noproperties.message");
        }
    }
}
Also used : AbstractAuditModel(com.sun.identity.console.audit.model.AbstractAuditModel) AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 25 with AMPropertySheet

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

the class FederationViewBean method createChild.

protected View createChild(String name) {
    if (!tablePopulated) {
        populateCOTTable();
        populateEntityTable();
        populateSAMLTable();
    }
    View view = null;
    if (name.equals(PROPERTY_ATTRIBUTE)) {
        view = new AMPropertySheet(this, propertySheetModel, name);
    } else if (propertySheetModel.isChildSupported(name)) {
        view = propertySheetModel.createChild(this, name, getModel());
    } else {
        view = super.createChild(name);
    }
    return view;
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) View(com.iplanet.jato.view.View)

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