use of com.sun.identity.console.service.model.SubConfigModel in project OpenAM by OpenRock.
the class SubConfigAddViewBean method createPropertyModel.
private void createPropertyModel() {
try {
String schemaName = (String) getPageSessionAttribute(AMServiceProfile.PG_SESSION_SUB_SCHEMA_NAME);
SubConfigModel model = (SubConfigModel) getModel();
propertySheetModel = new AMPropertySheetModel(model.getAddConfigPropertyXML(schemaName));
propertySheetModel.clear();
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.identity.console.service.model.SubConfigModel in project OpenAM by OpenRock.
the class SubConfigEditViewBean method handleTblSubConfigButtonDeleteRequest.
/**
* Deletes sub configuration.
*
* @param event Request Invocation Event.
* @throws ModelControlException if table model cannot be restored.
*/
public void handleTblSubConfigButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
submitCycle = true;
CCActionTable tbl = (CCActionTable) getChild(AMPropertySheetModel.TBL_SUB_CONFIG);
tbl.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) tbl.getModel();
Integer[] selected = tblModel.getSelectedRows();
SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
List list = (List) szCache.getSerializedObj();
Set names = new HashSet(selected.length * 2);
for (int i = 0; i < selected.length; i++) {
SMSubConfig sc = (SMSubConfig) list.get(selected[i].intValue());
names.add(sc.getName());
}
try {
SubConfigModel model = (SubConfigModel) getModel();
model.deleteSubConfigurations(names);
if (selected.length == 1) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "subconfig.message.deleted");
} else {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "subconfig.message.deleted.pural");
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
submitCycle = false;
forwardTo();
}
use of com.sun.identity.console.service.model.SubConfigModel in project OpenAM by OpenRock.
the class SubConfigEditViewBean method handleButton1Request.
/**
* Handles next button request.
*
* @param event Request invocation event.
*/
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
submitCycle = true;
SubConfigModel model = (SubConfigModel) getModel();
AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
try {
Map orig = model.getSubConfigAttributeValues();
Map values = ps.getAttributeValues(orig, true, true, model);
model.setSubConfigAttributeValues(values);
backToProfileViewBean();
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
forwardTo();
}
}
Aggregations