[jboss-svn-commits] JBL Code SVN: r7855 - in labs/jbosslabs/trunk/portal-extensions/forge-common/src: java/org/jboss/forge/common/projects/project web/WEB-INF
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Nov 27 15:42:23 EST 2006
Author: unibrew
Date: 2006-11-27 15:42:20 -0500 (Mon, 27 Nov 2006)
New Revision: 7855
Modified:
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/project/Polls.java
labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/project.xsd
Log:
[JBLAB] Small repair to project.xml parsers responsible for Polls.
Modified: labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/project/Polls.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/project/Polls.java 2006-11-27 17:58:05 UTC (rev 7854)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/project/Polls.java 2006-11-27 20:42:20 UTC (rev 7855)
@@ -23,8 +23,11 @@
package org.jboss.forge.common.projects.project;
import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
@@ -40,37 +43,43 @@
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "polls", propOrder = {
- "poll"
+ "polls"
})
public class Polls
implements Serializable
{
private final static long serialVersionUID = 1L;
- protected Poll poll;
+ @XmlElement(name = "poll")
+ protected List<Poll> polls;
/**
- * Gets the value of the poll property.
+ * Gets the value of the polls property.
*
- * @return
- * possible object is
- * {@link Poll }
- *
- */
- public Poll getPoll() {
- return poll;
- }
-
- /**
- * Sets the value of the poll property.
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the polls property.
*
- * @param value
- * allowed object is
- * {@link Poll }
- *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getPolls().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Poll }
+ *
+ *
*/
- public void setPoll(Poll value) {
- this.poll = value;
+ public List<Poll> getPolls() {
+ if (polls == null) {
+ polls = new ArrayList<Poll>();
+ }
+ return this.polls;
}
}
Modified: labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/project.xsd
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/project.xsd 2006-11-27 17:58:05 UTC (rev 7854)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/project.xsd 2006-11-27 20:42:20 UTC (rev 7855)
@@ -481,7 +481,13 @@
</xs:appinfo>
</xs:annotation>
<xs:sequence>
- <xs:element name="poll" minOccurs="0" maxOccurs="1" type="poll" />
+ <xs:element name="poll" minOccurs="0" maxOccurs="unbounded" type="poll" >
+ <xs:annotation>
+ <xs:appinfo>
+ <jxb:property name="polls"/>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
</xs:sequence>
</xs:complexType>
More information about the jboss-svn-commits
mailing list