use of com.sun.identity.console.base.AMPropertySheet in project OpenAM by OpenRock.
the class SAMLv2AttrQueryViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTIES);
ps.init();
SAMLv2Model model = (SAMLv2Model) getModel();
ps.setAttributeValues(getStandardAttrQueryValues(), model);
ps.setAttributeValues(getExtendedAttrQueryValues(), model);
}
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();
}
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;
}
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;
}
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");
}
}
}
Aggregations