labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r796104 - in /labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content: Content.java ContentCategory.java ContentImage.java
Date Tue, 21 Jul 2009 01:33:19 GMT
Author: simoneg
Date: Tue Jul 21 01:33:19 2009
New Revision: 796104

URL: http://svn.apache.org/viewvc?rev=796104&view=rev
Log:
LABS-393 : missing Apache headers

Modified:
    labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/Content.java
    labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentCategory.java
    labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentImage.java

Modified: labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/Content.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/Content.java?rev=796104&r1=796103&r2=796104&view=diff
==============================================================================
--- labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/Content.java
(original)
+++ labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/Content.java
Tue Jul 21 01:33:19 2009
@@ -1,3 +1,19 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.magma.domain.content;
 
 import java.util.Date;

Modified: labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentCategory.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentCategory.java?rev=796104&r1=796103&r2=796104&view=diff
==============================================================================
--- labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentCategory.java
(original)
+++ labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentCategory.java
Tue Jul 21 01:33:19 2009
@@ -1,78 +1,94 @@
-package org.apache.magma.domain.content;
-
-
-import java.util.List;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.OneToMany;
-
-import org.apache.magma.beans.MagmaBean;
-import org.apache.magma.database.Database;
-import org.apache.magma.validation.validators.Length;
-import org.apache.magma.validation.validators.Required;
-import org.apache.magma.view.Listed;
-import org.apache.magma.view.Order;
-import org.apache.magma.view.View;
-
-@MagmaBean
-@Entity
-public class ContentCategory {
-	private long id;
-	private String name;
-	private List<Content> contents;
-	private List<ContentImage> images;
-	
-	@Id
-	@GeneratedValue
-	public long getId() {
-		return id;
-	}
-	protected void setId(long id) {
-		this.id = id;
-	}
-	
-	@View
-	@Order(1)
-	@Listed
-	@Required
-	@Length(min=2, max=50)
-	public String getName() {
-		return name;
-	}
-	public void setName(String name) {
-		this.name = name;
-	}
-	
-	@OneToMany
-	public List<Content> getContents() {
-		return contents;
-	}
-	public void setContents(List<Content> contents) {
-		this.contents = contents;
-	}
-	
-	@OneToMany
-	public List<ContentImage> getImages() {
-		return images;
-	}
-	public void setImages(List<ContentImage> images) {
-		this.images = images;
-	}
-	
-	public static ContentCategory byName(String name) {
-		Database db = new Database();
-		List<ContentCategory> result = db.query(ContentCategory.class, 0, 1, "where x.name=?1",
name);
-		if (result.size() == 0) return null;
-		return result.get(0);
-	}
-	
-	public String toUser() {
-		StringBuilder sb = new StringBuilder();
-		if (this.name != null) sb.append(this.name);
-		return sb.toString();	
-	}
-	
-
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.magma.domain.content;
+
+
+import java.util.List;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.OneToMany;
+
+import org.apache.magma.beans.MagmaBean;
+import org.apache.magma.database.Database;
+import org.apache.magma.validation.validators.Length;
+import org.apache.magma.validation.validators.Required;
+import org.apache.magma.view.Listed;
+import org.apache.magma.view.Order;
+import org.apache.magma.view.View;
+
+@MagmaBean
+@Entity
+public class ContentCategory {
+	private long id;
+	private String name;
+	private List<Content> contents;
+	private List<ContentImage> images;
+	
+	@Id
+	@GeneratedValue
+	public long getId() {
+		return id;
+	}
+	protected void setId(long id) {
+		this.id = id;
+	}
+	
+	@View
+	@Order(1)
+	@Listed
+	@Required
+	@Length(min=2, max=50)
+	public String getName() {
+		return name;
+	}
+	public void setName(String name) {
+		this.name = name;
+	}
+	
+	@OneToMany
+	public List<Content> getContents() {
+		return contents;
+	}
+	public void setContents(List<Content> contents) {
+		this.contents = contents;
+	}
+	
+	@OneToMany
+	public List<ContentImage> getImages() {
+		return images;
+	}
+	public void setImages(List<ContentImage> images) {
+		this.images = images;
+	}
+	
+	public static ContentCategory byName(String name) {
+		Database db = new Database();
+		List<ContentCategory> result = db.query(ContentCategory.class, 0, 1, "where x.name=?1",
name);
+		if (result.size() == 0) return null;
+		return result.get(0);
+	}
+	
+	public String toUser() {
+		StringBuilder sb = new StringBuilder();
+		if (this.name != null) sb.append(this.name);
+		return sb.toString();	
+	}
+	
+
+}

Modified: labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentImage.java
URL: http://svn.apache.org/viewvc/labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentImage.java?rev=796104&r1=796103&r2=796104&view=diff
==============================================================================
--- labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentImage.java
(original)
+++ labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/ContentImage.java
Tue Jul 21 01:33:19 2009
@@ -1,122 +1,138 @@
-package org.apache.magma.domain.content;
-
-import java.io.InputStream;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-
-
-import org.apache.magma.beans.MagmaBean;
-import org.apache.magma.i18n.Format;
-
-import org.apache.magma.validation.validators.Length;
-import org.apache.magma.validation.validators.Required;
-import org.apache.magma.view.ListOrder;
-import org.apache.magma.view.Listed;
-import org.apache.magma.view.Order;
-import org.apache.magma.view.Side;
-import org.apache.magma.view.View;
-import org.apache.magma.view.Zone;
-import org.apache.openjpa.persistence.Persistent;
-
-@Entity
-@MagmaBean
-public class ContentImage{
-	private long id;
-	private ContentCategory category;
-	private String title;
-	private Date date = new Date();
-	private boolean archived;
-	private String link = new String("http://");
-	private InputStream image;	
-	private boolean uploadedImage;
-	
-	@Id
-	@GeneratedValue
-	public long getId() {
-		return id;
-	}
-	protected void setId(long id) {
-		this.id = id;
-	}
-	
-	@ManyToOne
-	@View
-	@Order(1)
-	@Listed
-	@ListOrder(3)
-	@Required
-	public ContentCategory getCategory() {
-		return category;
-	}
-	public void setCategory(ContentCategory category) {
-		this.category = category;
-	}
-	
-	@View
-	@Order(2)
-	@Listed
-	@ListOrder(1)
-	@Length(min=2, max=50)
-	public String getTitle() {
-		return title;
-	}
-	public void setTitle(String title) {
-		this.title = title;
-	}
-	
-	@View
-	@Zone(side=Side.OutsideRight, of="archived")
-	@Listed
-	@ListOrder(2)
-	@Format(format="short,short")
-	public Date getDate() {
-		return date;
-	}
-	public void setDate(Date date) {
-		this.date = date;
-	}
-	
-	@View
-	@Order(3)
-	public String getLink() {
-		return link;
-	}
-	public void setLink(String link) {
-		this.link = link;
-	}	
-	
-	@Persistent
-	@Column(length=10485760)
-	public InputStream getImage() {
-		return image;
-	}
-	public void setImage(InputStream image) {
-		this.image = image;
-	}
-	
-	public boolean isUploadedImage() {
-		return uploadedImage;
-	}
-	public void setUploadedImage(boolean uploadedImage) {
-		this.uploadedImage = uploadedImage;
-	}
-	
-	@View
-	@Order(4)
-	public boolean isArchived() {
-		return archived;
-	}
-	public void setArchived(boolean archived) {
-		this.archived = archived;
-	}
-	public String toUser() {
-		StringBuilder sb = new StringBuilder();
-		if (this.title != null) sb.append(this.title);
-		return sb.toString();	
-	}
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * 
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.magma.domain.content;
+
+import java.io.InputStream;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+
+import org.apache.magma.beans.MagmaBean;
+import org.apache.magma.i18n.Format;
+
+import org.apache.magma.validation.validators.Length;
+import org.apache.magma.validation.validators.Required;
+import org.apache.magma.view.ListOrder;
+import org.apache.magma.view.Listed;
+import org.apache.magma.view.Order;
+import org.apache.magma.view.Side;
+import org.apache.magma.view.View;
+import org.apache.magma.view.Zone;
+import org.apache.openjpa.persistence.Persistent;
+
+@Entity
+@MagmaBean
+public class ContentImage{
+	private long id;
+	private ContentCategory category;
+	private String title;
+	private Date date = new Date();
+	private boolean archived;
+	private String link = new String("http://");
+	private InputStream image;	
+	private boolean uploadedImage;
+	
+	@Id
+	@GeneratedValue
+	public long getId() {
+		return id;
+	}
+	protected void setId(long id) {
+		this.id = id;
+	}
+	
+	@ManyToOne
+	@View
+	@Order(1)
+	@Listed
+	@ListOrder(3)
+	@Required
+	public ContentCategory getCategory() {
+		return category;
+	}
+	public void setCategory(ContentCategory category) {
+		this.category = category;
+	}
+	
+	@View
+	@Order(2)
+	@Listed
+	@ListOrder(1)
+	@Length(min=2, max=50)
+	public String getTitle() {
+		return title;
+	}
+	public void setTitle(String title) {
+		this.title = title;
+	}
+	
+	@View
+	@Zone(side=Side.OutsideRight, of="archived")
+	@Listed
+	@ListOrder(2)
+	@Format(format="short,short")
+	public Date getDate() {
+		return date;
+	}
+	public void setDate(Date date) {
+		this.date = date;
+	}
+	
+	@View
+	@Order(3)
+	public String getLink() {
+		return link;
+	}
+	public void setLink(String link) {
+		this.link = link;
+	}	
+	
+	@Persistent
+	@Column(length=10485760)
+	public InputStream getImage() {
+		return image;
+	}
+	public void setImage(InputStream image) {
+		this.image = image;
+	}
+	
+	public boolean isUploadedImage() {
+		return uploadedImage;
+	}
+	public void setUploadedImage(boolean uploadedImage) {
+		this.uploadedImage = uploadedImage;
+	}
+	
+	@View
+	@Order(4)
+	public boolean isArchived() {
+		return archived;
+	}
+	public void setArchived(boolean archived) {
+		this.archived = archived;
+	}
+	public String toUser() {
+		StringBuilder sb = new StringBuilder();
+		if (this.title != null) sb.append(this.title);
+		return sb.toString();	
+	}
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message