use of com.sun.identity.console.sts.model.STSHomeViewBeanModel in project OpenAM by OpenRock.
the class STSHomeViewBean method setRestSTSInstanceNamesInTable.
private void setRestSTSInstanceNamesInTable() {
STSHomeViewBeanModel model = (STSHomeViewBeanModel) getModel();
try {
String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
populateRestSTSTableModel(model.getPublishedInstances(STSType.REST, curRealm));
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.identity.console.sts.model.STSHomeViewBeanModel in project OpenAM by OpenRock.
the class STSHomeViewBean method handleTblRestSTSInstancesButtonDeleteRequest.
public void handleTblRestSTSInstancesButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
CCActionTable table = (CCActionTable) getChild(TBL_REST_STS_INSTANCES);
table.restoreStateData();
Integer[] selected = tblModelRestSTSInstances.getSelectedRows();
Set<String> instanceNames = new HashSet<>(selected.length);
for (int i = 0; i < selected.length; i++) {
tblModelRestSTSInstances.setRowIndex(selected[i].intValue());
instanceNames.add((String) tblModelRestSTSInstances.getValue(TBL_REST_STS_INSTANCES_DATA_NAME));
}
try {
STSHomeViewBeanModel model = (STSHomeViewBeanModel) getModel();
model.deleteInstances(STSType.REST, instanceNames);
if (selected.length == 1) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "rest.sts.home.instance.deleted");
} else {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "rest.sts.home.instances.deleted");
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.sts.model.STSHomeViewBeanModel in project OpenAM by OpenRock.
the class STSHomeViewBean method setSoapSTSInstanceNamesInTable.
private void setSoapSTSInstanceNamesInTable() {
STSHomeViewBeanModel model = (STSHomeViewBeanModel) getModel();
try {
String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
populateSoapSTSTableModel(model.getPublishedInstances(STSType.SOAP, curRealm));
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
}
use of com.sun.identity.console.sts.model.STSHomeViewBeanModel in project OpenAM by OpenRock.
the class STSHomeViewBean method handleTblSoapSTSInstancesButtonDeleteRequest.
public void handleTblSoapSTSInstancesButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
CCActionTable table = (CCActionTable) getChild(TBL_SOAP_STS_INSTANCES);
table.restoreStateData();
Integer[] selected = tblModelSoapSTSInstances.getSelectedRows();
Set<String> instanceNames = new HashSet<>(selected.length);
for (int i = 0; i < selected.length; i++) {
tblModelSoapSTSInstances.setRowIndex(selected[i].intValue());
instanceNames.add((String) tblModelSoapSTSInstances.getValue(TBL_SOAP_STS_INSTANCES_DATA_NAME));
}
try {
STSHomeViewBeanModel model = (STSHomeViewBeanModel) getModel();
model.deleteInstances(STSType.SOAP, instanceNames);
if (selected.length == 1) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "rest.sts.home.instance.deleted");
} else {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "rest.sts.home.instances.deleted");
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
Aggregations