[kune-commits] r922 - in
trunk/src/main/java/org/ourproject/kune/platf: client/dto
server/state
vjrj
vjrj at ourproject.org
Wed Oct 22 14:53:35 CEST 2008
Author: vjrj
Date: 2008-10-22 14:53:33 +0200 (Wed, 22 Oct 2008)
New Revision: 922
Added:
trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateAbstractDTO.java
trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java
Modified:
trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateDTO.java
trunk/src/main/java/org/ourproject/kune/platf/server/state/StateAbstract.java
trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java
Log:
Incomplete - task Tools must me optional and User/Group creation must reflect this
Added: trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateAbstractDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateAbstractDTO.java 2008-10-22 11:44:41 UTC (rev 921)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateAbstractDTO.java 2008-10-22 12:53:33 UTC (rev 922)
@@ -0,0 +1,89 @@
+package org.ourproject.kune.platf.client.dto;
+
+import java.util.List;
+
+public abstract class StateAbstractDTO {
+
+ private AccessListsDTO accessLists;
+ private List<String> enabledTools;
+ private GroupDTO group;
+ private SocialNetworkDTO groupMembers;
+ private ParticipationDataDTO participation;
+ private UserBuddiesDataDTO userBuddies;
+ private StateToken stateToken;
+ private String title;
+ private AccessRightsDTO groupRights;
+
+ public AccessListsDTO getAccessLists() {
+ return accessLists;
+ }
+
+ public List<String> getEnabledTools() {
+ return enabledTools;
+ }
+
+ public GroupDTO getGroup() {
+ return this.group;
+ }
+
+ public SocialNetworkDTO getGroupMembers() {
+ return groupMembers;
+ }
+
+ public AccessRightsDTO getGroupRights() {
+ return groupRights;
+ }
+
+ public ParticipationDataDTO getParticipation() {
+ return participation;
+ }
+
+ public StateToken getStateToken() {
+ return stateToken;
+ }
+
+ public String getTitle() {
+ return title;
+ }
+
+ public UserBuddiesDataDTO getUserBuddies() {
+ return userBuddies;
+ }
+
+ public void setAccessLists(final AccessListsDTO accessLists) {
+ this.accessLists = accessLists;
+ }
+
+ public void setEnabledTools(List<String> enabledTools) {
+ this.enabledTools = enabledTools;
+ }
+
+ public void setGroup(final GroupDTO group) {
+ this.group = group;
+ }
+
+ public void setGroupMembers(final SocialNetworkDTO groupMembers) {
+ this.groupMembers = groupMembers;
+ }
+
+ public void setGroupRights(final AccessRightsDTO groupRights) {
+ this.groupRights = groupRights;
+ }
+
+ public void setParticipation(final ParticipationDataDTO participation) {
+ this.participation = participation;
+ }
+
+ public void setStateToken(final StateToken stateToken) {
+ this.stateToken = stateToken;
+ }
+
+ public void setTitle(final String title) {
+ this.title = title;
+ }
+
+ public void setUserBuddies(UserBuddiesDataDTO userBuddies) {
+ this.userBuddies = userBuddies;
+ }
+
+}
Added: trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java 2008-10-22 11:44:41 UTC (rev 921)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateContentDTO.java 2008-10-22 12:53:33 UTC (rev 922)
@@ -0,0 +1,32 @@
+package org.ourproject.kune.platf.client.dto;
+
+public abstract class StateContentDTO extends StateAbstractDTO {
+
+ private I18nLanguageDTO language;
+ private String toolName;
+ private String typeId;
+
+ public I18nLanguageDTO getLanguage() {
+ return language;
+ }
+
+ public String getToolName() {
+ return toolName;
+ }
+
+ public String getTypeId() {
+ return typeId;
+ }
+
+ public void setLanguage(final I18nLanguageDTO language) {
+ this.language = language;
+ }
+
+ public void setToolName(final String toolName) {
+ this.toolName = toolName;
+ }
+
+ public void setTypeId(final String typeId) {
+ this.typeId = typeId;
+ }
+}
Modified: trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateDTO.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateDTO.java 2008-10-22 11:44:41 UTC (rev 921)
+++ trunk/src/main/java/org/ourproject/kune/platf/client/dto/StateDTO.java 2008-10-22 12:53:33 UTC (rev 922)
@@ -44,38 +44,26 @@
import com.google.gwt.user.client.rpc.IsSerializable;
-public class StateDTO implements IsSerializable {
+public class StateDTO extends StateContentDTO implements IsSerializable {
private String documentId;
private int version;
private String content;
- private String title;
- private String toolName;
- private GroupDTO group;
private ContainerDTO container;
private ContainerDTO rootContainer;
private SocialNetworkDTO socialNetwork;
- private AccessListsDTO accessLists;
private AccessRightsDTO contentRights;
private AccessRightsDTO containerRights;
- private AccessRightsDTO groupRights;
private ContentStatusDTO status;
private boolean isRateable;
private Double rate;
private Integer rateByUsers;
private Double currentUserRate;
- private String typeId;
private BasicMimeTypeDTO mimeType;
private LicenseDTO license;
- private I18nLanguageDTO language;
private Date publishedOn;
private String tags;
private List<UserSimpleDTO> authors;
private List<TagResultDTO> groupTags;
- private SocialNetworkDTO groupMembers;
- private ParticipationDataDTO participation;
- private StateToken stateToken;
- private List<String> enabledTools;
- private UserBuddiesDataDTO userBuddies;
public StateDTO() {
this(null, null, null);
@@ -83,14 +71,10 @@
public StateDTO(final String docRef, final String title, final String content) {
this.documentId = docRef;
- this.title = title;
this.content = content;
+ setTitle(title);
}
- public AccessListsDTO getAccessLists() {
- return accessLists;
- }
-
public List<UserSimpleDTO> getAuthors() {
return authors;
}
@@ -119,30 +103,10 @@
return documentId;
}
- public List<String> getEnabledTools() {
- return enabledTools;
- }
-
- public GroupDTO getGroup() {
- return this.group;
- }
-
- public SocialNetworkDTO getGroupMembers() {
- return groupMembers;
- }
-
- public AccessRightsDTO getGroupRights() {
- return groupRights;
- }
-
public List<TagResultDTO> getGroupTags() {
return groupTags;
}
- public I18nLanguageDTO getLanguage() {
- return language;
- }
-
public LicenseDTO getLicense() {
return license;
}
@@ -151,10 +115,6 @@
return mimeType;
}
- public ParticipationDataDTO getParticipation() {
- return participation;
- }
-
public Date getPublishedOn() {
return publishedOn;
}
@@ -175,10 +135,6 @@
return socialNetwork;
}
- public StateToken getStateToken() {
- return stateToken;
- }
-
public ContentStatusDTO getStatus() {
return status;
}
@@ -187,22 +143,6 @@
return tags;
}
- public String getTitle() {
- return title;
- }
-
- public String getToolName() {
- return toolName;
- }
-
- public String getTypeId() {
- return typeId;
- }
-
- public UserBuddiesDataDTO getUserBuddies() {
- return userBuddies;
- }
-
public int getVersion() {
return version;
}
@@ -216,10 +156,6 @@
return isRateable;
}
- public void setAccessLists(final AccessListsDTO accessLists) {
- this.accessLists = accessLists;
- }
-
public void setAuthors(final List<UserSimpleDTO> authors) {
this.authors = authors;
}
@@ -248,30 +184,10 @@
this.documentId = docRef;
}
- public void setEnabledTools(List<String> enabledTools) {
- this.enabledTools = enabledTools;
- }
-
- public void setGroup(final GroupDTO group) {
- this.group = group;
- }
-
- public void setGroupMembers(final SocialNetworkDTO groupMembers) {
- this.groupMembers = groupMembers;
- }
-
- public void setGroupRights(final AccessRightsDTO groupRights) {
- this.groupRights = groupRights;
- }
-
public void setGroupTags(final List<TagResultDTO> groupTags) {
this.groupTags = groupTags;
}
- public void setLanguage(final I18nLanguageDTO language) {
- this.language = language;
- }
-
public void setLicense(final LicenseDTO license) {
this.license = license;
}
@@ -280,10 +196,6 @@
this.mimeType = mimeType;
}
- public void setParticipation(final ParticipationDataDTO participation) {
- this.participation = participation;
- }
-
public void setPublishedOn(final Date publishedOn) {
this.publishedOn = publishedOn;
}
@@ -308,10 +220,6 @@
this.socialNetwork = socialNetwork;
}
- public void setStateToken(final StateToken stateToken) {
- this.stateToken = stateToken;
- }
-
public void setStatus(final ContentStatusDTO status) {
this.status = status;
}
@@ -320,29 +228,13 @@
this.tags = tags;
}
- public void setTitle(final String title) {
- this.title = title;
- }
-
- public void setToolName(final String toolName) {
- this.toolName = toolName;
- }
-
- public void setTypeId(final String typeId) {
- this.typeId = typeId;
- }
-
- public void setUserBuddies(UserBuddiesDataDTO userBuddies) {
- this.userBuddies = userBuddies;
- }
-
public void setVersion(final int version) {
this.version = version;
}
@Override
public String toString() {
- return "StateDTO[" + stateToken + "/" + typeId + (mimeType != null ? "-" + mimeType : "") + "]";
+ return "StateDTO[" + getStateToken() + "/" + getTypeId() + (mimeType != null ? "-" + mimeType : "") + "]";
}
}
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/state/StateAbstract.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateAbstract.java 2008-10-22 11:44:41 UTC (rev 921)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/state/StateAbstract.java 2008-10-22 12:53:33 UTC (rev 922)
@@ -31,15 +31,15 @@
public abstract class StateAbstract {
- private String title;
+ private AccessLists accessLists;
+ private List<String> enabledTools;
private Group group;
- private AccessLists accessLists;
+ private SocialNetwork groupMembers;
private AccessRights groupRights;
- private SocialNetwork groupMembers;
- private List<String> enabledTools;
private ParticipationData participation;
private UserBuddiesData userBuddies;
private StateToken stateToken;
+ private String title;
public AccessLists getAccessLists() {
return accessLists;
Modified: trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java
===================================================================
--- trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java 2008-10-22 11:44:41 UTC (rev 921)
+++ trunk/src/main/java/org/ourproject/kune/platf/server/state/StateContent.java 2008-10-22 12:53:33 UTC (rev 922)
@@ -23,14 +23,18 @@
public abstract class StateContent extends StateAbstract {
+ private I18nLanguage language;
private String typeId;
- private I18nLanguage language;
private String toolName;
public I18nLanguage getLanguage() {
return language;
}
+ public String getToolName() {
+ return toolName;
+ }
+
public String getTypeId() {
return typeId;
}
@@ -39,16 +43,12 @@
this.language = language;
}
+ public void setToolName(final String toolName) {
+ this.toolName = toolName;
+ }
+
public void setTypeId(final String typeId) {
this.typeId = typeId;
}
- public String getToolName() {
- return toolName;
- }
-
- public void setToolName(final String toolName) {
- this.toolName = toolName;
- }
-
}
More information about the kune-commits
mailing list