public Jira(String endpoint) throws MalformedURLException {
if (endpoint.endsWith("/")) {
endpoint = endpoint.substring(0, endpoint.length() - 1);
}
if (!endpoint.endsWith("/rpc/xmlrpc")) {
endpoint += "/rpc/xmlrpc";
}
XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl();
clientConfig.setServerURL(new URL(endpoint));
client = new XmlRpcClient();
client.setTransportFactory( new XmlRpcAhcTransportFactory(client) );
client.setConfig(clientConfig);
BasicIssueFiller basicIssueFiller = new BasicIssueFiller(this);
basicIssueFiller.setEnabled(true);
issueFillers.put("issue", basicIssueFiller);
issueFillers.put("project", new ProjectFiller(this));
autofillProviders.put("issue", BasicIssueFiller.class.getName());
autofillProviders.put("project", ProjectFiller.class.getName());
autofillProviders.put("voters", "org.codehaus.swizzle.jira.VotersFiller");
autofillProviders.put("subtasks", "org.codehaus.swizzle.jira.SubTasksFiller");
autofillProviders.put("attachments", "org.codehaus.swizzle.jira.AttachmentsFiller");
autofillProviders.put("comments", "org.codehaus.swizzle.jira.CommentsFiller");
}