use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AuthConfigViewBean method getTableData.
private List getTableData() throws ModelControlException {
List entryList = new ArrayList();
CCActionTable table = (CCActionTable) getChild(AUTH_ENTRY_TABLE);
table.restoreStateData();
int size = entryTableModel.getNumRows();
for (int i = 0; i < size; i++) {
entryTableModel.setRowIndex(i);
String module = (String) entryTableModel.getValue(MODULE_NAME);
String flag = (String) entryTableModel.getValue(CRITERIA);
String option = (String) entryTableModel.getValue(OPTION_FIELD);
try {
AuthConfigurationEntry ae = new AuthConfigurationEntry(module, flag, option);
entryList.add(ae);
} catch (AMConfigurationException e) {
debug.warning("AuthConfigViewBean.getTableData() " + "Couldn't create the auth configuration entry", e);
}
}
return entryList;
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AuthConfigViewBean method createChild.
protected View createChild(String name) {
View view = null;
if (!tablePopulated) {
populateEntryTable();
}
if (name.equals(PGTITLE_THREE_BTNS)) {
view = new CCPageTitle(this, ptModel, name);
} else if (name.equals(PROPERTY_ATTRIBUTE)) {
view = new AMPropertySheet(this, propertySheetModel, name);
} else if (ptModel.isChildSupported(name)) {
view = ptModel.createChild(this, name);
} else if (name.equals(ACTION_TILED_VIEW)) {
view = new AuthActionTiledView(this, entryTableModel, name);
} else if (name.equals(AUTH_ENTRY_TABLE)) {
CCActionTable table = new CCActionTable(this, entryTableModel, name);
table.setTiledView((AuthActionTiledView) getChild(ACTION_TILED_VIEW));
view = table;
} else if (propertySheetModel.isChildSupported(name)) {
view = propertySheetModel.createChild(this, name, getModel());
} else {
view = super.createChild(name);
}
return view;
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class AbstractAuditViewBean method populateTableModel.
private void populateTableModel(List<SMSubConfig> subConfigs) {
CCActionTable tbl = (CCActionTable) getChild(TBL_SUB_CONFIG);
CCActionTableModel tblModel = (CCActionTableModel) tbl.getModel();
tblModel.clearAll();
if (CollectionUtils.isEmpty(subConfigs)) {
return;
}
SerializedField szCache = (SerializedField) getChild(SZ_CACHE);
List<SMSubConfig> cache = new ArrayList<>(subConfigs.size());
boolean firstEntry = true;
for (SMSubConfig conf : subConfigs) {
if (firstEntry) {
firstEntry = false;
} else {
tblModel.appendRow();
}
tblModel.setValue(TBL_SUB_CONFIG_DATA_NAME, conf.getName());
tblModel.setValue(TBL_SUB_CONFIG_HREF_NAME, conf.getName());
tblModel.setValue(TBL_SUB_CONFIG_DATA_TYPE, conf.getType());
cache.add(conf);
}
szCache.setValue(cache);
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class SAMLv2SPServicesViewBean method updateWithAssertionServiceVlues.
private List updateWithAssertionServiceVlues() throws ModelControlException {
List asconsServiceList = new ArrayList();
int num = 0;
SAMLv2Model model = (SAMLv2Model) getModel();
CCActionTable tbl = (CCActionTable) getChild(TBL_ASSERTION_CONSUMER_SERVICE);
tbl.restoreStateData();
try {
num = model.getAssertionConsumerServices(realm, entityName).size();
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
for (int i = 0; i < num; i++) {
tblAssertionConsumerModel.setLocation(i);
String isDefault = (String) tblAssertionConsumerModel.getValue(TBL_DATA_DEFAULT);
boolean theValue = Boolean.parseBoolean(isDefault);
String type = (String) tblAssertionConsumerModel.getValue(TBL_DATA_TYPE);
String binding = "urn:oasis:names:tc:SAML:2.0:bindings:" + type;
String location = (String) tblAssertionConsumerModel.getValue(TBL_DATA_LOCATION);
String index = (String) tblAssertionConsumerModel.getValue(TBL_DATA_INDEX);
AssertionConsumerServiceElement acsElem = null;
try {
acsElem = model.getAscObject();
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
acsElem.setBinding(binding);
acsElem.setIsDefault(theValue);
acsElem.setIndex(Integer.parseInt(index));
acsElem.setLocation(location);
asconsServiceList.add(acsElem);
}
return asconsServiceList;
}
use of com.sun.web.ui.view.table.CCActionTable in project OpenAM by OpenRock.
the class SAMLv2IDPAssertionContentViewBean method getAuthenticationContexts.
private SAMLv2AuthContexts getAuthenticationContexts() throws ModelControlException {
CCActionTable tbl = (CCActionTable) getChild(TBL_AUTHENTICATION_CONTEXTS);
tbl.restoreStateData();
SAMLv2AuthContexts authContexts = new SAMLv2AuthContexts();
String defaultAuthnContext = (String) getDisplayFieldValue(SAMLv2Model.IDP_AUTHN_CONTEXT_CLASS_REF_MAPPING_DEFAULT);
for (int i = 0; i < tblAuthContextsModel.getSize(); i++) {
tblAuthContextsModel.setLocation(i);
String name = (String) tblAuthContextsModel.getValue(TBL_DATA_CONTEXT_REFERENCE);
String supported = (String) tblAuthContextsModel.getValue(TBL_DATA_SUPPORTED);
String key = (String) tblAuthContextsModel.getValue(TBL_DATA_KEY);
String value = (String) tblAuthContextsModel.getValue(TBL_DATA_VALUE);
String level = (String) tblAuthContextsModel.getValue(TBL_DATA_LEVEL);
boolean isDefault = false;
if (name.equals(defaultAuthnContext)) {
isDefault = true;
supported = "true";
}
authContexts.put(name, supported, key, value, level, isDefault);
}
return authContexts;
}
Aggregations