Commit 1f6bc182f93dad3cf58f617af41cee051b8f05e7

Authored by Bernard Labno
1 parent 6af6ffac

Search issues across all projects (YouTrack 5)

  1 +text=auto
\ No newline at end of file
... ...
  1 +target
  2 +.idea
  3 +*.iml
  4 +filter-dev.properties
... ...
... ... @@ -2,40 +2,25 @@
2 2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 3 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4 4 <modelVersion>4.0.0</modelVersion>
5   -
6 5 <groupId>pl.itcrowd</groupId>
7 6 <artifactId>youtrack-rest-api</artifactId>
8 7 <version>1.1.0-SNAPSHOT</version>
9   -
10   - <dependencies>
11   - <dependency>
12   - <groupId>junit</groupId>
13   - <artifactId>junit</artifactId>
14   - <version>4.8.2</version>
15   - <scope>test</scope>
16   - </dependency>
17   - <dependency>
18   - <groupId>org.apache.httpcomponents</groupId>
19   - <artifactId>httpclient</artifactId>
20   - <version>4.2-beta1</version>
21   - </dependency>
22   - <dependency>
23   - <groupId>commons-io</groupId>
24   - <artifactId>commons-io</artifactId>
25   - <version>2.3</version>
26   - </dependency>
27   - <dependency>
28   - <groupId>org.mockito</groupId>
29   - <artifactId>mockito-all</artifactId>
30   - <version>1.9.0-rc1</version>
31   - <scope>test</scope>
32   - </dependency>
33   - </dependencies>
34   -
  8 + <scm>
  9 + <developerConnection>scm:git:https://itcrowd.pl/gitblit/git/OpenSource/youtrack-rest-api.git</developerConnection>
  10 + </scm>
35 11 <build>
36 12 <plugins>
37 13 <plugin>
38 14 <groupId>org.apache.maven.plugins</groupId>
  15 + <artifactId>maven-release-plugin</artifactId>
  16 + <version>2.4.1</version>
  17 + <configuration>
  18 + <localCheckout>true</localCheckout>
  19 + <pushChanges>false</pushChanges>
  20 + </configuration>
  21 + </plugin>
  22 + <plugin>
  23 + <groupId>org.apache.maven.plugins</groupId>
39 24 <artifactId>maven-source-plugin</artifactId>
40 25 <version>2.1.2</version>
41 26 <executions>
... ... @@ -48,17 +33,8 @@
48 33 </execution>
49 34 </executions>
50 35 </plugin>
51   - <plugin>
52   - <artifactId>maven-release-plugin</artifactId>
53   - <configuration>
54   - <autoVersionSubmodules>true</autoVersionSubmodules>
55   - <pushChanges>false</pushChanges>
56   - <localCheckout>true</localCheckout>
57   - </configuration>
58   - </plugin>
59 36 </plugins>
60 37 </build>
61   -
62 38 <profiles>
63 39 <profile>
64 40 <id>generate-jaxb-artifacts</id>
... ... @@ -76,10 +52,10 @@
76 52 </execution>
77 53 </executions>
78 54 <configuration>
79   - <packageName>pl.itcrowd.youtrack.api.rest</packageName>
80   - <outputDirectory>${project.build.sourceDirectory}</outputDirectory>
81 55 <clearOutputDir>false</clearOutputDir>
82 56 <extension>false</extension>
  57 + <outputDirectory>${project.build.sourceDirectory}</outputDirectory>
  58 + <packageName>pl.itcrowd.youtrack.api.rest</packageName>
83 59 </configuration>
84 60 </plugin>
85 61 </plugins>
... ... @@ -92,7 +68,30 @@
92 68 </properties>
93 69 </profile>
94 70 </profiles>
95   -
  71 + <dependencies>
  72 + <dependency>
  73 + <groupId>commons-io</groupId>
  74 + <artifactId>commons-io</artifactId>
  75 + <version>2.3</version>
  76 + </dependency>
  77 + <dependency>
  78 + <groupId>org.apache.httpcomponents</groupId>
  79 + <artifactId>httpclient</artifactId>
  80 + <version>4.2-beta1</version>
  81 + </dependency>
  82 + <dependency>
  83 + <groupId>junit</groupId>
  84 + <artifactId>junit</artifactId>
  85 + <version>4.8.2</version>
  86 + <scope>test</scope>
  87 + </dependency>
  88 + <dependency>
  89 + <groupId>org.mockito</groupId>
  90 + <artifactId>mockito-all</artifactId>
  91 + <version>1.9.0-rc1</version>
  92 + <scope>test</scope>
  93 + </dependency>
  94 + </dependencies>
96 95 <distributionManagement>
97 96 <repository>
98 97 <id>itcrowd.pl</id>
... ... @@ -105,9 +104,4 @@
105 104 <url>http://artifactory.itcrowd.pl/libs-snapshot-local</url>
106 105 </snapshotRepository>
107 106 </distributionManagement>
108   -
109   - <scm>
110   - <developerConnection>scm:git:https://itcrowd.pl/gitblit/git/OpenSource/youtrack-rest-api.git</developerConnection>
111   - </scm>
112   -
113 107 </project>
... ...
... ... @@ -2,12 +2,13 @@ package pl.itcrowd.youtrack.api;
2 2
3 3 import java.net.URI;
4 4 import java.net.URISyntaxException;
  5 +import java.util.Map;
5 6
6 7 public class URIUtils {
7 8
8 9 public static URI buildURI(URI base, String path)
9 10 {
10   - return buildURI(base, path, null);
  11 + return buildURI(base, path, (String) null);
11 12 }
12 13
13 14 public static URI buildURI(URI base, String path, String query)
... ... @@ -19,4 +20,15 @@ public class URIUtils {
19 20 throw new RuntimeException(e);
20 21 }
21 22 }
  23 +
  24 + public static URI buildURI(URI base, String path, Map<String, Object> params)
  25 + {
  26 + final StringBuilder query = new StringBuilder();
  27 + for (Map.Entry<String, Object> entry : params.entrySet()) {
  28 + if (null != entry.getValue()) {
  29 + query.append("&").append(entry.getKey()).append("=").append(entry.getValue());
  30 + }
  31 + }
  32 + return buildURI(base, path, query.length() > 0 ? query.substring(1) : query.toString());
  33 + }
22 34 }
... ...
... ... @@ -35,6 +35,7 @@ import pl.itcrowd.youtrack.api.exceptions.YoutrackErrorException;
35 35 import pl.itcrowd.youtrack.api.rest.AssigneeList;
36 36 import pl.itcrowd.youtrack.api.rest.Enumeration;
37 37 import pl.itcrowd.youtrack.api.rest.Issue;
  38 +import pl.itcrowd.youtrack.api.rest.IssueCompacts;
38 39 import pl.itcrowd.youtrack.api.rest.Issues;
39 40 import pl.itcrowd.youtrack.api.rest.User;
40 41 import pl.itcrowd.youtrack.api.rest.UserRefs;
... ... @@ -57,7 +58,9 @@ import java.security.cert.X509Certificate;
57 58 import java.util.ArrayList;
58 59 import java.util.Arrays;
59 60 import java.util.Collections;
  61 +import java.util.HashMap;
60 62 import java.util.List;
  63 +import java.util.Map;
61 64 import java.util.regex.Matcher;
62 65 import java.util.regex.Pattern;
63 66
... ... @@ -77,6 +80,36 @@ public class YoutrackAPI {
77 80
78 81 private URI serviceLocationURI;
79 82
  83 + public YoutrackAPI(String serviceLocation)
  84 + {
  85 + this(serviceLocation, null);
  86 + }
  87 +
  88 + public YoutrackAPI(String serviceLocation, HttpClient httpClient)
  89 + {
  90 + if (serviceLocation == null) {
  91 + throw new IllegalArgumentException("serviceLocation cannot be null");
  92 + }
  93 + this.serviceLocation = serviceLocation;
  94 + try {
  95 + serviceLocationURI = new URI(this.serviceLocation);
  96 + } catch (URISyntaxException e) {
  97 + throw new RuntimeException(e);
  98 + }
  99 + this.httpClient = httpClient == null ? getDefaultHttpClient() : httpClient;
  100 + }
  101 +
  102 + public YoutrackAPI(String serviceLocation, String username, String password) throws IOException, JAXBException
  103 + {
  104 + this(serviceLocation, null, username, password);
  105 + }
  106 +
  107 + public YoutrackAPI(String serviceLocation, HttpClient httpClient, String username, String password) throws IOException, JAXBException
  108 + {
  109 + this(serviceLocation, httpClient);
  110 + login(username, password);
  111 + }
  112 +
80 113 private static HttpClient getDefaultHttpClient()
81 114 {
82 115 SSLContext sslContext;
... ... @@ -129,34 +162,71 @@ public class YoutrackAPI {
129 162 return true;
130 163 }
131 164
132   - public YoutrackAPI(String serviceLocation)
  165 + public AssigneeList getAssignees(String project) throws IOException, JAXBException
133 166 {
134   - this(serviceLocation, null);
  167 + final String responseString = execute(new HttpGet(buildURI(serviceLocationURI, "/rest/admin/project/" + project + "/assignee")));
  168 + final Object result = YoutrackUnmarshaller.unmarshall(responseString);
  169 + if (result instanceof AssigneeList) {
  170 + return (AssigneeList) result;
  171 + } else {
  172 + throw new YoutrackAPIException("Unexpected type: " + result);
  173 + }
135 174 }
136 175
137   - public YoutrackAPI(String serviceLocation, HttpClient httpClient)
  176 + public Enumeration getBundle(String customField) throws IOException, JAXBException
138 177 {
139   - if (serviceLocation == null) {
140   - throw new IllegalArgumentException("serviceLocation cannot be null");
141   - }
142   - this.serviceLocation = serviceLocation;
143   - try {
144   - serviceLocationURI = new URI(this.serviceLocation);
145   - } catch (URISyntaxException e) {
146   - throw new RuntimeException(e);
  178 + final Object result = YoutrackUnmarshaller.unmarshall(
  179 + execute(new HttpGet(buildURI(serviceLocationURI, "/rest/admin/customfield/bundle/" + customField))));
  180 + if (result instanceof Enumeration) {
  181 + return (Enumeration) result;
  182 + } else if (result instanceof JAXBElement) {
  183 + final JAXBElement jaxbElement = (JAXBElement) result;
  184 + if (Enumeration_QNAME.equals(jaxbElement.getName())) {
  185 + return (Enumeration) ((JAXBElement) result).getValue();
  186 + } else {
  187 + throw new YoutrackAPIException("Unexpected type: " + jaxbElement.getValue());
  188 + }
  189 + } else {
  190 + throw new YoutrackAPIException("Unexpected type: " + result);
147 191 }
148   - this.httpClient = httpClient == null ? getDefaultHttpClient() : httpClient;
149 192 }
150 193
151   - public YoutrackAPI(String serviceLocation, String username, String password) throws IOException, JAXBException
  194 + public List<User> getIndividualAssignees(String project) throws IOException, JAXBException
152 195 {
153   - this(serviceLocation, null, username, password);
  196 + final String responseString = execute(new HttpGet(buildURI(serviceLocationURI, "/rest/admin/project/" + project + "/assignee/individual")));
  197 + final Object result = YoutrackUnmarshaller.unmarshall(responseString);
  198 + if (result instanceof UserRefs) {
  199 + return ((UserRefs) result).getUsers();
  200 + } else {
  201 + throw new YoutrackAPIException("Unexpected type: " + result);
  202 + }
154 203 }
155 204
156   - public YoutrackAPI(String serviceLocation, HttpClient httpClient, String username, String password) throws IOException, JAXBException
  205 + public IssueWrapper getIssue(String issueId) throws IOException, JAXBException
157 206 {
158   - this(serviceLocation, httpClient);
159   - login(username, password);
  207 + final String responseString;
  208 + try {
  209 + responseString = execute(new HttpGet(buildURI(serviceLocationURI, "/rest/issue/" + issueId)));
  210 + } catch (YoutrackErrorException e) {
  211 + if (e.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
  212 + throw new NoResultFoundException(e.getMessage(), e);
  213 + } else {
  214 + throw e;
  215 + }
  216 + }
  217 + final Object result = YoutrackUnmarshaller.unmarshall(responseString);
  218 + if (result instanceof pl.itcrowd.youtrack.api.rest.Issue) {
  219 + return new IssueWrapper((Issue) result);
  220 + } else if (result instanceof JAXBElement) {
  221 + final JAXBElement jaxbElement = (JAXBElement) result;
  222 + if (Issue_QNAME.equals(jaxbElement.getName())) {
  223 + return new IssueWrapper((Issue) jaxbElement.getValue());
  224 + } else {
  225 + throw new YoutrackAPIException("Unexpected type: " + jaxbElement.getValue());
  226 + }
  227 + } else {
  228 + throw new YoutrackAPIException("Unexpected type " + result);
  229 + }
160 230 }
161 231
162 232 public String getServiceLocation()
... ... @@ -233,78 +303,29 @@ public class YoutrackAPI {
233 303 execute(new HttpDelete(buildURI(serviceLocationURI, "/rest/issue/" + issueId)));
234 304 }
235 305
236   - public AssigneeList getAssignees(String project) throws IOException, JAXBException
237   - {
238   - final String responseString = execute(new HttpGet(buildURI(serviceLocationURI, "/rest/admin/project/" + project + "/assignee")));
239   - final Object result = YoutrackUnmarshaller.unmarshall(responseString);
240   - if (result instanceof AssigneeList) {
241   - return (AssigneeList) result;
242   - } else {
243   - throw new YoutrackAPIException("Unexpected type: " + result);
244   - }
245   - }
246   -
247   - public Enumeration getBundle(String customField) throws IOException, JAXBException
248   - {
249   - final Object result = YoutrackUnmarshaller.unmarshall(
250   - execute(new HttpGet(buildURI(serviceLocationURI, "/rest/admin/customfield/bundle/" + customField))));
251   - if (result instanceof Enumeration) {
252   - return (Enumeration) result;
253   - } else if (result instanceof JAXBElement) {
254   - final JAXBElement jaxbElement = (JAXBElement) result;
255   - if (Enumeration_QNAME.equals(jaxbElement.getName())) {
256   - return (Enumeration) ((JAXBElement) result).getValue();
257   - } else {
258   - throw new YoutrackAPIException("Unexpected type: " + jaxbElement.getValue());
259   - }
260   - } else {
261   - throw new YoutrackAPIException("Unexpected type: " + result);
262   - }
263   - }
264   -
265   - public List<User> getIndividualAssignees(String project) throws IOException, JAXBException
  306 + public void login(String username, String password) throws IOException, JAXBException
266 307 {
267   - final String responseString = execute(new HttpGet(buildURI(serviceLocationURI, "/rest/admin/project/" + project + "/assignee/individual")));
268   - final Object result = YoutrackUnmarshaller.unmarshall(responseString);
269   - if (result instanceof UserRefs) {
270   - return ((UserRefs) result).getUsers();
271   - } else {
272   - throw new YoutrackAPIException("Unexpected type: " + result);
273   - }
  308 + final HttpPost request = new HttpPost(buildURI(serviceLocationURI, "/rest/user/login"));
  309 + request.setEntity(new UrlEncodedFormEntity(Arrays.asList(new BasicNameValuePair("login", username), new BasicNameValuePair("password", password))));
  310 + execute(request);
274 311 }
275 312
276   - public IssueWrapper getIssue(String issueId) throws IOException, JAXBException
  313 + public List<IssueWrapper> searchIssues(Object filter, Integer maxResults, Integer after) throws JAXBException, IOException
277 314 {
278   - final String responseString;
279   - try {
280   - responseString = execute(new HttpGet(buildURI(serviceLocationURI, "/rest/issue/" + issueId)));
281   - } catch (YoutrackErrorException e) {
282   - if (e.getStatusCode() == HttpStatus.SC_NOT_FOUND) {
283   - throw new NoResultFoundException(e.getMessage(), e);
284   - } else {
285   - throw e;
286   - }
  315 + final Map<String, Object> params = new HashMap<String, Object>();
  316 + params.put("filter", filter);
  317 + params.put("max", maxResults);
  318 + params.put("after", after);
  319 + final Object result = YoutrackUnmarshaller.unmarshall(execute(new HttpGet(buildURI(serviceLocationURI, "/rest/issue", params))));
  320 + if (!(result instanceof IssueCompacts)) {
  321 + throw new YoutrackAPIException("Unmarshalling problem. Expected Issues, received: " + result.getClass() + " " + result);
287 322 }
288   - final Object result = YoutrackUnmarshaller.unmarshall(responseString);
289   - if (result instanceof pl.itcrowd.youtrack.api.rest.Issue) {
290   - return new IssueWrapper((Issue) result);
291   - } else if (result instanceof JAXBElement) {
292   - final JAXBElement jaxbElement = (JAXBElement) result;
293   - if (Issue_QNAME.equals(jaxbElement.getName())) {
294   - return new IssueWrapper((Issue) jaxbElement.getValue());
295   - } else {
296   - throw new YoutrackAPIException("Unexpected type: " + jaxbElement.getValue());
297   - }
298   - } else {
299   - throw new YoutrackAPIException("Unexpected type " + result);
  323 + List<Issue> issues = ((IssueCompacts) result).getIssues();
  324 + List<IssueWrapper> wrappedIssues = new ArrayList<IssueWrapper>();
  325 + for (Issue issue : issues) {
  326 + wrappedIssues.add(new IssueWrapper(issue));
300 327 }
301   - }
302   -
303   - public void login(String username, String password) throws IOException, JAXBException
304   - {
305   - final HttpPost request = new HttpPost(buildURI(serviceLocationURI, "/rest/user/login"));
306   - request.setEntity(new UrlEncodedFormEntity(Arrays.asList(new BasicNameValuePair("login", username), new BasicNameValuePair("password", password))));
307   - execute(request);
  328 + return wrappedIssues;
308 329 }
309 330
310 331 public List<IssueWrapper> searchIssuesByProject(String project, Object filter) throws JAXBException, IOException
... ... @@ -345,7 +366,7 @@ public class YoutrackAPI {
345 366
346 367 private String execute(HttpUriRequest request) throws IOException
347 368 {
348   - request.addHeader("Accept","application/xml");
  369 + request.addHeader("Accept", "application/xml");
349 370 final HttpResponse response = httpClient.execute(request);
350 371 final StatusLine statusLine = response.getStatusLine();
351 372 final HttpEntity entity = response.getEntity();
... ...
  1 +//
  2 +// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.1-833
  3 +// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
  4 +// Any modifications to this file will be lost upon recompilation of the source schema.
  5 +//
  6 +package pl.itcrowd.youtrack.api.rest;
  7 +
  8 +import javax.xml.bind.annotation.XmlAccessType;
  9 +import javax.xml.bind.annotation.XmlAccessorType;
  10 +import javax.xml.bind.annotation.XmlElement;
  11 +import javax.xml.bind.annotation.XmlRootElement;
  12 +import javax.xml.bind.annotation.XmlType;
  13 +import java.util.ArrayList;
  14 +import java.util.List;
  15 +
  16 +/**
  17 + * <p>Java class for anonymous complex type.
  18 + * <p/>
  19 + * <p>The following schema fragment specifies the expected content contained within this class.
  20 + * <p/>
  21 + * <pre>
  22 + * &lt;complexType>
  23 + * &lt;complexContent>
  24 + * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
  25 + * &lt;sequence maxOccurs="unbounded" minOccurs="0">
  26 + * &lt;element name="issue" type="{}issueType"/>
  27 + * &lt;/sequence>
  28 + * &lt;/restriction>
  29 + * &lt;/complexContent>
  30 + * &lt;/complexType>
  31 + * </pre>
  32 + */
  33 +@XmlAccessorType(XmlAccessType.FIELD)
  34 +@XmlType(name = "", propOrder = {"issues"})
  35 +@XmlRootElement(name = "issueCompacts")
  36 +public class IssueCompacts {
  37 +
  38 + @XmlElement(name = "issue")
  39 + protected List<Issue> issues;
  40 +
  41 + /**
  42 + * Gets the value of the issues property.
  43 + * <p/>
  44 + * <p/>
  45 + * This accessor method returns a reference to the live list,
  46 + * not a snapshot. Therefore any modification you make to the
  47 + * returned list will be present inside the JAXB object.
  48 + * This is why there is not a <CODE>set</CODE> method for the issues property.
  49 + * <p/>
  50 + * <p/>
  51 + * For example, to add a new item, do as follows:
  52 + * <pre>
  53 + * getIssues().add(newItem);
  54 + * </pre>
  55 + * <p/>
  56 + * <p/>
  57 + * <p/>
  58 + * Objects of the following type(s) are allowed in the list
  59 + * {@link Issue }
  60 + */
  61 + public List<Issue> getIssues()
  62 + {
  63 + if (issues == null) {
  64 + issues = new ArrayList<Issue>();
  65 + }
  66 + return this.issues;
  67 + }
  68 +}
... ...
... ... @@ -26,22 +26,22 @@ import javax.xml.namespace.QName;
26 26 @XmlRegistry
27 27 public class ObjectFactory {
28 28
29   - private final static QName _Error_QNAME = new QName("", "error");
30   -
31   - private final static QName _Int_QNAME = new QName("", "int");
32   -
33   - private final static QName _Issue_QNAME = new QName("", "issue");
34   -
35   - private final static QName _Enumeration_QNAME = new QName("", "enumeration");
36   -
37 29 private final static QName _CommentReplies_QNAME = new QName("", "replies");
38 30
39 31 private final static QName _CommentValue_QNAME = new QName("", "value");
40 32
  33 + private final static QName _Enumeration_QNAME = new QName("", "enumeration");
  34 +
41 35 private final static QName _ErrorTypeField_QNAME = new QName("", "field");
42 36
43 37 private final static QName _ErrorTypeMessage_QNAME = new QName("", "message");
44 38
  39 + private final static QName _Error_QNAME = new QName("", "error");
  40 +
  41 + private final static QName _Int_QNAME = new QName("", "int");
  42 +
  43 + private final static QName _Issue_QNAME = new QName("", "issue");
  44 +
45 45 /**
46 46 * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: pl.itcrowd.youtrack.api.rest
47 47 */
... ... @@ -50,83 +50,86 @@ public class ObjectFactory {
50 50 }
51 51
52 52 /**
53   - * Create an instance of {@link Field }
  53 + * Create an instance of {@link AssignedByType }
54 54 */
55   - public Field createField()
  55 + public AssignedByType createAssignedByType()
56 56 {
57   - return new Field();
  57 + return new AssignedByType();
58 58 }
59 59
60 60 /**
61   - * Create an instance of {@link Enumeration }
  61 + * Create an instance of {@link AssigneeList }
62 62 */
63   - public Enumeration createEnumeration()
  63 + public AssigneeList createAssigneeList()
64 64 {
65   - return new Enumeration();
  65 + return new AssigneeList();
66 66 }
67 67
68 68 /**
69   - * Create an instance of {@link User }
  69 + * Create an instance of {@link AssigneeList.Assignees }
70 70 */
71   - public User createUser()
  71 + public AssigneeList.Assignees createAssigneeListAssignees()
72 72 {
73   - return new User();
  73 + return new AssigneeList.Assignees();
74 74 }
75 75
76 76 /**
77   - * Create an instance of {@link UserRefs }
  77 + * Create an instance of {@link AssigneeType }
78 78 */
79   - public UserRefs createUserRefs()
  79 + public AssigneeType createAssigneeType()
80 80 {
81   - return new UserRefs();
  81 + return new AssigneeType();
82 82 }
83 83
84 84 /**
85   - * Create an instance of {@link Issues }
  85 + * Create an instance of {@link Comment }
86 86 */
87   - public Issues createIssues()
  87 + public Comment createComment()
88 88 {
89   - return new Issues();
  89 + return new Comment();
90 90 }
91 91
92 92 /**
93   - * Create an instance of {@link AssigneeList }
  93 + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
94 94 */
95   - public AssigneeList createAssigneeList()
  95 + @XmlElementDecl(namespace = "", name = "replies", scope = Comment.class)
  96 + public JAXBElement<String> createCommentReplies(String value)
96 97 {
97   - return new AssigneeList();
  98 + return new JAXBElement<String>(_CommentReplies_QNAME, String.class, Comment.class, value);
98 99 }
99 100
100 101 /**
101   - * Create an instance of {@link Field.Value }
  102 + * Create an instance of {@link Comment.Value }
102 103 */
103   - public Field.Value createFieldValue()
  104 + public Comment.Value createCommentValue()
104 105 {
105   - return new Field.Value();
  106 + return new Comment.Value();
106 107 }
107 108
108 109 /**
109   - * Create an instance of {@link AssigneeType }
  110 + * Create an instance of {@link JAXBElement }{@code <}{@link Comment.Value }{@code >}}
110 111 */
111   - public AssigneeType createAssigneeType()
  112 + @XmlElementDecl(namespace = "", name = "value", scope = Comment.class)
  113 + public JAXBElement<Comment.Value> createCommentValue(Comment.Value value)
112 114 {
113   - return new AssigneeType();
  115 + return new JAXBElement<Comment.Value>(_CommentValue_QNAME, Comment.Value.class, Comment.class, value);
114 116 }
115 117
116 118 /**
117   - * Create an instance of {@link ErrorType }
  119 + * Create an instance of {@link Enumeration }
118 120 */
119   - public ErrorType createErrorType()
  121 + public Enumeration createEnumeration()
120 122 {
121   - return new ErrorType();
  123 + return new Enumeration();
122 124 }
123 125
124 126 /**
125   - * Create an instance of {@link AssignedByType }
  127 + * Create an instance of {@link JAXBElement }{@code <}{@link Enumeration }{@code >}}
126 128 */
127   - public AssignedByType createAssignedByType()
  129 + @XmlElementDecl(namespace = "", name = "enumeration")
  130 + public JAXBElement<Enumeration> createEnumeration(Enumeration value)
128 131 {
129   - return new AssignedByType();
  132 + return new JAXBElement<Enumeration>(_Enumeration_QNAME, Enumeration.class, null, value);
130 133 }
131 134
132 135 /**
... ... @@ -138,52 +141,54 @@ public class ObjectFactory {
138 141 }
139 142
140 143 /**
141   - * Create an instance of {@link AssigneeList.Assignees }
  144 + * Create an instance of {@link JAXBElement }{@code <}{@link ErrorType }{@code >}}
142 145 */
143   - public AssigneeList.Assignees createAssigneeListAssignees()
  146 + @XmlElementDecl(namespace = "", name = "error")
  147 + public JAXBElement<ErrorType> createError(ErrorType value)
144 148 {
145   - return new AssigneeList.Assignees();
  149 + return new JAXBElement<ErrorType>(_Error_QNAME, ErrorType.class, null, value);
146 150 }
147 151
148 152 /**
149   - * Create an instance of {@link UserGroupRefType }
  153 + * Create an instance of {@link ErrorType }
150 154 */
151   - public UserGroupRefType createUserGroupRefType()
  155 + public ErrorType createErrorType()
152 156 {
153   - return new UserGroupRefType();
  157 + return new ErrorType();
154 158 }
155 159
156 160 /**
157   - * Create an instance of {@link Comment }
  161 + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
158 162 */
159   - public Comment createComment()
  163 + @XmlElementDecl(namespace = "", name = "field", scope = ErrorType.class)
  164 + public JAXBElement<String> createErrorTypeField(String value)
160 165 {
161   - return new Comment();
  166 + return new JAXBElement<String>(_ErrorTypeField_QNAME, String.class, ErrorType.class, value);
162 167 }
163 168
164 169 /**
165   - * Create an instance of {@link Comment.Value }
  170 + * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
166 171 */
167   - public Comment.Value createCommentValue()
  172 + @XmlElementDecl(namespace = "", name = "message", scope = ErrorType.class)
  173 + public JAXBElement<String> createErrorTypeMessage(String value)
168 174 {
169   - return new Comment.Value();
  175 + return new JAXBElement<String>(_ErrorTypeMessage_QNAME, String.class, ErrorType.class, value);
170 176 }
171 177
172 178 /**
173   - * Create an instance of {@link Issue }
  179 + * Create an instance of {@link Field }
174 180 */
175   - public Issue createIssue()
  181 + public Field createField()
176 182 {
177   - return new Issue();
  183 + return new Field();
178 184 }
179 185
180 186 /**
181   - * Create an instance of {@link JAXBElement }{@code <}{@link ErrorType }{@code >}}
  187 + * Create an instance of {@link Field.Value }
182 188 */
183   - @XmlElementDecl(namespace = "", name = "error")
184   - public JAXBElement<ErrorType> createError(ErrorType value)
  189 + public Field.Value createFieldValue()
185 190 {
186   - return new JAXBElement<ErrorType>(_Error_QNAME, ErrorType.class, null, value);
  191 + return new Field.Value();
187 192 }
188 193
189 194 /**
... ... @@ -196,6 +201,14 @@ public class ObjectFactory {
196 201 }
197 202
198 203 /**
  204 + * Create an instance of {@link Issue }
  205 + */
  206 + public Issue createIssue()
  207 + {
  208 + return new Issue();
  209 + }
  210 +
  211 + /**
199 212 * Create an instance of {@link JAXBElement }{@code <}{@link Issue }{@code >}}
200 213 */
201 214 @XmlElementDecl(namespace = "", name = "issue")
... ... @@ -205,47 +218,42 @@ public class ObjectFactory {
205 218 }
206 219
207 220 /**
208   - * Create an instance of {@link JAXBElement }{@code <}{@link Enumeration }{@code >}}
  221 + * Create an instance of {@link IssueCompacts }
209 222 */
210   - @XmlElementDecl(namespace = "", name = "enumeration")
211   - public JAXBElement<Enumeration> createEnumeration(Enumeration value)
  223 + public IssueCompacts createIssueCompacts()
212 224 {
213   - return new JAXBElement<Enumeration>(_Enumeration_QNAME, Enumeration.class, null, value);
  225 + return new IssueCompacts();
214 226 }
215 227
216 228 /**
217   - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
  229 + * Create an instance of {@link Issues }
218 230 */
219   - @XmlElementDecl(namespace = "", name = "replies", scope = Comment.class)
220   - public JAXBElement<String> createCommentReplies(String value)
  231 + public Issues createIssues()
221 232 {
222   - return new JAXBElement<String>(_CommentReplies_QNAME, String.class, Comment.class, value);
  233 + return new Issues();
223 234 }
224 235
225 236 /**
226   - * Create an instance of {@link JAXBElement }{@code <}{@link Comment.Value }{@code >}}
  237 + * Create an instance of {@link User }
227 238 */
228   - @XmlElementDecl(namespace = "", name = "value", scope = Comment.class)
229   - public JAXBElement<Comment.Value> createCommentValue(Comment.Value value)
  239 + public User createUser()
230 240 {
231   - return new JAXBElement<Comment.Value>(_CommentValue_QNAME, Comment.Value.class, Comment.class, value);
  241 + return new User();
232 242 }
233 243
234 244 /**
235   - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
  245 + * Create an instance of {@link UserGroupRefType }
236 246 */
237   - @XmlElementDecl(namespace = "", name = "field", scope = ErrorType.class)
238   - public JAXBElement<String> createErrorTypeField(String value)
  247 + public UserGroupRefType createUserGroupRefType()
239 248 {
240   - return new JAXBElement<String>(_ErrorTypeField_QNAME, String.class, ErrorType.class, value);
  249 + return new UserGroupRefType();
241 250 }
242 251
243 252 /**
244   - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
  253 + * Create an instance of {@link UserRefs }
245 254 */
246   - @XmlElementDecl(namespace = "", name = "message", scope = ErrorType.class)
247   - public JAXBElement<String> createErrorTypeMessage(String value)
  255 + public UserRefs createUserRefs()
248 256 {
249   - return new JAXBElement<String>(_ErrorTypeMessage_QNAME, String.class, ErrorType.class, value);
  257 + return new UserRefs();
250 258 }
251 259 }
... ...
... ... @@ -9,6 +9,12 @@
9 9 </jxb:bindings>
10 10 </jxb:bindings>
11 11
  12 + <jxb:bindings schemaLocation="../xsd/issues.xsd" node="/xs:schema">
  13 + <jxb:bindings node=".//xs:element[@name='issueCompacts']//xs:sequence[@id='issues']">
  14 + <jxb:property name="issues"/>
  15 + </jxb:bindings>
  16 + </jxb:bindings>
  17 +
12 18 <jxb:bindings schemaLocation="../xsd/individualAssignees.xsd" node="/xs:schema">
13 19 <jxb:bindings node=".//xs:element[@name='userRefs']//xs:sequence[@id='users']">
14 20 <jxb:property name="users"/>
... ...
  1 +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2 +<issueCompacts>
  3 + <issue id="SM-1">
  4 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="projectShortName">
  5 + <value>SM</value>
  6 + </field>
  7 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="numberInProject">
  8 + <value>1</value>
  9 + </field>
  10 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="summary">
  11 + <value>Draw screens</value>
  12 + </field>
  13 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="description">
  14 + <value>Draw screens in Balsamiq, the online tool for drawing screen sketches. http://balsamiq.com/
  15 + As a result the screen image in PNG format and Balsamiq source in XML format are expected.
  16 + Artefacts must be delivered in form of directory structure (not in Enterprise Architect file).
  17 + Partially documented packages will not be accepted.
  18 + Sample directory structure:
  19 + + Package name (directory)
  20 + + Screen name (directory)
  21 + - Screen name.png
  22 + - Screen name.xml
  23 +
  24 + In screens include only elements specific to documented screen. Do not include stuff that will land in template.
  25 + </value>
  26 + </field>
  27 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="created">
  28 + <value>1292829185847</value>
  29 + </field>
  30 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="updated">
  31 + <value>1321871424473</value>
  32 + </field>
  33 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="updaterName">
  34 + <value>root</value>
  35 + </field>
  36 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="updaterFullName">
  37 + <value>root</value>
  38 + </field>
  39 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="resolved">
  40 + <value>1321607946298</value>
  41 + </field>
  42 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="reporterName">
  43 + <value>bernard</value>
  44 + </field>
  45 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="reporterFullName">
  46 + <value>Bernard Łabno</value>
  47 + </field>
  48 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="commentsCount">
  49 + <value>0</value>
  50 + </field>
  51 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SingleField" name="votes">
  52 + <value>0</value>
  53 + </field>
  54 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="LinkField" name="links">
  55 + <value type="Depend" role="depends on">SM-2</value>
  56 + <value type="Depend" role="depends on">SM-3</value>
  57 + <value type="Depend" role="depends on">SM-4</value>
  58 + <value type="Depend" role="depends on">SM-5</value>
  59 + <value type="Depend" role="depends on">SM-6</value>
  60 + <value type="Depend" role="depends on">SM-7</value>
  61 + <value type="Depend" role="depends on">SM-8</value>
  62 + <value type="Depend" role="depends on">SM-9</value>
  63 + <value type="Depend" role="depends on">SM-10</value>
  64 + </field>
  65 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField" name="Priority">
  66 + <value>Normal</value>
  67 + </field>
  68 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField" name="Type">
  69 + <value>Task</value>
  70 + </field>
  71 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField" name="State">
  72 + <value>Verified</value>
  73 + </field>
  74 + <field xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="CustomField" name="Environment">
  75 + <value>Beta</value>
  76 + </field>
  77 + </issue>
  78 +</issueCompacts>
\ No newline at end of file
... ...
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  3 + <xs:include schemaLocation="types.xsd"/>
  4 + <xs:element name="issueCompacts">
  5 + <xs:complexType>
  6 + <xs:sequence id="issues" minOccurs="0" maxOccurs="unbounded">
  7 + <xs:element name="issue" type="issueType"/>
  8 + </xs:sequence>
  9 + </xs:complexType>
  10 + </xs:element>
  11 +</xs:schema>
\ No newline at end of file
... ...
Please register or login to post a comment