labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simo...@apache.org
Subject svn commit: r763258 - in /labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content: Attachment.java Content.java WithAttachments.java
Date Wed, 08 Apr 2009 14:48:09 GMT
Author: simoneg
Date: Wed Apr  8 14:48:09 2009
New Revision: 763258

URL: http://svn.apache.org/viewvc?rev=763258&view=rev
Log:
Removed attachment stuff cause it does not belong here

Removed:
    labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/Attachment.java
    labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/WithAttachments.java
Modified:
    labs/magma/trunk/fragment-content-domain/src/main/java/org/apache/magma/domain/content/Content.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=763258&r1=763257&r2=763258&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
Wed Apr  8 14:48:09 2009
@@ -1,117 +1,108 @@
-package org.apache.magma.domain.content;
-
-import java.util.Date;
-import java.util.List;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-
-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.validation.validators.RichText;
-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;
-
-@Entity
-@MagmaBean
-public class Content {
-	private long id;
-	private ContentCategory category;
-	private String title;
-	private String content;
-	private Date date = new Date();
-	private boolean archived;
-	private List<Attachment> attachments;
-	
-	@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)
-	@Required
-	@Column(length=50000)
-	@Length(min=2, max=50000)
-	@RichText(permitScripts=false)
-	public String getContent() {
-		return content;
-	}
-	public void setContent(String content) {
-		this.content = content;
-	}
-	
-	@OneToMany(cascade=CascadeType.ALL)	
-	public List<Attachment> getAttachments() {
-		return attachments;
-	}
-	public void setAttachments(List<Attachment> attachments) {
-		this.attachments = attachments;
-	}
-	
-	@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();	
-	}
-}
+package org.apache.magma.domain.content;
+
+import java.util.Date;
+import java.util.List;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+import javax.persistence.OneToMany;
+
+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.validation.validators.RichText;
+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;
+
+@Entity
+@MagmaBean
+public class Content {
+	private long id;
+	private ContentCategory category;
+	private String title;
+	private String content;
+	private Date date = new Date();
+	private boolean archived;	
+	
+	@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)
+	@Required
+	@Column(length=50000)
+	@Length(min=2, max=50000)
+	@RichText(permitScripts=false)
+	public String getContent() {
+		return content;
+	}
+	public void setContent(String content) {
+		this.content = content;
+	}
+	
+	@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