Search in sources :

Example 1 with OptionsType

use of com.sun.identity.liberty.ws.disco.jaxb.OptionsType 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);
}
Also used : ServiceInstanceType(com.sun.identity.liberty.ws.disco.jaxb.ServiceInstanceType) DescriptionType(com.sun.identity.liberty.ws.disco.jaxb.DescriptionType) ResourceOfferingType(com.sun.identity.liberty.ws.disco.jaxb.ResourceOfferingType) Iterator(java.util.Iterator) ArrayList(java.util.ArrayList) List(java.util.List) ResourceIDType(com.sun.identity.liberty.ws.disco.jaxb.ResourceIDType) OptionsType(com.sun.identity.liberty.ws.disco.jaxb.OptionsType)

Aggregations

DescriptionType (com.sun.identity.liberty.ws.disco.jaxb.DescriptionType)1 OptionsType (com.sun.identity.liberty.ws.disco.jaxb.OptionsType)1 ResourceIDType (com.sun.identity.liberty.ws.disco.jaxb.ResourceIDType)1 ResourceOfferingType (com.sun.identity.liberty.ws.disco.jaxb.ResourceOfferingType)1 ServiceInstanceType (com.sun.identity.liberty.ws.disco.jaxb.ServiceInstanceType)1 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 List (java.util.List)1