Package org.dcm4che3.net.audit

Examples of org.dcm4che3.net.audit.AuditRecordRepository


            "cn=Audit Record Repository,";

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


        try {
            attrs = config.getAttributes(CN_AUDIT_RECORD_REPOSITORY + deviceDN);
        } catch (NameNotFoundException e) {
            return;
        }
        AuditRecordRepository arr = new AuditRecordRepository();
        loadFrom(arr, attrs);
        for (String connDN : LdapUtils.stringArray(
                attrs.get("dicomNetworkConnectionReference")))
            arr.addConnection(
                    LdapUtils.findConnection(connDN, deviceDN, device));
        device.addDeviceExtension(arr);
    }
View Full Code Here

    }

    @Override
    protected void mergeChilds(Device prev, Device device, String deviceDN)
            throws NamingException {
        AuditRecordRepository prevARR = prev.getDeviceExtension(AuditRecordRepository.class);
        AuditRecordRepository arr = device.getDeviceExtension(AuditRecordRepository.class);
        if (arr == null) {
            if (prevARR != null)
                config.destroySubcontextWithChilds(CN_AUDIT_RECORD_REPOSITORY + deviceDN);
            return;
        }
View Full Code Here

        logger.setIncludeInstanceUID(true);
        logger.addAuditSuppressCriteria(createAuditSuppressCriteria());
    }

    private AuditSuppressCriteria createAuditSuppressCriteria() {
        AuditSuppressCriteria criteria = new AuditSuppressCriteria("AuditSuppressCriteria");
        criteria.setEventIDs(AuditMessages.EventID.ApplicationActivity);
        criteria.setEventActionCodes(AuditMessages.EventActionCode.Execute);
        criteria.setEventTypeCodes(AuditMessages.EventTypeCode.ApplicationStart,
                AuditMessages.EventTypeCode.ApplicationStop);
        criteria.setEventOutcomeIndicators(AuditMessages.EventOutcomeIndicator.Success);
        criteria.setUserIDs("UserID");
        criteria.setAlternativeUserIDs("AltUserID");
        criteria.setNetworkAccessPointIDs("127.0.0.1");
        criteria.setUserRoleIDCodes(AuditMessages.RoleIDCode.ApplicationLauncher);
        criteria.setUserIsRequestor(true);
        return criteria;
    }
View Full Code Here

        assertEquals(2, arr.getConnections().size());
    }

    private void validate(List<AuditSuppressCriteria> criteriaList) {
        assertEquals(1, criteriaList.size());
        AuditSuppressCriteria criteria = criteriaList.get(0);
        assertEquals("AuditSuppressCriteria", criteria.getCommonName());
        EventID[] eventIDs = criteria.getEventIDs();
        assertEquals(1, eventIDs.length);
        assertEquals(AuditMessages.EventID.ApplicationActivity.getCode(),
                eventIDs[0].getCode());
        assertEquals(AuditMessages.EventID.ApplicationActivity.getCodeSystemName(),
                eventIDs[0].getCodeSystemName());
        assertEquals(AuditMessages.EventID.ApplicationActivity.getDisplayName(),
                eventIDs[0].getDisplayName());
        String[] eventActionCodes = criteria.getEventActionCodes();
        assertEquals(1, eventActionCodes.length);
        assertEquals(AuditMessages.EventActionCode.Execute, eventActionCodes[0]);
        EventTypeCode[] eventTypeCodes = criteria.getEventTypeCodes();
        assertEquals(2, eventTypeCodes.length);
        String[] eventOutcomeIndicators = criteria.getEventOutcomeIndicators();
        assertEquals(1, eventOutcomeIndicators.length);
        assertEquals(AuditMessages.EventOutcomeIndicator.Success, eventOutcomeIndicators[0]);
        String[] userIDs = criteria.getUserIDs();
        assertEquals(1, userIDs.length);
        assertEquals("UserID", userIDs[0]);
        String[] altUserIDs = criteria.getAlternativeUserIDs();
        assertEquals(1, altUserIDs.length);
        assertEquals("AltUserID", altUserIDs[0]);
        String[] networkAccessPointIDs = criteria.getNetworkAccessPointIDs();
        assertEquals(1, networkAccessPointIDs.length);
        assertEquals("127.0.0.1", networkAccessPointIDs[0]);
        RoleIDCode[] userRoleIDCodes = criteria.getUserRoleIDCodes();
        assertEquals(1, userRoleIDCodes.length);
        assertEquals(AuditMessages.RoleIDCode.ApplicationLauncher.getCode(),
                userRoleIDCodes[0].getCode());
        assertEquals(AuditMessages.RoleIDCode.ApplicationLauncher.getCodeSystemName(),
                userRoleIDCodes[0].getCodeSystemName());
        assertEquals(AuditMessages.RoleIDCode.ApplicationLauncher.getDisplayName(),
                userRoleIDCodes[0].getDisplayName());
        assertEquals(true, criteria.getUserIsRequestor());
    }
View Full Code Here

        this.status = status;
    }

    public void setTransferSyntaxes(String[] tss) {
        rq.addPresentationContext(
                new PresentationContext(1, UID.VerificationSOPClass,
                        UID.ImplicitVRLittleEndian));
        rq.addPresentationContext(
                new PresentationContext(2,
                        UID.StorageCommitmentPushModelSOPClass,
                        tss));
        ae.addTransferCapability(
                new TransferCapability(null,
                        UID.VerificationSOPClass,
View Full Code Here

            LOG.warn("{}: M-DELETE {} failed!", as, file);
    }

    private DicomServiceRegistry createServiceRegistry() {
        DicomServiceRegistry serviceRegistry = new DicomServiceRegistry();
        serviceRegistry.addDicomService(new BasicCEchoSCP());
        serviceRegistry.addDicomService(cstoreSCP);
        return serviceRegistry;
    }
View Full Code Here

    public StgCmtSCU(ApplicationEntity ae) throws IOException {
        this.remote = new Connection();
        this.ae = ae;
        DicomServiceRegistry serviceRegistry = new DicomServiceRegistry();
        serviceRegistry.addDicomService(new BasicCEchoSCP());
        serviceRegistry.addDicomService(stgcmtResultHandler);
        ae.setDimseRQHandler(serviceRegistry);
    }
View Full Code Here

                    Attributes.createFileMetaInformation(iuid, cuid,
                            UID.ExplicitVRLittleEndian),
                    eventInfo);
        } catch (IOException e) {
            LOG.warn(as + ": Failed to store Storage Commitment Result:", e);
            throw new DicomServiceException(Status.ProcessingFailure, e);
        } finally {
            SafeClose.close(out);
        }
        return null;
    }
View Full Code Here

    @Override
    public void process(Exchange exchange) throws Exception {
        DicomMessage in = exchange.getIn(DicomMessage.class);
        Dimse dimse = in.getHeader("dimse", Dimse.class);
        if (dimse != Dimse.C_ECHO_RQ)
            throw new DicomServiceException(Status.UnrecognizedOperation);
        DicomMessage out = new DicomMessage(
                Dimse.C_ECHO_RSP,
                Commands.mkEchoRSP(in.getCommand(), Status.Success));
        exchange.setOut(out);
    }
View Full Code Here

TOP

Related Classes of org.dcm4che3.net.audit.AuditRecordRepository

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.