Examples of Audit


Examples of com.indeed.proctor.common.model.Audit

        matrix.setTests(tests);
        return matrix;
    }

    private Audit constructAudit() {
        final Audit audit = new Audit();
        audit.setVersion("1");
        audit.setUpdatedBy("unit test");
        audit.setUpdated(1337133701337L);
        return audit;
    }
View Full Code Here

Examples of com.indeed.proctor.common.model.Audit

    @Test
    public void testAppendTestMatrix_audit() throws IOException {
        // Check that the audit values are correct.
        final TestMatrixArtifact matrix = new TestMatrixArtifact();

        final Audit audit = new Audit();
        audit.setVersion("10");
        audit.setUpdated(1000);
        audit.setUpdatedBy("nobody");
        matrix.setAudit(audit);

        final Writer writer = new StringWriter();
        final Proctor proctor = Proctor.construct(matrix, null, null);
        proctor.appendTestMatrix(writer);
View Full Code Here

Examples of com.indeed.proctor.common.model.Audit

            // This should only happen if the versions of the matrix files are the same.
            return false;
        }
        this.current = newProctor;

        final Audit lastAudit = Preconditions.checkNotNull(this.lastAudit, "Missing last audit");
        setDataVersion(lastAudit.getVersion() + " @ " + lastAudit.getUpdated() + " by " + lastAudit.getUpdatedBy());
        LOGGER.info("Successfully loaded new test matrix definition: " + lastAudit.getVersion() + " @ " + lastAudit.getUpdated() + " by " + lastAudit.getUpdatedBy());
        return true;
    }
View Full Code Here

Examples of com.indeed.proctor.common.model.Audit

            loadResult = ProctorUtils.verifyWithoutSpecification(testMatrix, getSource(), functionMapper, providedContext);
        } else {
            loadResult = ProctorUtils.verifyAndConsolidate(testMatrix, getSource(), requiredTests, functionMapper, providedContext);
        }

        final Audit newAudit = testMatrix.getAudit();
        if (lastAudit != null) {
            final Audit audit = Preconditions.checkNotNull(newAudit, "Missing audit");
            if(lastAudit.getVersion().equals(audit.getVersion())) {
                if (LOGGER.isDebugEnabled()) {
                    LOGGER.debug("Not reloading " + getSource() + " test matrix definition because audit is unchanged: " + lastAudit.getVersion() + " @ " + lastAudit.getUpdated() + " by " + lastAudit.getUpdatedBy());
                }

                return null;
View Full Code Here

Examples of com.indeed.proctor.common.model.Audit

        return new Proctor(matrix, loadResult, testChoosers);
    }

    @Nonnull
    private static Proctor createEmptyProctor() {
        final Audit audit = new Audit();
        audit.setUpdated(0);
        audit.setUpdatedBy("nobody");
        audit.setVersion(Audit.EMPTY_VERSION);

        final TestMatrixArtifact testMatrix = new TestMatrixArtifact();
        testMatrix.setAudit(audit);

        final ProctorLoadResult loadResult = ProctorLoadResult.emptyResult();
View Full Code Here

Examples of com.indeed.proctor.common.model.Audit

                testChooser.getTestDefinition();
            }
        }

        // TODO Can we make getAudit nonnull?
        final Audit audit = Preconditions.checkNotNull(matrix.getAudit(), "Missing audit");
        return new ProctorResult(audit.getVersion(), testGroups, testDefinitions);
    }
View Full Code Here

Examples of com.indeed.proctor.common.model.Audit

        OBJECT_MAPPER.defaultPrettyPrintingWriter().writeValue(writer, artifact);
    }

    @Nonnull
    public static TestMatrixArtifact convertToConsumableArtifact(@Nonnull final TestMatrixVersion testMatrix) {
        final Audit audit = new Audit();
        final Date published = Preconditions.checkNotNull(testMatrix.getPublished(), "Missing publication date");
        audit.setUpdated(published.getTime());
        audit.setVersion(testMatrix.getVersion());
        audit.setUpdatedBy(testMatrix.getAuthor());

        final TestMatrixArtifact artifact = new TestMatrixArtifact();
        artifact.setAudit(audit);

        final TestMatrixDefinition testMatrixDefinition = Preconditions.checkNotNull(testMatrix.getTestMatrixDefinition(), "Missing test matrix definition");
View Full Code Here

Examples of com.indeed.proctor.common.model.Audit

    }

    private Proctor constructProctor() {
        final TestMatrixArtifact matrix = new TestMatrixArtifact();

        final Audit audit = new Audit();
        audit.setUpdated(0);
        audit.setUpdatedBy("nobody");
        audit.setVersion(Audit.EMPTY_VERSION);

        matrix.setAudit(audit);

        final TestBucket abcBucket0 = new TestBucket("always", 0, "always description", null);
        final List<TestBucket> abcBuckets = Lists.newArrayList(abcBucket0);
View Full Code Here

Examples of com.sishuok.es.showcase.status.audit.entity.Audit

        this.permissionList.assertHasPermission("audit");

        List<Audit> auditList = new ArrayList<Audit>();
        for (Long id : ids) {
            Audit audit = getAuditService().findOne(id);
            if (audit.getStatus() != Stateable.AuditStatus.waiting) {
                redirectAttributes.addFlashAttribute(Constants.ERROR, "数据中有已通过审核的,不能重复审核!");
                return "redirect:" + request.getAttribute(Constants.BACK_URL);
            }
            auditList.add(audit);
        }
        for (Audit audit : auditList) {
            audit.setStatus(status);
            audit.setComment(comment);
            getAuditService().update(audit);
        }

        redirectAttributes.addFlashAttribute(Constants.MESSAGE, "操作成功!");
View Full Code Here

Examples of framework.audit.Audit

    public void saveAudit(List<AuditDetails> auditDetails) throws ClipsServerException {
        String s = "";
        long t1 = new Date().getTime();
        for (AuditDetails ad : auditDetails) {
            s += "AuditDetails[ id: " + ad.id + ", sign: " + Converter.hexDump(ad.sign) + "]\n";
            Audit audit = findEntity(Audit.class, ad.id);
            audit.setDsa(Converter.hexDump(ad.sign));
            List list = findEntityWhatWithResCount(null, CollaboratorCertificate.class, new Field[]{new Field("collaborator.id", ad.collaboratorID)}, " ORDER BY a.id", 1);
            if (list.size() != 1){
                throw new ClipsServerException("Документ аудита не может быть подписан, т.к. не найден сертификат открытого ключа");
            }
            audit.setCertificate((CollaboratorCertificate) list.get(0));
            manager.persist(audit);
        }
        System.out.println("Save audit\n" + s + " in " + (new Date().getTime() - t1)+ " мс");
//        throw new UnsupportedOperationException("Not supported yet.");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.