[jboss-svn-commits] JBL Code SVN: r9449 - in labs/jbosslabs/trunk/portal-extensions/forge-common/src: java/org/jboss/forge/common/projects/projects and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Feb 12 07:38:51 EST 2007
Author: unibrew
Date: 2007-02-12 07:38:50 -0500 (Mon, 12 Feb 2007)
New Revision: 9449
Added:
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/ObjectFactory.java
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Project.java
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Projects.java
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/package-info.java
labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/projects.xsd
Log:
[JBLAB-832] projects.xml parser classes.
Added: labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/ObjectFactory.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/ObjectFactory.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/ObjectFactory.java 2007-02-12 12:38:50 UTC (rev 9449)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.forge.common.projects.projects;
+
+import javax.xml.bind.annotation.XmlRegistry;
+
+
+/**
+ * This object contains factory methods for each
+ * Java content interface and Java element interface
+ * generated in the org.jboss.forge.common.projects.projects package.
+ * <p>An ObjectFactory allows you to programatically
+ * construct new instances of the Java representation
+ * for XML content. The Java representation of XML
+ * content can consist of schema derived interfaces
+ * and classes representing the binding of schema
+ * type definitions, element declarations and model
+ * groups. Factory methods for each of these are
+ * provided in this class.
+ *
+ */
+ at XmlRegistry
+public class ObjectFactory {
+
+
+ /**
+ * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.jboss.forge.common.projects.projects
+ *
+ */
+ public ObjectFactory() {
+ }
+
+ /**
+ * Create an instance of {@link Project }
+ *
+ */
+ public Project createProject() {
+ return new Project();
+ }
+
+ /**
+ * Create an instance of {@link Projects }
+ *
+ */
+ public Projects createProjects() {
+ return new Projects();
+ }
+
+}
Added: labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Project.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Project.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Project.java 2007-02-12 12:38:50 UTC (rev 9449)
@@ -0,0 +1,181 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.forge.common.projects.projects;
+
+import java.io.Serializable;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ * This class describes main info about project availability,
+ * permissions, level in navigation etc.
+ * PLEASE, DO NOT MODIFY THIS CLASS UNLESS YOU KNOW JAXB.
+ * @author Ryszard Kozmik
+ *
+ *
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "project")
+public class Project
+ implements Serializable
+{
+
+ private final static long serialVersionUID = 1L;
+ @XmlAttribute(name = "edit-permission")
+ protected String editPermission;
+ @XmlAttribute(name = "info-page")
+ protected String infoPage;
+ @XmlAttribute(required = true)
+ protected String level;
+ @XmlAttribute(name = "main-page")
+ protected String mainPage;
+ @XmlAttribute
+ protected String permission;
+
+ /**
+ * Gets the value of the editPermission property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getEditPermission() {
+ return editPermission;
+ }
+
+ /**
+ * Sets the value of the editPermission property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setEditPermission(String value) {
+ this.editPermission = value;
+ }
+
+ /**
+ * Gets the value of the infoPage property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getInfoPage() {
+ return infoPage;
+ }
+
+ /**
+ * Sets the value of the infoPage property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setInfoPage(String value) {
+ this.infoPage = value;
+ }
+
+ /**
+ * Gets the value of the level property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getLevel() {
+ return level;
+ }
+
+ /**
+ * Sets the value of the level property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setLevel(String value) {
+ this.level = value;
+ }
+
+ /**
+ * Gets the value of the mainPage property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getMainPage() {
+ return mainPage;
+ }
+
+ /**
+ * Sets the value of the mainPage property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setMainPage(String value) {
+ this.mainPage = value;
+ }
+
+ /**
+ * Gets the value of the permission property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getPermission() {
+ return permission;
+ }
+
+ /**
+ * Sets the value of the permission property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setPermission(String value) {
+ this.permission = value;
+ }
+
+}
Added: labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Projects.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Projects.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/Projects.java 2007-02-12 12:38:50 UTC (rev 9449)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.forge.common.projects.projects;
+
+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.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ *
+ * Root class and a placeholder for all projects.
+ * PLEASE, DO NOT MODIFY THIS CLASS UNLESS YOU KNOW JAXB.
+ * @author Ryszard Kozmik
+ *
+ *
+ *
+ *
+ */
+ at XmlAccessorType(XmlAccessType.FIELD)
+ at XmlType(name = "", propOrder = {
+ "projects"
+})
+ at XmlRootElement(name = "projects")
+public class Projects
+ implements Serializable
+{
+
+ private final static long serialVersionUID = 1L;
+ @XmlElement(name = "project", namespace = "http://jboss.org", required = true)
+ protected List<Project> projects;
+
+ /**
+ * Gets the value of the projects 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 projects property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getProjects().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Project }
+ *
+ *
+ */
+ public List<Project> getProjects() {
+ if (projects == null) {
+ projects = new ArrayList<Project>();
+ }
+ return this.projects;
+ }
+
+}
Added: labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/package-info.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/package-info.java (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/projects/projects/package-info.java 2007-02-12 12:38:50 UTC (rev 9449)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+ at javax.xml.bind.annotation.XmlSchema(namespace = "http://jboss.org")
+package org.jboss.forge.common.projects.projects;
Added: labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/projects.xsd
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/projects.xsd (rev 0)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/web/WEB-INF/projects.xsd 2007-02-12 12:38:50 UTC (rev 9449)
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+
+<!--
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
+ targetNamespace="http://jboss.org"
+ xmlns="http://jboss.org"
+ elementFormDefault="qualified"
+ jxb:version="2.0" >
+
+<xs:annotation>
+ <xs:appinfo>
+ <jxb:globalBindings>
+ <jxb:serializable uid="1"/>
+ </jxb:globalBindings>
+ </xs:appinfo>
+</xs:annotation>
+
+<xs:element name="projects" >
+ <xs:annotation>
+ <xs:appinfo>
+ <jxb:class>
+ <jxb:javadoc>
+ Root class and a placeholder for all projects.
+ PLEASE, DO NOT MODIFY THIS CLASS UNLESS YOU KNOW JAXB.
+ @author Ryszard Kozmik
+ </jxb:javadoc>
+ </jxb:class>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="project" type="project" minOccurs="0" maxOccurs="unbounded" >
+ <xs:annotation>
+ <xs:appinfo>
+ <jxb:property name="projects"/>
+ </xs:appinfo>
+ </xs:annotation>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+ <xs:complexType name="project" >
+ <xs:annotation>
+ <xs:appinfo>
+ <jxb:class>
+ <jxb:javadoc>
+ This class describes main info about project availability,
+ permissions, level in navigation etc.
+ PLEASE, DO NOT MODIFY THIS CLASS UNLESS YOU KNOW JAXB.
+ @author Ryszard Kozmik
+ </jxb:javadoc>
+ </jxb:class>
+ </xs:appinfo>
+ </xs:annotation>
+ <xs:attribute name="level" type="xs:string" use="required" />
+ <xs:attribute name="info-page" type="xs:string" use="optional" />
+ <xs:attribute name="edit-permission" type="xs:string" use="optional" />
+ <xs:attribute name="permission" type="xs:string" use="optional" />
+ <xs:attribute name="main-page" type="xs:string" use="optional" />
+ </xs:complexType>
+
+
+</xs:schema>
\ No newline at end of file
More information about the jboss-svn-commits
mailing list