本文整理汇总了Java中org.zendesk.client.v2.model.Audit类的典型用法代码示例。如果您正苦于以下问题:Java Audit类的具体用法?Java Audit怎么用?Java Audit使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Audit类属于org.zendesk.client.v2.model包,在下文中一共展示了Audit类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addAudit
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
void addAudit( Audit audit ) throws KettleValueException {
if ( auditSummaries == null ) {
auditSummaries = new LinkedMap<Long, ZendeskTicketAuditHistory>();
}
if ( auditSummaries.size() <= 0 ) {
auditSummaries.put( audit.getId(), new ZendeskTicketAuditHistory( audit ) );
} else {
try {
ZendeskTicketAuditHistory newAudit =
auditSummaries.get( auditSummaries.lastKey() ).createNextAudit( audit, auditSummaries );
auditSummaries.put( audit.getId(), newAudit );
} catch ( CloneNotSupportedException e ) {
e.printStackTrace();
}
}
}
示例2: ZendeskTicketAuditHistory
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
public ZendeskTicketAuditHistory( Audit audit ) throws KettleValueException {
this.ticketId = audit.getTicketId();
this.auditId = audit.getId();
this.createdTime = audit.getCreatedAt();
this.customFields = new LinkedHashMap<String, String>();
this.processEvents( audit.getEvents(), null );
}
示例3: createNextAudit
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
public ZendeskTicketAuditHistory createNextAudit( Audit audit, AbstractLinkedMap<Long, ZendeskTicketAuditHistory> auditSummaries ) throws CloneNotSupportedException, KettleValueException {
ZendeskTicketAuditHistory nextAudit = (ZendeskTicketAuditHistory) this.clone();
nextAudit.auditId = audit.getId();
nextAudit.createdTime = audit.getCreatedAt();
nextAudit.processEvents( audit.getEvents(), auditSummaries );
return nextAudit;
}
示例4: getTicketAudits
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
@Test
public void getTicketAudits() throws Exception {
createClientWithTokenOrPassword();
for (Audit a : instance.getTicketAudits(1L)) {
assertThat(a, notNullValue());
assertThat(a.getEvents(), not(Collections.<Event>emptyList()));
}
}
示例5: getTicketAudits
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
public Iterable<Audit> getTicketAudits(Ticket ticket) {
checkHasId(ticket);
return getTicketAudits(ticket.getId());
}
示例6: getTicketAudit
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
public Audit getTicketAudit(Ticket ticket, Audit audit) {
checkHasId(audit);
return getTicketAudit(ticket, audit.getId());
}
示例7: trustTicketAudit
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
public void trustTicketAudit(Ticket ticket, Audit audit) {
checkHasId(audit);
trustTicketAudit(ticket, audit.getId());
}
示例8: makePrivateTicketAudit
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
public void makePrivateTicketAudit(Ticket ticket, Audit audit) {
checkHasId(audit);
makePrivateTicketAudit(ticket, audit.getId());
}
示例9: checkHasId
import org.zendesk.client.v2.model.Audit; //导入依赖的package包/类
private static void checkHasId(Audit audit) {
if (audit.getId() == null) {
throw new IllegalArgumentException("Audit requires id");
}
}