use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class RealmDiscoveryDescriptionEditViewBean method getCurrentData.
protected SMDescriptionData getCurrentData() {
int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PG_SESSION_DISCO_ENTRY_DATA);
return (SMDescriptionData) data.descData.get(currentIdx);
}
use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class UMUserResourceOfferingViewBeanBase method getValues.
protected SMDiscoEntryData getValues(boolean validated) throws AMConsoleException {
SMDiscoEntryData smDisco = super.getValues(validated);
smDisco.resourceIdAttribute = ((String) propertySheetModel.getValue(ATTR_RESOURCE_ID));
smDisco.resourceIdValue = ((String) propertySheetModel.getValue(ATTR_RESOURCE_ID_VALUE));
if (validated) {
if (smDisco.resourceIdValue.length() == 0) {
throw new AMConsoleException("discovery.service.bootstrapResOff.missing.resourceIdValue.message");
}
}
return smDisco;
}
use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class UMUserResourceOfferingViewBeanBase method handleTblSecurityMechIDButtonAddRequest.
public void handleTblSecurityMechIDButtonAddRequest(RequestInvocationEvent event) throws ModelControlException {
try {
SMDiscoEntryData smData = getValues(false);
setPageSessionAttribute(UMUserDiscoveryDescriptionViewBeanBase.PG_SESSION_DISCO_ENTRY_DATA, smData);
setPageSessionAttribute(UMUserDiscoveryDescriptionViewBeanBase.PG_SESSION_RETURN_VIEW_BEAN_CLASSNAME, getClass().getName());
UMUserDiscoveryDescriptionAddViewBean vb = (UMUserDiscoveryDescriptionAddViewBean) getViewBean(UMUserDiscoveryDescriptionAddViewBean.class);
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
} 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 UMUserDiscoveryDescriptionAddViewBean method handleButton1Request.
protected void handleButton1Request(SMDescriptionData smData) {
UMUserResourceOfferingViewBeanBase vb = (UMUserResourceOfferingViewBeanBase) getReturnToViewBean();
SMDiscoEntryData data = (SMDiscoEntryData) removePageSessionAttribute(PG_SESSION_DISCO_ENTRY_DATA);
data.descData.add(smData);
setPageSessionAttribute(UMUserResourceOfferingViewBeanBase.PROPERTY_ATTRIBUTE, data);
setPageSessionAttribute(UMUserResourceOfferingViewBeanBase.PG_SESSION_MODIFIED, "1");
passPgSessionMap(vb);
vb.forwardTo(getRequestContext());
}
use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.
the class UMUserResourceOfferingEditViewBean method getCurrentServiceData.
protected SMDiscoEntryData getCurrentServiceData() {
int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
DiscoveryDataCache cache = DiscoveryDataCache.getInstance();
String cacheID = (String) getPageSessionAttribute(UMUserResourceOfferingViewBean.DATA_ID);
SMDiscoveryServiceData smEntry = cache.getData(getModel().getUserSSOToken(), cacheID);
List resourceData = smEntry.getResourceData();
SMDiscoEntryData smDisco = (SMDiscoEntryData) resourceData.get(currentIdx);
if (getPageSessionAttribute(PGATTR_ORIG_MECH_ID) == null) {
ArrayList list = new ArrayList();
for (Iterator i = smDisco.descData.iterator(); i.hasNext(); ) {
list.add(new SMDescriptionData((SMDescriptionData) i.next()));
}
setPageSessionAttribute(PGATTR_ORIG_MECH_ID, list);
}
return smDisco;
}
Aggregations