|
Lines 71-76
Link Here
|
| 71 |
import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token; |
71 |
import org.eclipse.mylyn.commons.net.HtmlStreamTokenizer.Token; |
| 72 |
import org.eclipse.mylyn.commons.net.HtmlTag; |
72 |
import org.eclipse.mylyn.commons.net.HtmlTag; |
| 73 |
import org.eclipse.mylyn.commons.net.Policy; |
73 |
import org.eclipse.mylyn.commons.net.Policy; |
|
|
74 |
import org.eclipse.mylyn.commons.net.WebLocation; |
| 74 |
import org.eclipse.mylyn.commons.net.WebUtil; |
75 |
import org.eclipse.mylyn.commons.net.WebUtil; |
| 75 |
import org.eclipse.mylyn.internal.bugzilla.core.history.BugzillaTaskHistoryParser; |
76 |
import org.eclipse.mylyn.internal.bugzilla.core.history.BugzillaTaskHistoryParser; |
| 76 |
import org.eclipse.mylyn.internal.bugzilla.core.history.TaskHistory; |
77 |
import org.eclipse.mylyn.internal.bugzilla.core.history.TaskHistory; |
|
Lines 179-185
Link Here
|
| 179 |
|
180 |
|
| 180 |
private final BugzillaRepositoryConnector connector; |
181 |
private final BugzillaRepositoryConnector connector; |
| 181 |
|
182 |
|
| 182 |
private BugzillaXmlRpcClient xmlRpcClient; |
183 |
private BugzillaXmlRpcClient xmlRpcClient = null; |
| 183 |
|
184 |
|
| 184 |
public BugzillaClient(AbstractWebLocation location, String characterEncoding, Map<String, String> configParameters, |
185 |
public BugzillaClient(AbstractWebLocation location, String characterEncoding, Map<String, String> configParameters, |
| 185 |
BugzillaLanguageSettings languageSettings, BugzillaRepositoryConnector connector) |
186 |
BugzillaLanguageSettings languageSettings, BugzillaRepositoryConnector connector) |
|
Lines 219-224
Link Here
|
| 219 |
WebUtil.releaseConnection(method, monitor); |
220 |
WebUtil.releaseConnection(method, monitor); |
| 220 |
} |
221 |
} |
| 221 |
} |
222 |
} |
|
|
223 |
CustomTransitionManager validTransitions = new CustomTransitionManager(); |
| 224 |
|
| 225 |
String transitionsFileName = configParameters.get(IBugzillaConstants.BUGZILLA_DESCRIPTOR_FILE); |
| 226 |
if (!validTransitions.parse(transitionsFileName)) { |
| 227 |
throw new CoreException(new Status(IStatus.WARNING, BugzillaCorePlugin.ID_PLUGIN, |
| 228 |
"Invalide Transition File Content")); //$NON-NLS-1$ |
| 229 |
} |
| 230 |
|
| 222 |
} |
231 |
} |
| 223 |
|
232 |
|
| 224 |
protected boolean hasAuthenticationCredentials() { |
233 |
protected boolean hasAuthenticationCredentials() { |
|
Lines 689-706
Link Here
|
| 689 |
} |
698 |
} |
| 690 |
|
699 |
|
| 691 |
if (repositoryConfiguration != null) { |
700 |
if (repositoryConfiguration != null) { |
| 692 |
boolean useXml = Boolean.parseBoolean(configParameters.get(IBugzillaConstants.BUGZILLA_USE_XMLRPC)); |
701 |
boolean useXMLRPC = Boolean.parseBoolean(configParameters.get(IBugzillaConstants.BUGZILLA_USE_XMLRPC)); |
|
|
702 |
if (useXMLRPC && xmlRpcClient == null) { |
| 703 |
WebLocation webLocation = new WebLocation(this.repositoryUrl + "/xmlrpc.cgi"); //$NON-NLS-1$ |
| 704 |
xmlRpcClient = new BugzillaXmlRpcClient(webLocation); |
| 705 |
|
| 706 |
} |
| 693 |
if (!repositoryConfiguration.getProducts().isEmpty()) { |
707 |
if (!repositoryConfiguration.getProducts().isEmpty()) { |
| 694 |
repositoryConfiguration.setRepositoryUrl(repositoryUrl.toString()); |
708 |
repositoryConfiguration.setRepositoryUrl(repositoryUrl.toString()); |
| 695 |
|
709 |
} |
| 696 |
repositoryConfiguration.setValidTransitions(monitor, |
710 |
xmlRpcClient.updateConfiguration(monitor, repositoryConfiguration, |
| 697 |
configParameters.get(IBugzillaConstants.BUGZILLA_DESCRIPTOR_FILE), |
711 |
configParameters.get(IBugzillaConstants.BUGZILLA_DESCRIPTOR_FILE)); |
| 698 |
useXml); |
712 |
if (!repositoryConfiguration.getProducts().isEmpty()) { |
| 699 |
return repositoryConfiguration; |
713 |
return repositoryConfiguration; |
| 700 |
} else { |
714 |
} else { |
| 701 |
repositoryConfiguration.setValidTransitions(monitor, |
|
|
| 702 |
configParameters.get(IBugzillaConstants.BUGZILLA_DESCRIPTOR_FILE), |
| 703 |
useXml); |
| 704 |
if (attempt == 0) { |
715 |
if (attempt == 0) { |
| 705 |
// empty configuration, retry authenticate |
716 |
// empty configuration, retry authenticate |
| 706 |
loggedIn = false; |
717 |
loggedIn = false; |
|
Lines 711-717
Link Here
|
| 711 |
"No products found in repository configuration. Ensure credentials are valid.")); //$NON-NLS-1$ |
722 |
"No products found in repository configuration. Ensure credentials are valid.")); //$NON-NLS-1$ |
| 712 |
} |
723 |
} |
| 713 |
} |
724 |
} |
| 714 |
|
|
|
| 715 |
} |
725 |
} |
| 716 |
} |
726 |
} |
| 717 |
} |
727 |
} |