[jboss-svn-commits] JBL Code SVN: r18184 - in labs/jbosslabs/labs-3.0-build: services/project-service/src/main/resources/META-INF and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Jan 29 06:55:05 EST 2008
Author: wrzep
Date: 2008-01-29 06:55:05 -0500 (Tue, 29 Jan 2008)
New Revision: 18184
Added:
labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Username.java
Removed:
labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectMembership.java
labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectRole.java
labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/User.java
Modified:
labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ContributorAgreement.java
labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Project.java
labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/SignedContributorAgreement.java
labs/jbosslabs/labs-3.0-build/services/project-service/src/main/resources/META-INF/persistence.xml
Log:
JBLAB-904 removing user data and roles (handled in the creditental service)
Modified: labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ContributorAgreement.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ContributorAgreement.java 2008-01-29 11:08:54 UTC (rev 18183)
+++ labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ContributorAgreement.java 2008-01-29 11:55:05 UTC (rev 18184)
@@ -1,17 +1,10 @@
package org.jboss.labs.core.model;
+import javax.persistence.*;
import java.io.Serializable;
-
import java.util.List;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToMany;
-import javax.persistence.OneToMany;
-import javax.persistence.Version;
-
@Entity
public class ContributorAgreement implements Serializable {
@Id @GeneratedValue
@@ -23,7 +16,7 @@
@ManyToMany(mappedBy = "requiredContributorAgreementList")
private List<Project> projectList;
@ManyToMany(mappedBy = "signedContributorAgreementList")
- private List<User> usersList;
+ private List<Username> usersList;
private boolean visible;
@OneToMany(mappedBy = "contributorAgreement")
@@ -64,11 +57,11 @@
return url;
}
- public List<User> getUsersList() {
+ public List<Username> getUsersList() {
return usersList;
}
- public void setUsersList(List<User> userList) {
+ public void setUsersList(List<Username> userList) {
this.usersList = userList;
}
Modified: labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Project.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Project.java 2008-01-29 11:08:54 UTC (rev 18183)
+++ labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Project.java 2008-01-29 11:55:05 UTC (rev 18184)
@@ -31,8 +31,6 @@
private List<License> licenseList;
@ManyToMany(cascade = CascadeType.PERSIST)
private List<ContributorAgreement> requiredContributorAgreementList;
- @OneToMany(mappedBy = "project", cascade = CascadeType.PERSIST)
- private List<ProjectMembership> projectMembershipList;
@OneToMany(cascade = CascadeType.PERSIST)
private List<Link> linkList;
@OneToMany(mappedBy = "project", cascade = CascadeType.PERSIST)
@@ -45,10 +43,11 @@
private Forum userForum;
@OneToOne(cascade = CascadeType.PERSIST)
private Blog mainBlog;
- @OneToMany(cascade = CascadeType.PERSIST)
- private List<ProjectRole> projectRoleList;
+ @ManyToMany(cascade = CascadeType.PERSIST)
+ private List<Username> contributors;
+ @ManyToMany(cascade = CascadeType.PERSIST)
+ private List<Username> projectLeads;
-
public Project() {
}
@@ -140,24 +139,6 @@
this.licenseList = licenseList;
}
- public List<ContributorAgreement> getRequiredContributorAgreementsList() {
- return requiredContributorAgreementList;
- }
-
- public void setRequiredContributorAgreementsList(List<ContributorAgreement> contributorAgreementList) {
- this.requiredContributorAgreementList = contributorAgreementList;
- }
-
-
- public List<ProjectMembership> getProjectMembershipList() {
- return projectMembershipList;
- }
-
- public void setProjectMembershipList(List<ProjectMembership> projectMembershipList) {
- this.projectMembershipList = projectMembershipList;
- }
-
-
public List<Link> getLinkList() {
return linkList;
}
@@ -228,15 +209,30 @@
return description;
}
+ public List<ContributorAgreement> getRequiredContributorAgreementList() {
+ return requiredContributorAgreementList;
+ }
- public List<ProjectRole> getProjectRoleList() {
- return projectRoleList;
+ public void setRequiredContributorAgreementList(List<ContributorAgreement> requiredContributorAgreementList) {
+ this.requiredContributorAgreementList = requiredContributorAgreementList;
}
- public void setProjectRoleList(List<ProjectRole> projectRoleList) {
- this.projectRoleList = projectRoleList;
+ public List<Username> getContributors() {
+ return contributors;
}
-
+
+ public void setContributors(List<Username> contributors) {
+ this.contributors = contributors;
+ }
+
+ public List<Username> getProjectLeads() {
+ return projectLeads;
+ }
+
+ public void setProjectLeads(List<Username> projectLeads) {
+ this.projectLeads = projectLeads;
+ }
+
@Transient
public String getOhlohURL() {
return null; //TODO
Deleted: labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectMembership.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectMembership.java 2008-01-29 11:08:54 UTC (rev 18183)
+++ labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectMembership.java 2008-01-29 11:55:05 UTC (rev 18184)
@@ -1,60 +0,0 @@
-package org.jboss.labs.core.model;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToMany;
-import javax.persistence.ManyToOne;
-import javax.persistence.Version;
-
- at Entity
-public class ProjectMembership implements Serializable {
- @Id @GeneratedValue
- private Integer id;
- @Version
- private Integer version;
-
- @ManyToOne
- private Project project;
- @ManyToMany
- private List<ProjectRole> projectRoleList;
-
- public ProjectMembership() {
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getVersion() {
- return version;
- }
-
- public void setVersion(Integer version) {
- this.version = version;
- }
-
- public Project getProject() {
- return project;
- }
-
- public void setProject(Project project) {
- this.project = project;
- }
-
- public List<ProjectRole> getProjectRoleList() {
- return projectRoleList;
- }
-
- public void setProjectRoleList(List<ProjectRole> projectRoleList) {
- this.projectRoleList = projectRoleList;
- }
-}
Deleted: labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectRole.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectRole.java 2008-01-29 11:08:54 UTC (rev 18183)
+++ labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/ProjectRole.java 2008-01-29 11:55:05 UTC (rev 18184)
@@ -1,62 +0,0 @@
-package org.jboss.labs.core.model;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToMany;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.Version;
-
-
- at Entity
-public class ProjectRole implements Serializable {
- @Id @GeneratedValue
- private Integer id;
- @Version
- private Integer version;
-
- private String name;
- @ManyToMany(mappedBy = "projectRoleList")
- private List<ProjectMembership> projectMembershipList;
-
- public ProjectRole() {
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getVersion() {
- return version;
- }
-
- public void setVersion(Integer version) {
- this.version = version;
- }
-
- public void setName(String newname) {
- this.name = newname;
- }
-
- public String getName() {
- return name;
- }
-
-
- public List<ProjectMembership> getProjectMembershipList() {
- return projectMembershipList;
- }
-
- public void setProjectMembershipList(List<ProjectMembership> projectMembershipList) {
- this.projectMembershipList = projectMembershipList;
- }
-}
Modified: labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/SignedContributorAgreement.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/SignedContributorAgreement.java 2008-01-29 11:08:54 UTC (rev 18183)
+++ labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/SignedContributorAgreement.java 2008-01-29 11:55:05 UTC (rev 18184)
@@ -1,15 +1,10 @@
package org.jboss.labs.core.model;
-import java.io.Serializable;
-
-import java.util.List;
-
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
import javax.persistence.Version;
-
+import java.io.Serializable;
import java.util.Calendar;
@@ -22,7 +17,7 @@
private Calendar date;
@ManyToOne
- private User user;
+ private Username username;
@ManyToOne
private ContributorAgreement contributorAgreement;
@@ -53,13 +48,12 @@
return date;
}
-
- public User getUser() {
- return user;
+ public Username getUsername() {
+ return username;
}
- public void setUser(User user) {
- this.user = user;
+ public void setUsername(Username user) {
+ this.username = user;
}
public ContributorAgreement getContributorAgreement() {
Deleted: labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/User.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/User.java 2008-01-29 11:08:54 UTC (rev 18183)
+++ labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/User.java 2008-01-29 11:55:05 UTC (rev 18184)
@@ -1,109 +0,0 @@
-package org.jboss.labs.core.model;
-
-import java.io.Serializable;
-
-import java.util.List;
-
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.ManyToMany;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
-import javax.persistence.Version;
-
-
- at Entity
-public class User implements Serializable {
- @Id @GeneratedValue
- private Integer id;
- @Version
- private Integer version;
-
- private String username;
- private String name;
- private String bio;
- private String website;
- private String pictureURL;
- @OneToMany
- private List<ProjectMembership> projectMembershipsList;
- @OneToMany
- private List<SignedContributorAgreement> signedContributorAgreementList;
-
- public User() {
- }
-
- public Integer getId() {
- return id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public Integer getVersion() {
- return version;
- }
-
- public void setVersion(Integer version) {
- this.version = version;
- }
-
- public void setUsername(String newusername) {
- this.username = newusername;
- }
-
- public String getUsername() {
- return username;
- }
-
- public void setName(String newname) {
- this.name = newname;
- }
-
- public String getName() {
- return name;
- }
-
- public void setBio(String newbio) {
- this.bio = newbio;
- }
-
- public String getBio() {
- return bio;
- }
-
- public void setWebsite(String newwebsite) {
- this.website = newwebsite;
- }
-
- public String getWebsite() {
- return website;
- }
-
- public void setPictureURL(String newpictureURL) {
- this.pictureURL = newpictureURL;
- }
-
- public String getPictureURL() {
- return pictureURL;
- }
-
-
- public List<ProjectMembership> getProjectMembershipsList() {
- return projectMembershipsList;
- }
-
- public void setProjectMembershipsList(List<ProjectMembership> projectMembershipList) {
- this.projectMembershipsList = projectMembershipList;
- }
-
-
- public List<SignedContributorAgreement> getSignedContributorAgreementList() {
- return signedContributorAgreementList;
- }
-
- public void setSignedContributorAgreementList(List<SignedContributorAgreement> signedContributorAgreementList) {
- this.signedContributorAgreementList = signedContributorAgreementList;
- }
-}
Added: labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Username.java
===================================================================
--- labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Username.java (rev 0)
+++ labs/jbosslabs/labs-3.0-build/core/core-model/src/main/java/org/jboss/labs/core/model/Username.java 2008-01-29 11:55:05 UTC (rev 18184)
@@ -0,0 +1,79 @@
+package org.jboss.labs.core.model;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.List;
+
+
+ at Entity
+public class Username implements Serializable {
+
+ private static final long serialVersionUID = -1485659168716900814L;
+
+ @Id @GeneratedValue
+ private Integer id;
+ @Version
+ private Integer version;
+
+ private String username;
+
+ @ManyToMany(mappedBy = "contributors")
+ private List<Project> projects;
+
+ @ManyToMany(mappedBy = "projectLeads")
+ private List<Project> leadProjects;
+
+ @OneToMany
+ private List<SignedContributorAgreement> signedContributorAgreementList;
+
+ public Username() {
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public Integer getVersion() {
+ return version;
+ }
+
+ public void setVersion(Integer version) {
+ this.version = version;
+ }
+
+ public void setUsername(String newusername) {
+ this.username = newusername;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public List<SignedContributorAgreement> getSignedContributorAgreementList() {
+ return signedContributorAgreementList;
+ }
+
+ public void setSignedContributorAgreementList(List<SignedContributorAgreement> signedContributorAgreementList) {
+ this.signedContributorAgreementList = signedContributorAgreementList;
+ }
+
+ public List<Project> getProjects() {
+ return projects;
+ }
+
+ public void setProjects(List<Project> projects) {
+ this.projects = projects;
+ }
+
+ public List<Project> getLeadProjects() {
+ return leadProjects;
+ }
+
+ public void setLeadProjects(List<Project> leadProjects) {
+ this.leadProjects = leadProjects;
+ }
+}
Modified: labs/jbosslabs/labs-3.0-build/services/project-service/src/main/resources/META-INF/persistence.xml
===================================================================
--- labs/jbosslabs/labs-3.0-build/services/project-service/src/main/resources/META-INF/persistence.xml 2008-01-29 11:08:54 UTC (rev 18183)
+++ labs/jbosslabs/labs-3.0-build/services/project-service/src/main/resources/META-INF/persistence.xml 2008-01-29 11:55:05 UTC (rev 18184)
@@ -14,13 +14,11 @@
<class>org.jboss.labs.core.model.License</class>
<class>org.jboss.labs.core.model.Link</class>
<class>org.jboss.labs.core.model.Project</class>
- <class>org.jboss.labs.core.model.ProjectMembership</class>
- <class>org.jboss.labs.core.model.ProjectRole</class>
<class>org.jboss.labs.core.model.Release</class>
<class>org.jboss.labs.core.model.ReleaseCategory</class>
<class>org.jboss.labs.core.model.Repository</class>
<class>org.jboss.labs.core.model.SignedContributorAgreement</class>
- <class>org.jboss.labs.core.model.User</class>
+ <class>org.jboss.labs.core.model.Username</class>
</persistence-unit>
</persistence>
More information about the jboss-svn-commits
mailing list