use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffViewBeanBase method handleButton1Request.
public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
try {
SMDiscoEntryData smData = getValues(true);
handleButton1Request(smData);
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
forwardTo();
}
}
use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffViewBeanBase method handleTblSecurityMechIDButtonDeleteRequest.
/**
* Handles remove security mechanism ID request.
*
* @param event Request Invocation Event.
*/
public void handleTblSecurityMechIDButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
try {
SMDiscoEntryData smData = getValues(false);
CCActionTable table = (CCActionTable) getChild(ATTRIBUTE_NAME_SECURITY_MECH_ID);
table.restoreStateData();
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(ATTRIBUTE_NAME_SECURITY_MECH_ID);
Integer[] selected = tblModel.getSelectedRows();
if ((selected != null) && (selected.length > 0)) {
for (int i = selected.length - 1; i >= 0; --i) {
Integer index = selected[i];
smData.descData.remove(index.intValue());
}
setValues(smData, getModel());
populateDescriptionsTable(smData.descData);
}
} catch (AMConsoleException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
}
forwardTo();
}
use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class EntityResourceOfferingAddViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PROPERTY_ATTRIBUTE);
if (data != null) {
populateDirectiveMechIDRefs(data);
}
}
use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class EntityResourceOfferingEditViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (populateValues) {
SMDiscoEntryData data = getCurrentServiceData();
setValues(data);
} else {
SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PROPERTY_ATTRIBUTE);
if (data != null) {
populateDirectiveMechIDRefs(data);
}
}
}
use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class EntityResourceOfferingViewBean method populateTableModel.
private void populateTableModel(SMDiscoveryServiceData data) {
tblModel.clearAll();
if (data != null) {
int counter = 0;
EntityResourceOfferingModel model = (EntityResourceOfferingModel) getModel();
for (Iterator i = data.getResourceData().iterator(); i.hasNext(); counter++) {
if (counter > 0) {
tblModel.appendRow();
}
SMDiscoEntryData entry = (SMDiscoEntryData) i.next();
tblModel.setValue(TBL_DATA_SERVICE_TYPE, entry.serviceType);
tblModel.setValue(TBL_DATA_ABSTRACT, entry.abstractValue);
tblModel.setValue(TBL_DATA_ACTION_HREF, Integer.toString(counter));
}
DiscoveryDataCache cache = DiscoveryDataCache.getInstance();
String id = cache.cacheData(model.getUserSSOToken(), data);
setPageSessionAttribute(DATA_ID, id);
}
}
Aggregations