Index: lams_build/lib/lams/lams.jar =================================================================== diff -u -r301bc5704aa25346bc457867daeb7cd8854cb452 -r6465a6b73b944e4d700487aa2f3d32c2498cf67b Binary files differ Index: lams_common/src/java/org/lamsfoundation/lams/workspace/dto/FolderContentDTO.java =================================================================== diff -u -r0b2737221177ec6fb88f447aa647f9413f4373f8 -r6465a6b73b944e4d700487aa2f3d32c2498cf67b --- lams_common/src/java/org/lamsfoundation/lams/workspace/dto/FolderContentDTO.java (.../FolderContentDTO.java) (revision 0b2737221177ec6fb88f447aa647f9413f4373f8) +++ lams_common/src/java/org/lamsfoundation/lams/workspace/dto/FolderContentDTO.java (.../FolderContentDTO.java) (revision 6465a6b73b944e4d700487aa2f3d32c2498cf67b) @@ -48,14 +48,16 @@ public Long resourceID; public Integer permissionCode; public Vector versionDetails; + public Long licenseID; // applicable for designs only public FolderContentDTO(){ } public FolderContentDTO(String name, String description, Date creationDateTime, Date lastModifiedDateTime, - String resourceType, Long resourceID, Integer permissionCode) { + String resourceType, Long resourceID, Integer permissionCode, + Long licenseID) { super(); this.name = name; this.description = description; @@ -64,7 +66,8 @@ this.resourceType = resourceType; this.resourceID = resourceID; this.permissionCode = permissionCode; - this.versionDetails = new Vector(); + this.licenseID = licenseID; + this.versionDetails = null; } public FolderContentDTO(LearningDesign design, Integer permissionCode){ this.name = design.getTitle(); @@ -74,7 +77,8 @@ this.resourceType = DESIGN; this.resourceID = design.getLearningDesignId(); this.permissionCode = permissionCode; - this.versionDetails = new Vector(); + this.licenseID = ( design.getLicense() != null ? design.getLicense().getLicenseID() : null); + this.versionDetails = null; } public FolderContentDTO(WorkspaceFolder workspaceFolder, Integer permissionCode){ this.name = workspaceFolder.getName(); @@ -84,7 +88,8 @@ this.resourceType = FOLDER; this.resourceID = new Long(workspaceFolder.getWorkspaceFolderId().intValue()); this.permissionCode = permissionCode; - this.versionDetails = new Vector(); + this.licenseID = null; + this.versionDetails = null; } public FolderContentDTO(Integer permissionCode, WorkspaceFolderContent workspaceFolderContent,SortedSet details){ this.name =workspaceFolderContent.getName(); @@ -97,6 +102,7 @@ this.resourceType = FILE; else this.resourceType = FOLDER; + this.licenseID = null; this.versionDetails = new Vector(); versionDetails.addAll(details); } @@ -149,4 +155,14 @@ public Vector getVersionDetails() { return versionDetails; } + + /** Get the ID of the related license. Only applicable for learning designs */ + public Long getLicenseID() { + return licenseID; + } + + /** Set the ID of the related license. Only applicable for learning designs */ + public void setLicenseID(Long licenseID) { + this.licenseID = licenseID; + } }