Examples of AuditRecordBuilder


Examples of com.atlassian.jira.rest.client.api.domain.input.AuditRecordBuilder

    @Test
    public void testAddSimpleRecord() {
        ImmutableList<AuditAssociatedItem> items = ImmutableList.of(
                new AuditAssociatedItem("", "admin", "USER", null, null),
                new AuditAssociatedItem("123", "Internal item", "PROJECT", null, ""));
        client.getAuditRestClient().addAuditRecord(new AuditRecordBuilder("user management", "Event with associated items")
                .setAssociatedItems(items)
                .build());

        ImmutableList<AuditChangedValue> changedValues = ImmutableList.of(new AuditChangedValue("Test", "to", "from"));
        client.getAuditRestClient().addAuditRecord(new AuditRecordBuilder("user management", "Event with changed values")
                .setChangedValues(changedValues)
                .build());

        client.getAuditRestClient().addAuditRecord(new AuditRecordBuilder("user management", "Adding new event").build());

        final Iterable<AuditRecord> auditRecords = client.getAuditRestClient().getAuditRecords(null).claim().getRecords();
        assertThat(auditRecords, IsIterableWithSize.<AuditRecord>iterableWithSize(6));

        AuditRecord record = Iterables.get(auditRecords, 0);
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.