use of com.sun.identity.console.service.model.SMDiscoveryServiceModel in project OpenAM by OpenRock.
the class SMDiscoveryServiceViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
resetButtonState(TBL_BOOTSTRAP_RES_OFF_DELETE_BTN);
resetButtonState(TBL_PROVIDER_RESOURCEID_MAPPER_DELETE_BTN);
if (!tablePopulated) {
if (!isSubmitCycle()) {
SMDiscoveryServiceModel model = (SMDiscoveryServiceModel) getModel();
if (model != null) {
populateProviderResourceIdMapperTable(model.getProviderResourceIdMapper());
Set resoff = new OrderedSet();
resoff.addAll(model.getDiscoEntry(false));
populateBootstrapResOffTable(resoff);
}
}
}
if (!isInlineAlertMessageSet()) {
String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
if ((flag != null) && flag.equals("1")) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
}
}
}
use of com.sun.identity.console.service.model.SMDiscoveryServiceModel in project OpenAM by OpenRock.
the class SMDiscoveryServiceViewBean method handleUserOperationRequest.
private void handleUserOperationRequest(String realm, String univId, RequestContext rc) {
HttpServletRequest req = rc.getRequest();
SMDiscoveryServiceModel model = (SMDiscoveryServiceModel) getModel();
try {
AMIdentity amid = IdUtils.getIdentity(model.getUserSSOToken(), univId);
if (amid.getType().getName().equalsIgnoreCase("user")) {
UMUserResourceOfferingViewBean vb = (UMUserResourceOfferingViewBean) getViewBean(UMUserResourceOfferingViewBean.class);
vb.unlockPageTrail();
vb.setPageSessionAttribute(EntityEditViewBean.UNIVERSAL_ID, univId);
vb.setPageSessionAttribute(EntityEditViewBean.ENTITY_TYPE, "user");
vb.setPageSessionAttribute(UMUserResourceOfferingViewBean.SERVICE_NAME, AMAdminConstants.DISCOVERY_SERVICE);
vb.setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, req.getParameter("realm"));
vb.setPageSessionAttribute(PG_SESSION_PAGE_TRAIL_ID, req.getParameter(PG_SESSION_PAGE_TRAIL_ID));
vb.forwardTo(rc);
} else {
handleEntityOperationRequest(req.getParameter("realm"), univId, rc);
}
} catch (IdRepoException e) {
setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", model.getErrorString(e));
super.forwardTo(rc);
}
}
Aggregations