private static EnumSet<QueryOption> toQueryOptions(Attributes attrs) throws NamingException { Attribute relational = attrs.get("dcmRelationalQueries"); Attribute datetime = attrs.get("dcmCombinedDateTimeMatching"); Attribute fuzzy = attrs.get("dcmFuzzySemanticMatching"); Attribute timezone = attrs.get("dcmTimezoneQueryAdjustment"); if (relational == null && datetime == null && fuzzy == null && timezone == null) return null; EnumSet<QueryOption> opts = EnumSet.noneOf(QueryOption.class); if (LdapUtils.booleanValue(relational, false)) opts.add(QueryOption.RELATIONAL); if (LdapUtils.booleanValue(datetime, false)) opts.add(QueryOption.DATETIME); if (LdapUtils.booleanValue(fuzzy, false)) opts.add(QueryOption.FUZZY); if (LdapUtils.booleanValue(timezone, false)) opts.add(QueryOption.TIMEZONE); return opts ; }
private static EnumSet<QueryOption> toQueryOptions(Attributes attrs) throws NamingException { Attribute relational = attrs.get("dcmRelationalQueries"); Attribute datetime = attrs.get("dcmCombinedDateTimeMatching"); Attribute fuzzy = attrs.get("dcmFuzzySemanticMatching"); Attribute timezone = attrs.get("dcmTimezoneQueryAdjustment"); if (relational == null && datetime == null && fuzzy == null && timezone == null) return null; EnumSet<QueryOption> opts = EnumSet.noneOf(QueryOption.class); if (LdapUtils.booleanValue(relational, false)) opts.add(QueryOption.RELATIONAL); if (LdapUtils.booleanValue(datetime, false)) opts.add(QueryOption.DATETIME); if (LdapUtils.booleanValue(fuzzy, false)) opts.add(QueryOption.FUZZY); if (LdapUtils.booleanValue(timezone, false)) opts.add(QueryOption.TIMEZONE); return opts ; }
private void loadFrom(AuditRecordRepository arr, Attributes attrs) throws NamingException { arr.setInstalled( LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); }
private void loadFrom(AuditRecordRepository arr, Attributes attrs) throws NamingException { arr.setInstalled( LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); }
private BasicBulkDataDescriptor loadBulkDataDescriptor(SearchResult sr) throws NamingException { Attributes attrs = sr.getAttributes(); BasicBulkDataDescriptor descriptor = new BasicBulkDataDescriptor( LdapUtils.stringValue(attrs.get("dcmBulkDataDescriptorID"), null)); descriptor.excludeDefaults(LdapUtils.booleanValue(attrs.get("dcmBulkDataExcludeDefaults"), false)); descriptor.setAttributeSelectorsFromStrings(LdapUtils.stringArray(attrs.get("dcmAttributeSelector"))); descriptor.setLengthsThresholdsFromStrings(LdapUtils.stringArray(attrs.get("dcmBulkDataVRLengthThreshold"))); return descriptor ; }
private BasicBulkDataDescriptor loadBulkDataDescriptor(SearchResult sr) throws NamingException { Attributes attrs = sr.getAttributes(); BasicBulkDataDescriptor descriptor = new BasicBulkDataDescriptor( LdapUtils.stringValue(attrs.get("dcmBulkDataDescriptorID"), null)); descriptor.excludeDefaults(LdapUtils.booleanValue(attrs.get("dcmBulkDataExcludeDefaults"), false)); descriptor.setAttributeSelectorsFromStrings(LdapUtils.stringArray(attrs.get("dcmAttributeSelector"))); descriptor.setLengthsThresholdsFromStrings(LdapUtils.stringArray(attrs.get("dcmBulkDataVRLengthThreshold"))); return descriptor ; }
private void loadRetries(ProxyAEExtension proxyAEE, String aeDN) throws NamingException { NamingEnumeration<SearchResult> ne = config.search(aeDN, "(objectclass=dcmRetry)"); try { List<Retry> retries = new ArrayList<Retry>(); while (ne.hasMore()) { SearchResult sr = ne.next(); Attributes attrs = sr.getAttributes(); Retry retry = new Retry(RetryObject.valueOf(LdapUtils.stringValue(attrs.get("dcmRetryObject"), null)), LdapUtils.intValue(attrs.get("dcmRetryDelay"), 60), LdapUtils.intValue( attrs.get("dcmRetryNum"), 10), LdapUtils.booleanValue( attrs.get("dcmDeleteAfterFinalRetry"), false)); retries.add(retry); } proxyAEE.setRetries(retries); } finally { LdapUtils.safeClose(ne); } }
@Override protected void loadFrom(ApplicationEntity ae, Attributes attrs) throws NamingException { if (!LdapUtils.hasObjectClass(attrs, "dcmProxyNetworkAE")) return; ProxyAEExtension proxyAEE = new ProxyAEExtension(); ae.addAEExtension(proxyAEE); proxyAEE.setSpoolDirectory(LdapUtils.stringValue(attrs.get("dcmSpoolDirectory"), null)); proxyAEE.setAcceptDataOnFailedAssociation(LdapUtils.booleanValue(attrs.get("dcmAcceptDataOnFailedAssociation"), Boolean.FALSE)); proxyAEE.setEnableAuditLog(LdapUtils.booleanValue(attrs.get("dcmEnableAuditLog"), Boolean.FALSE)); proxyAEE.setProxyPIXConsumerApplication(LdapUtils.stringValue(attrs.get("hl7ProxyPIXConsumerApplication"), null)); proxyAEE.setRemotePIXManagerApplication(LdapUtils.stringValue(attrs.get("hl7RemotePIXManagerApplication"), null)); proxyAEE.setDeleteFailedDataWithoutRetryConfiguration(LdapUtils.booleanValue( attrs.get("dcmDeleteFailedDataWithoutRetryConfiguration"), Boolean.FALSE)); proxyAEE.setFallbackDestinationAET(LdapUtils.stringValue(attrs.get("dcmDestinationAETitle"), null)); proxyAEE.setMergeStgCmtMessagesUsingANDLogic(LdapUtils.booleanValue( attrs.get("dcmMergeStgCmtMessagesUsingANDLogic"), Boolean.FALSE)); }
private void loadFrom(WebApplication webapp, Attributes attrs) throws NamingException { webapp.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); webapp.setServicePath(LdapUtils.stringValue(attrs.get("dcmWebServicePath"), null)); webapp.setServiceClasses(LdapUtils.enumArray(WebApplication.ServiceClass.class, attrs.get("dcmWebServiceClass"))); webapp.setAETitle(LdapUtils.stringValue(attrs.get("dicomAETitle"), null)); webapp.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); webapp.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); }
private void loadFrom(HL7Application hl7app, Attributes attrs) throws NamingException { hl7app.setAcceptedSendingApplications(LdapUtils.stringArray(attrs.get("hl7AcceptedSendingApplication"))); hl7app.setOtherApplicationNames(LdapUtils.stringArray(attrs.get("hl7OtherApplicationName"))); hl7app.setAcceptedMessageTypes(LdapUtils.stringArray(attrs.get("hl7AcceptedMessageType"))); hl7app.setHL7DefaultCharacterSet(LdapUtils.stringValue(attrs.get("hl7DefaultCharacterSet"), "ASCII")); hl7app.setHL7SendingCharacterSet(LdapUtils.stringValue(attrs.get("hl7SendingCharacterSet"), "ASCII")); hl7app.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); hl7app.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); hl7app.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); for (LdapHL7ConfigurationExtension ext : extensions) ext.loadFrom(hl7app, attrs); }
private void loadFrom(WebApplication webapp, Attributes attrs) throws NamingException { webapp.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); webapp.setServicePath(LdapUtils.stringValue(attrs.get("dcmWebServicePath"), null)); webapp.setServiceClasses(LdapUtils.enumArray(WebApplication.ServiceClass.class, attrs.get("dcmWebServiceClass"))); webapp.setAETitle(LdapUtils.stringValue(attrs.get("dicomAETitle"), null)); webapp.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); webapp.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); }
private void loadFrom(HL7ApplicationInfo hl7AppInfo, Attributes attrs, String deviceName) throws NamingException, ConfigurationException { hl7AppInfo.setDeviceName(deviceName); hl7AppInfo.setHl7ApplicationName( LdapUtils.stringValue(attrs.get("hl7ApplicationName"), null)); hl7AppInfo.setHl7OtherApplicationName( LdapUtils.stringArray(attrs.get("hl7OtherApplicationName"))); hl7AppInfo.setDescription( LdapUtils.stringValue(attrs.get("dicomDescription"), null)); hl7AppInfo.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); hl7AppInfo.setInstalled( LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); for (String connDN : LdapUtils.stringArray(attrs.get("dicomNetworkConnectionReference"))) hl7AppInfo.getConnections().add(config.findConnection(connDN)); }
private void loadFrom(ApplicationEntityInfo aetInfo, Attributes attrs, String deviceName) throws NamingException { aetInfo.setDeviceName(deviceName); aetInfo.setAETitle( LdapUtils.stringValue(attrs.get("dicomAETitle"), null)); aetInfo.setOtherAETitle( LdapUtils.stringArray(attrs.get("dcmOtherAETitle"))); aetInfo.setDescription( LdapUtils.stringValue(attrs.get("dicomDescription"), null)); aetInfo.setAssociationInitiator( LdapUtils.booleanValue(attrs.get("dicomAssociationInitiator"), true)); aetInfo.setAssociationAcceptor( LdapUtils.booleanValue(attrs.get("dicomAssociationAcceptor"), true)); aetInfo.setInstalled( LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); aetInfo.setApplicationClusters( LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); aetInfo.setHl7ApplicationName( LdapUtils.stringValue(attrs.get("hl7ApplicationName"), null)); for (String connDN : LdapUtils.stringArray(attrs.get("dicomNetworkConnectionReference"))) aetInfo.getConnections().add(findConnection(connDN)); }
private void loadFrom(WebApplicationInfo webappInfo, Attributes attrs, String deviceName) throws NamingException { webappInfo.setDeviceName(deviceName); webappInfo.setApplicationName(LdapUtils.stringValue(attrs.get("dcmWebAppName"), null)); webappInfo.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); webappInfo.setServicePath(LdapUtils.stringValue(attrs.get("dcmWebServicePath"), null)); webappInfo.setServiceClasses(LdapUtils.enumArray(WebApplication.ServiceClass.class, attrs.get("dcmWebServiceClass"))); webappInfo.setAETitle(LdapUtils.stringValue(attrs.get("dicomAETitle"), null)); webappInfo.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); webappInfo.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); for (String connDN : LdapUtils.stringArray(attrs.get("dicomNetworkConnectionReference"))) webappInfo.getConnections().add(findConnection(connDN)); }
private void loadFrom(WebApplicationInfo webappInfo, Attributes attrs, String deviceName) throws NamingException { webappInfo.setDeviceName(deviceName); webappInfo.setApplicationName(LdapUtils.stringValue(attrs.get("dcmWebAppName"), null)); webappInfo.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); webappInfo.setServicePath(LdapUtils.stringValue(attrs.get("dcmWebServicePath"), null)); webappInfo.setServiceClasses(LdapUtils.enumArray(WebApplication.ServiceClass.class, attrs.get("dcmWebServiceClass"))); webappInfo.setAETitle(LdapUtils.stringValue(attrs.get("dicomAETitle"), null)); webappInfo.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); webappInfo.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); for (String connDN : LdapUtils.stringArray(attrs.get("dicomNetworkConnectionReference"))) webappInfo.getConnections().add(findConnection(connDN)); }
private void loadForwardOptions(ProxyAEExtension proxyAEE, String aeDN) throws NamingException { NamingEnumeration<SearchResult> ne = config.search(aeDN, "(objectclass=dcmForwardOption)"); try { HashMap<String, ForwardOption> fwdOptions = new HashMap<String, ForwardOption>(); while (ne.hasMore()) { SearchResult sr = ne.next(); Attributes attrs = sr.getAttributes(); ForwardOption fwdOption = new ForwardOption(); fwdOption.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); fwdOption.setConvertEmf2Sf(LdapUtils.booleanValue(attrs.get("dcmConvertEmf2Sf"), false)); Schedule schedule = new Schedule(); schedule.setDays(LdapUtils.stringValue(attrs.get("dcmScheduleDays"), null)); schedule.setHours(LdapUtils.stringValue(attrs.get("dcmScheduleHours"), null)); fwdOption.setSchedule(schedule); fwdOptions.put(LdapUtils.stringValue(attrs.get("dcmDestinationAETitle"), null), fwdOption); } proxyAEE.setForwardOptions(fwdOptions); } finally { LdapUtils.safeClose(ne); } }
private void loadFrom(ApplicationEntity ae, Attributes attrs) throws NamingException { ae.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); ae.setVendorData(byteArrays(attrs.get("dicomVendorData"))); ae.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); ae.setPreferredCallingAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCallingAETitle"))); ae.setPreferredCalledAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCalledAETitle"))); ae.setAssociationInitiator(LdapUtils.booleanValue(attrs.get("dicomAssociationInitiator"), false)); ae.setAssociationAcceptor(LdapUtils.booleanValue(attrs.get("dicomAssociationAcceptor"), false)); ae.setSupportedCharacterSets(LdapUtils.stringArray(attrs.get("dicomSupportedCharacterSet"))); ae.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); if (!LdapUtils.hasObjectClass(attrs, "dcmNetworkAE")) return; ae.setAcceptedCallingAETitles(LdapUtils.stringArray(attrs.get("dcmAcceptedCallingAETitle"))); ae.setPreferredTransferSyntaxes(LdapUtils.removeOrdinalPrefix( LdapUtils.stringArray(attrs.get("dcmPreferredTransferSyntax")))); ae.setOtherAETitles(LdapUtils.stringArray(attrs.get("dcmOtherAETitle"))); ae.setMasqueradeCallingAETitles(LdapUtils.stringArray(attrs.get("dcmMasqueradeCallingAETitle"))); ae.setHl7ApplicationName(LdapUtils.stringValue(attrs.get("hl7ApplicationName"), null)); for (LdapDicomConfigurationExtension ext : extensions) ext.loadFrom(ae, attrs); }
private void loadFrom(ApplicationEntity ae, Attributes attrs) throws NamingException { ae.setDescription(LdapUtils.stringValue(attrs.get("dicomDescription"), null)); ae.setVendorData(byteArrays(attrs.get("dicomVendorData"))); ae.setApplicationClusters(LdapUtils.stringArray(attrs.get("dicomApplicationCluster"))); ae.setPreferredCallingAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCallingAETitle"))); ae.setPreferredCalledAETitles(LdapUtils.stringArray(attrs.get("dicomPreferredCalledAETitle"))); ae.setAssociationInitiator(LdapUtils.booleanValue(attrs.get("dicomAssociationInitiator"), false)); ae.setAssociationAcceptor(LdapUtils.booleanValue(attrs.get("dicomAssociationAcceptor"), false)); ae.setSupportedCharacterSets(LdapUtils.stringArray(attrs.get("dicomSupportedCharacterSet"))); ae.setInstalled(LdapUtils.booleanValue(attrs.get("dicomInstalled"), null)); if (!LdapUtils.hasObjectClass(attrs, "dcmNetworkAE")) return; ae.setAcceptedCallingAETitles(LdapUtils.stringArray(attrs.get("dcmAcceptedCallingAETitle"))); ae.setPreferredTransferSyntaxes(LdapUtils.removeOrdinalPrefix( LdapUtils.stringArray(attrs.get("dcmPreferredTransferSyntax")))); ae.setOtherAETitles(LdapUtils.stringArray(attrs.get("dcmOtherAETitle"))); ae.setMasqueradeCallingAETitles(LdapUtils.stringArray(attrs.get("dcmMasqueradeCallingAETitle"))); ae.setHl7ApplicationName(LdapUtils.stringValue(attrs.get("hl7ApplicationName"), null)); for (LdapDicomConfigurationExtension ext : extensions) ext.loadFrom(ae, attrs); }
private void loadFrom(DeviceInfo deviceInfo, Attributes attrs) throws NamingException { deviceInfo.setDeviceName( LdapUtils.stringValue(attrs.get("dicomDeviceName"), null)); deviceInfo.setDescription( LdapUtils.stringValue(attrs.get("dicomDescription"), null)); deviceInfo.setManufacturer( LdapUtils.stringValue(attrs.get("dicomManufacturer"), null)); deviceInfo.setManufacturerModelName( LdapUtils.stringValue(attrs.get("dicomManufacturerModelName"), null)); deviceInfo.setSoftwareVersions( LdapUtils.stringArray(attrs.get("dicomSoftwareVersion"))); deviceInfo.setStationName( LdapUtils.stringValue(attrs.get("dicomStationName"), null)); deviceInfo.setInstitutionNames( LdapUtils.stringArray(attrs.get("dicomInstitutionName"))); deviceInfo.setInstitutionalDepartmentNames( LdapUtils.stringArray(attrs.get("dicomInstitutionDepartmentName"))); deviceInfo.setPrimaryDeviceTypes( LdapUtils.stringArray(attrs.get("dicomPrimaryDeviceType"))); deviceInfo.setInstalled( LdapUtils.booleanValue(attrs.get("dicomInstalled"), true)); deviceInfo.setArcDevExt(LdapUtils.hasObjectClass(attrs, "dcmArchiveDevice")); }
private void loadFrom(DeviceInfo deviceInfo, Attributes attrs) throws NamingException { deviceInfo.setDeviceName( LdapUtils.stringValue(attrs.get("dicomDeviceName"), null)); deviceInfo.setDescription( LdapUtils.stringValue(attrs.get("dicomDescription"), null)); deviceInfo.setManufacturer( LdapUtils.stringValue(attrs.get("dicomManufacturer"), null)); deviceInfo.setManufacturerModelName( LdapUtils.stringValue(attrs.get("dicomManufacturerModelName"), null)); deviceInfo.setSoftwareVersions( LdapUtils.stringArray(attrs.get("dicomSoftwareVersion"))); deviceInfo.setStationName( LdapUtils.stringValue(attrs.get("dicomStationName"), null)); deviceInfo.setInstitutionNames( LdapUtils.stringArray(attrs.get("dicomInstitutionName"))); deviceInfo.setInstitutionalDepartmentNames( LdapUtils.stringArray(attrs.get("dicomInstitutionDepartmentName"))); deviceInfo.setPrimaryDeviceTypes( LdapUtils.stringArray(attrs.get("dicomPrimaryDeviceType"))); deviceInfo.setInstalled( LdapUtils.booleanValue(attrs.get("dicomInstalled"), true)); deviceInfo.setArcDevExt(LdapUtils.hasObjectClass(attrs, "dcmArchiveDevice")); }