Package org.dcm4che3.net.audit

Examples of org.dcm4che3.net.audit.AuditLogger$UDPConnection


    private static void configureTransferCapability(ApplicationEntity ae,
            CommandLine cl) throws IOException {
        if (cl.hasOption("accept-unknown")) {
            ae.addTransferCapability(
                    new TransferCapability(null,
                            "*",
                            TransferCapability.Role.SCP,
                            "*"));
        } else {
            Properties p = CLIUtils.loadProperties(
                    cl.getOptionValue("sop-classes",
                            "resource:sop-classes.properties"),
                    null);
            for (String cuid : p.stringPropertyNames()) {
                String ts = p.getProperty(cuid);
                TransferCapability tc = new TransferCapability(null,
                        CLIUtils.toUID(cuid),
                        TransferCapability.Role.SCP,
                        CLIUtils.toUIDs(ts));
                ae.addTransferCapability(tc);
            }
View Full Code Here


        rq.addPresentationContext(
                new PresentationContext(2,
                        UID.StorageCommitmentPushModelSOPClass,
                        tss));
        ae.addTransferCapability(
                new TransferCapability(null,
                        UID.VerificationSOPClass,
                        TransferCapability.Role.SCP,
                        UID.ImplicitVRLittleEndian));
        ae.addTransferCapability(
                new TransferCapability(null,
                        UID.StorageCommitmentPushModelSOPClass,
                        TransferCapability.Role.SCU,
                        tss));
    }
View Full Code Here

    private static final Logger LOG = LoggerFactory.getLogger(
            PreferencesAuditLoggerConfiguration.class);

    @Override
    protected void storeChilds(Device device, Preferences deviceNode) {
        AuditLogger logger =
                device.getDeviceExtension(AuditLogger.class);
        if (logger != null)
            storeTo(logger, deviceNode.node("dcmAuditLogger"));
    }
View Full Code Here

        if (!deviceNode.nodeExists("dcmAuditLogger"))
            return;
       
        List<Connection> devConns = device.listConnections();
        Preferences loggerNode = deviceNode.node("dcmAuditLogger");
        AuditLogger logger = new AuditLogger();
        loadFrom(logger, loggerNode);
        int n = loggerNode.getInt("dicomNetworkConnectionReference.#", 0);
        for (int i = 0; i < n; i++) {
            logger.addConnection(devConns.get(
                    loggerNode.getInt("dicomNetworkConnectionReference." + (i+1), 0) - 1));
        }
        String arrDeviceRef =
                loggerNode.get("dcmAuditRecordRepositoryDeviceReference", null);
        if (arrDeviceRef == null)
            throw new ConfigurationException("Missing dcmAuditRecordRepositoryDeviceReference");

        logger.setAuditRecordRepositoryDevice(
                arrDeviceRef.equals(config.deviceRef(device.getDeviceName()))
                    ? device
                    : loadAuditRecordRepository(arrDeviceRef));
        loadAuditSuppressCriteria(logger, loggerNode);
        device.addDeviceExtension(logger);
View Full Code Here

    }

    @Override
    protected void mergeChilds(Device prev, Device device, Preferences deviceNode)
            throws BackingStoreException {
        AuditLogger prevLogger =
                prev.getDeviceExtension(AuditLogger.class);
        AuditLogger logger =
                device.getDeviceExtension(AuditLogger.class);
        if (logger == null && prevLogger == null)
            return;
       
        Preferences arrNode = deviceNode.node("dcmAuditLogger");
View Full Code Here

        arr.addConnection(tls);
    }

    private void addAuditLogger(Device device, Connection udp, Connection tls,
            Device arrDevice) {
        AuditLogger logger = new AuditLogger();
        device.addDeviceExtension(logger);
        logger.addConnection(udp);
        logger.addConnection(tls);
        logger.setAuditRecordRepositoryDevice(arrDevice);
        logger.setSchemaURI(AuditMessages.SCHEMA_URI);
        logger.setMessageID("MessageID");
        logger.setApplicationName("ApplicationName");
        logger.setAuditEnterpriseSiteID("AuditEnterpriseSiteID");
        logger.setAuditSourceID("AuditSourceID");
        logger.setAuditSourceTypeCodes("4", "5");
        logger.setEncoding("ISO-8859-1");
        logger.setFacility(AuditLogger.Facility.auth);
        logger.setSuccessSeverity(AuditLogger.Severity.info);
        logger.setMinorFailureSeverity(AuditLogger.Severity.notice);
        logger.setSeriousFailureSeverity(AuditLogger.Severity.warning);
        logger.setMajorFailureSeverity(AuditLogger.Severity.err);
        logger.setFormatXML(true);
        logger.setIncludeBOM(false);
        logger.setRetryInterval(300);
        logger.setSpoolDirectory(SPOOL_DIRECTORY);
        logger.setIncludeInstanceUID(true);
        logger.addAuditSuppressCriteria(createAuditSuppressCriteria());
    }
View Full Code Here

        criteria.setUserIsRequestor(true);
        return criteria;
    }

    private void validate(Device device) {
        AuditLogger logger = device.getDeviceExtension(AuditLogger.class);
        assertNotNull(logger);
        assertEquals(2, logger.getConnections().size());
        assertEquals(AuditMessages.SCHEMA_URI, logger.getSchemaURI());
        assertEquals("MessageID", logger.getMessageID());
        assertEquals("ApplicationName", logger.getApplicationName());
        assertEquals("AuditEnterpriseSiteID", logger.getAuditEnterpriseSiteID());
        assertEquals("AuditSourceID", logger.getAuditSourceID());
        assertArrayEquals(new String[]{"4", "5"}, sort(logger.getAuditSourceTypeCodes()));
        assertEquals("ISO-8859-1", logger.getEncoding());
        assertEquals(AuditLogger.Facility.auth, logger.getFacility());
        assertEquals(AuditLogger.Severity.info, logger.getSuccessSeverity());
        assertEquals(AuditLogger.Severity.notice, logger.getMinorFailureSeverity());
        assertEquals(AuditLogger.Severity.warning, logger.getSeriousFailureSeverity());
        assertEquals(AuditLogger.Severity.err, logger.getMajorFailureSeverity());
        assertTrue(logger.isFormatXML());
        assertFalse(logger.isIncludeBOM());
        assertEquals(300, logger.getRetryInterval());
        assertEquals(SPOOL_DIRECTORY, logger.getSpoolDirectory());
        assertTrue(logger.isIncludeInstanceUID());
        validate(logger.getAuditSuppressCriteriaList());
        Device arrDevice = logger.getAuditRecordRepositoryDevice();
        assertNotNull(arrDevice);
        AuditRecordRepository arr = arrDevice.getDeviceExtension(AuditRecordRepository.class);
        assertNotNull(arr);
        assertEquals(2, arr.getConnections().size());
    }
View Full Code Here

        arr.addConnection(tls);
    }

    private void addAuditLogger(Device device, Connection udp, Connection tls,
            Device arrDevice) {
        AuditLogger logger = new AuditLogger();
        device.addDeviceExtension(logger);
        logger.addConnection(udp);
        logger.addConnection(tls);
        logger.setAuditRecordRepositoryDevice(arrDevice);
        logger.setSchemaURI(AuditMessages.SCHEMA_URI);
        logger.setMessageID("MessageID");
        logger.setApplicationName("ApplicationName");
        logger.setAuditEnterpriseSiteID("AuditEnterpriseSiteID");
        logger.setAuditSourceID("AuditSourceID");
        logger.setAuditSourceTypeCodes("4", "5");
        logger.setEncoding("ISO-8859-1");
        logger.setFacility(AuditLogger.Facility.auth);
        logger.setSuccessSeverity(AuditLogger.Severity.info);
        logger.setMinorFailureSeverity(AuditLogger.Severity.notice);
        logger.setSeriousFailureSeverity(AuditLogger.Severity.warning);
        logger.setMajorFailureSeverity(AuditLogger.Severity.err);
        logger.setFormatXML(true);
        logger.setIncludeBOM(false);
        logger.setRetryInterval(300);
        logger.setSpoolDirectory(SPOOL_DIRECTORY);
        logger.setIncludeInstanceUID(true);
        logger.addAuditSuppressCriteria(createAuditSuppressCriteria());
    }
View Full Code Here

        criteria.setUserIsRequestor(true);
        return criteria;
    }

    private void validate(Device device) {
        AuditLogger logger = device.getDeviceExtension(AuditLogger.class);
        assertNotNull(logger);
        assertEquals(2, logger.getConnections().size());
        assertEquals(AuditMessages.SCHEMA_URI, logger.getSchemaURI());
        assertEquals("MessageID", logger.getMessageID());
        assertEquals("ApplicationName", logger.getApplicationName());
        assertEquals("AuditEnterpriseSiteID", logger.getAuditEnterpriseSiteID());
        assertEquals("AuditSourceID", logger.getAuditSourceID());
        assertArrayEquals(new String[]{"4", "5"}, sort(logger.getAuditSourceTypeCodes()));
        assertEquals("ISO-8859-1", logger.getEncoding());
        assertEquals(AuditLogger.Facility.auth, logger.getFacility());
        assertEquals(AuditLogger.Severity.info, logger.getSuccessSeverity());
        assertEquals(AuditLogger.Severity.notice, logger.getMinorFailureSeverity());
        assertEquals(AuditLogger.Severity.warning, logger.getSeriousFailureSeverity());
        assertEquals(AuditLogger.Severity.err, logger.getMajorFailureSeverity());
        assertTrue(logger.isFormatXML());
        assertFalse(logger.isIncludeBOM());
        assertEquals(300, logger.getRetryInterval());
        assertEquals(SPOOL_DIRECTORY, logger.getSpoolDirectory());
        assertTrue(logger.isIncludeInstanceUID());
        validate(logger.getAuditSuppressCriteriaList());
        Device arrDevice = logger.getAuditRecordRepositoryDevice();
        assertNotNull(arrDevice);
        AuditRecordRepository arr = arrDevice.getDeviceExtension(AuditRecordRepository.class);
        assertNotNull(arr);
        assertEquals(2, arr.getConnections().size());
    }
View Full Code Here

    private static final Logger LOG = LoggerFactory.getLogger(
            LdapAuditLoggerConfiguration.class);

    @Override
    protected void storeChilds(String deviceDN, Device device) throws NamingException {
        AuditLogger logger = device.getDeviceExtension(AuditLogger.class);
        if (logger != null)
            store(deviceDN, logger);
    }
View Full Code Here

TOP

Related Classes of org.dcm4che3.net.audit.AuditLogger$UDPConnection

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.