//ArrayList almts = core.getMethodSignatures("system.getAPIVersion");
ApiVersion av = core.getApiVersion();
TicketManager ticketManager = trac.getTicketManager();
//Object otg = ticketManager.get(2);
//Object otq = ticketManager.query("milestone=ALPHA M1");
//Object otgrc = ticketManager.getRecentChanges(new Date());
//Object otat = ticketManager.getAvailableActions(2);
/*
Ticket te = new Ticket("SUMMARY_ES 2", "DESCRIPTION_ES 2");
te.setKeywords("KEYWORD_ONE 2");
te.setComponent("NO COMPONET!!!! 2");
Integer idTicket = ticketManager.create(te, false);
te.setIdTicket(idTicket);
te.setSummary("NEW FIELD_SUMMARY ES 2 ");
te.setComment("NEW COMMENT ES ES ES 2");
te = ticketManager.update(te, false);
*/
//ticketManager.delete(9);
//Object o = ticketManager.getChangeLog(8, 0);
//Object o = ticketManager.getAttachmentsInfo(8);
/*
Object o = ticketManager.getAttachment(8, "superhero-300x212.jpg");
FileOutputStream fos = new FileOutputStream("/Users/ka2/" + "superhero-300x212.jpg");
fos.write((byte[])o);
fos.close();
*/
String fileName = ticketManager.getAttachmentToFile(8, "superhero-300x212.jpg", "/Users/ka2/");
TicketAttachment ticketTicketAttachment = new TicketAttachment(7, "superhero-300x212.jpg", "", "/Users/ka2/superhero-300x212.jpg");
String fileName2 = ticketManager.addAttachement(ticketTicketAttachment, true);
boolean ok = ticketManager.deleteAttachment(7, "superhero-300x212.jpg");
//Object otf = ticketManager.getTicketFields();