Esempio n. 1
0
 public string getSoapToken(JiraServer server)
 {
     try {
         using (SoapSession session = createSoapSession(server)) {
             return(session.login(server.UserName, server.Password));
         }
     } catch (Exception e) {
         Debug.WriteLine("JiraServerFacade.getSoapToken() - exception: " + e.Message);
     }
     return(null);
 }
Esempio n. 2
0
 private void setSessionToken(JiraServer server, SoapSession session)
 {
     lock (tokenMap) {
         string tokenKey = getTokenKey(server);
         if (tokenMap.ContainsKey(tokenKey))
         {
             session.Token = tokenMap[tokenKey];
         }
         else
         {
             tokenMap[tokenKey] = session.login(server.UserName, server.Password);
         }
     }
 }
Esempio n. 3
0
 private void wrapExceptionsVoid(JiraServer server, SoapSession session, WrappedVoid wrapped)
 {
     try {
         setSessionToken(server, session);
         wrapped();
     } catch (System.Web.Services.Protocols.SoapException) {
         // let's retry _just once_ - PLVS-27
         removeSessionToken(server);
         try {
             setSessionToken(server, session);
             wrapped();
         } catch (Exception e) {
             removeSessionToken(server);
             maybeHandle503(e);
             throw;
         }
     } catch (Exception e) {
         removeSessionToken(server);
         maybeHandle503(e);
         throw;
     }
 }
Esempio n. 4
0
        private static SoapSession createSoapSession(JiraServer server)
        {
            SoapSession s = new SoapSession(server.Url);

            return(s);
        }
Esempio n. 5
0
 public void uploadAttachment(JiraIssue issue, string name, byte[] attachment)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         wrapExceptionsVoid(issue.Server, s, () => s.uploadAttachment(issue.Key, name, attachment));
     }
 }
Esempio n. 6
0
 public void updateIssue(JiraIssue issue, ICollection <JiraField> fields)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         wrapExceptionsVoid(issue.Server, s, () => s.updateIssue(issue.Key, fields));
     }
 }
Esempio n. 7
0
 public void addComment(JiraIssue issue, string comment)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         wrapExceptionsVoid(issue.Server, s, () => s.addComment(issue, comment));
     }
 }
Esempio n. 8
0
 public List <JiraNamedEntity> getIssueTypes(JiraServer server)
 {
     using (SoapSession s = createSoapSession(server)) {
         return(wrapExceptions(server, s, () => s.getIssueTypes()));
     }
 }
Esempio n. 9
0
 public JiraNamedEntity getSecurityLevel(JiraIssue issue)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         return(wrapExceptions(issue.Server, s, () => s.getSecurityLevel(issue.Key)));
     }
 }
Esempio n. 10
0
 public object getIssueSoapObject(JiraIssue issue)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         return(wrapExceptions(issue.Server, s, () => s.getIssueSoapObject(issue.Key)));
     }
 }
Esempio n. 11
0
 public string createIssue(JiraServer server, JiraIssue issue)
 {
     using (SoapSession s = createSoapSession(server)) {
         return(wrapExceptions(server, s, () => s.createIssue(issue)));
     }
 }
Esempio n. 12
0
 public void runIssueActionWithParams(JiraIssue issue, JiraNamedEntity action, ICollection <JiraField> fields, string comment)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         wrapExceptionsVoid(issue.Server, s, () => s.runIssueActionWithParams(issue, action.Id, fields, comment));
     }
 }
Esempio n. 13
0
 public void runIssueActionWithoutParams(JiraIssue issue, JiraNamedEntity action)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         wrapExceptionsVoid(issue.Server, s, () => s.runIssueActionWithoutParams(issue, action.Id));
     }
 }
Esempio n. 14
0
 public List <JiraField> getFieldsForAction(JiraIssue issue, int actionId)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         return(wrapExceptions(issue.Server, s, () => s.getFieldsForAction(issue, actionId)));
     }
 }
Esempio n. 15
0
 public List <JiraNamedEntity> getActionsForIssue(JiraIssue issue)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         return(wrapExceptions(issue.Server, s, () => s.getActionsForIssue(issue)));
     }
 }
Esempio n. 16
0
 public void logWorkAndLeaveRemainingUnchanged(JiraIssue issue, string timeSpent, DateTime startDate, string comment)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         wrapExceptionsVoid(issue.Server, s, () => s.logWorkAndLeaveRemainingUnchanged(issue.Key, timeSpent, startDate, comment));
     }
 }
Esempio n. 17
0
 public List <JiraProject> getProjects(JiraServer server)
 {
     using (SoapSession s = createSoapSession(server)) {
         return(wrapExceptions(server, s, () => s.getProjects()));
     }
 }
Esempio n. 18
0
 public void logWorkAndUpdateRemainingManually(JiraIssue issue, string timeSpent, DateTime startDate, string remainingEstimate, string comment)
 {
     using (SoapSession s = createSoapSession(issue.Server)) {
         wrapExceptionsVoid(issue.Server, s, () => s.logWorkAndUpdateRemainingManually(issue.Key, timeSpent, startDate, remainingEstimate, comment));
     }
 }
Esempio n. 19
0
 public List <JiraNamedEntity> getSubtaskIssueTypes(JiraServer server, JiraProject project)
 {
     using (SoapSession s = createSoapSession(server)) {
         return(wrapExceptions(server, s, () => s.getSubtaskIssueTypes(project)));
     }
 }
Esempio n. 20
0
 public List <JiraSavedFilter> getSavedFilters(JiraServer server)
 {
     using (SoapSession s = createSoapSession(server)) {
         return(wrapExceptions(server, s, () => s.getSavedFilters()));
     }
 }