use of com.sun.identity.liberty.ws.disco.jaxb.DescriptionType in project OpenAM by OpenRock.
the class SMDiscoveryServiceData method setDiscoEntryData.
private static void setDiscoEntryData(DiscoEntryElement entry, SMDiscoEntryData smDisco) {
ResourceOfferingType resOff = entry.getResourceOffering();
ResourceIDType resourceIdType = resOff.getResourceID();
ServiceInstanceType serviceInstance = resOff.getServiceInstance();
String providerID = serviceInstance.getProviderID();
String serviceType = serviceInstance.getServiceType();
smDisco.entryId = resOff.getEntryID();
smDisco.resourceIdAttribute = resourceIdType.getId();
smDisco.resourceIdValue = resourceIdType.getValue();
smDisco.serviceType = serviceType;
smDisco.providerId = providerID;
smDisco.abstractValue = resOff.getAbstract();
OptionsType optType = resOff.getOptions();
if (optType != null) {
smDisco.options = optType.getOption();
smDisco.noOption = false;
} else {
smDisco.noOption = true;
}
List list = serviceInstance.getDescription();
if (list != null && !list.isEmpty()) {
for (Iterator iter = list.iterator(); iter.hasNext(); ) {
SMDescriptionData smDesc = new SMDescriptionData();
DescriptionType desc = (DescriptionType) iter.next();
smDesc.setDescriptionEntry(desc);
smDisco.descData.add(smDesc);
}
} else {
debug.error("SMDiscoveryServiceData.setDiscoEntryData: " + "No description exists in the disco entry");
}
smDisco.directives = getDirectiveEntry(entry);
}
Aggregations