Skip to content

Commit

Permalink
Story/vspc 115 (#193)
Browse files Browse the repository at this point in the history
* [VSPC-120] CSS changes

* [VSPC-120] Changes for thymeleaf to setupComplete.jsp.

* [VSPC-120] Navbar css changes and module links

* [VSPC-120] Changed passwordChange.jsp to thymeleaf

* [VSPC-120]Migrating register.jsp to thymeleaf

* [VSPC-120]Migrating resetPassword and resetRequestSent to Thymeleaf.

* [VSPC-120] Changes to setup and setupComplete pages

* [VSPC-120]Exhibition module link display

* [VSPC-120] Changes to load module and space links load

* [VSPC-12] migration to thymeleaf

* [VSPC-120] Migrated badrequest.jsp to thymeleaf

* [VSPC-120] Migrated maintenance.jsp to thymeleaf

* [VSPC-120] fixed module links modal

* [VSPC-120] COmpleted module.jsp

* [VSPC-120] Completed the changes for setup and setupComplete pages.

* [VSPC-120]Fixing next previous icons and repetitive slide title

* [VSPc-120] CSS changes on space.jsp

* [VSPC-120] Minor Thymeleaf changes

* [VSPC-120] Setup and setupcomplete style changes

* [VSPC-120] Staff side main file and navbar

* [VSPC-120]Dashboard initial layout

* [VSPC-120] Started migration of edit.jsp

* [VSPC-120] changed formatting

* [VSPC-120]deleting dashboardlist and adding dashboard.html

* [VSPC-120]Dashboard style changes and adding fragment for dashboard menu

* [VSPC-120]modulelist and module jsp to thymeleaf

* [VSPC-120] Started migration of image.jsp

* [VSPC-120] Changes to add and edit in staff side spaces folder.

* [VSPC-120] Changing to bootstrap 4.1.2

* [VSPC-120] Fixing side menu for spaces and modules add

* [VSPC-120] Dashboard changes with respect to new bootstrap style used

* [VSPC-120] User list

* [VSPC-120] Module file changes for thymeleaf

* [VSPC-120] Migrated image.jsp to thymeleaf

* [VSPC-120] Migrated spacelist.jsp and fixed userlist loading

* [VSPC-120]BranchingPoint and slidesInSequence Load to thymeleaf

* [VSPC-120]Add module to thymeleaf

* [VSPC-120]staff sequence add jsp to thymeleaf

* [VSPC-120] Modified controllers

* [VSPC-120] Started migration of imagelist.jsp

* [VSPC-120]Adding delete modal for slides in for module.html

* [VSPC-120] Migrated exhibit folder

* [VSPC-120] Migration of Javascript code to thymeleaf

* [VSPC-120]Add and show slide content thymeleaf

* [VSPC-120] shifted h1 tag

* [VSPC-120] Migrated scattered files and modified controllers.

* [VSPC-120] Slide add and slide content to thymeleaf

* [VSPC-120]Adding lists contains function and replacing data-feather tags

* [VSPC-120]Fixing users list load problems

* [VSPC-120]Fixng list load and delete modal for spacelist.html

* [VSPC-120] Space.html added for thymeleaf migration.

* [VSPC-120]Migrating imagelist to thymeleaf

* [VSPC-120] Exhibition config

* [VSPC-120] staff space loads but ajax urls don't work.

* [VSPC-120]Resolving conflicts

* [VSPC-120]image load and migration to thymeleaf

* [VSPC-120]Edit image html load and migration to thymeleaf

* [VSPC-120]staff space migration to thymeleaf

* [VSPC-120] Fixing links for delete space and updating required flags

* [VSPC-120] added badrequest in views

* [VSPC-120] Minor changes

* [VSPC-120]space to thymeleaf

* [VSPC-120]Add Space multipart csrf token fix

* [VSPC-120] Add space to thymeleaf image list fix

* [VSPC-120] Edit.html for staff spaces complete,change in slides edit
page

* [VSPC-120]Fixing overlapping of submit button space on edit icon

* [VSPC-120]Adding footer to the staff screens

* [VSPC-120] Changed navbar and sidenav

* [VSPC-120]Changes for register user and exhibit space sideNav fix

* [VSPC-120] Adding background to sidenav bar

* [VSPC-120] Fixing codefactor issues

* [VSPC-138] Dashboard main content and footer

* [VSPC-120]Removing .project

* [VSPC-120] Trying to undo formating for pom.xml

* [VSPC-120]changing encoding

* [VSPC-120] changed file endings to Unix

* [VSPC-138] Completed dashboard and config page

* [VSPC-120] Changed markdown text to rendered in public module page.

* [VSPC-120]Fixing Line endings

* [VSPC-120] Fixing code factor warning

* [VSPC-120] Fixing edit space button click issue

* [VSPC-120]Deleting deleteModal as the file is not being used

* [VSPC-120] spaceList icons for unpublished spaces and incoming links

* [VSPC-138] Staff: Space page

* [VSPC-120] Trying to fix indentation

* [VSPC-120] Trying to fix pom.xml indentation

* [VSPC-120] Trying to revert .project changes and pom indentation

* [VSPC-120]Fixing indentation

* Delete .project

deleting .project file

* [VSPC-120] .classpath line endings

* [VSPC-120] Deleting servlet-context.xml

* [VSPC-138] Completed top level pages

* [VSCP-138] Staff: Space page WIP

* [VSPC-115] Added block for adding video to slides page. Also merged with
VSPC-120.

* [VSPC-120]Removing console logs and fixing line ending

* [VSPC-138] Staff: Main space page, changing link modals

* [VSPC-120]Converting line endings to Unix

* [VSPC-120] Fixing length zero no unit code factor.

* [VSPC-138] Staff: main space > create link popups

* [VSPC-120]Setting char encoding for template and view resolver

* [VSPC-120] Review comments UI changes

* [VSPC-138] Main module page & Sequences

* [VSPC-120] UI fixes with respect to review comments

* [VSPC-120] Adding space edit icon

* [VSPC-138] Sequences

* [VSPC-138] Fixed merge conflicts

* [VSPC-115] Incomplete changes for ajax calls in video addition to slides

* [VSPC-120] UI changes to for review comments.

* [VSPC-120]Fixing button colors, paddings and other UI issues

* [VSPC-120] Changing link colors

* [VSPC-138] Completed Sequences Page, working on Slides

* [VSPC-120]Fixing icon alignments

* [VSPC-120] Trying to fix some failing spaces in new layout

* [VSPC-120] Fixing codefactor length zero unit

* [VSPC-120] Fixing 0 length codefactor

* [VSPC-120]link null checks

* [VSPC-120]deleting line to check the problem

* [VSPC-120] reverting changes made to test the code.

* [VSPC-120] Checking null target space

* [VSPC-138] Lots of CSS changes

* [VSPC-120] Space not loading issue

* [VSPC-120]Space load issue fix 1

* [VSPC-120]Added script for sortable and code to fix selectable slides

* [VSPC-138] Staff> Slides page

* [VSPC-120]Fix for edit sequences

* [VSPC-120] Edit sequence final fixes

* [VSPC-120] Button size and color and branching choices select fixes

* [VSPC-120]fixing visibility of info icon and module type dropdown

* Revert "Merge branch 'story/VSPC-120' into VSPC-138"

This reverts commit aeab0ec, reversing
changes made to 9cff0b8.

* [VSPC-138] Preparing for merge with 120

* [VSPC-120] Edit slide fixes and style fixes

* [VSPC-120] Public site style fixes with respect to nav-bar

* [VSPC-120] Space exhibition fix

* [VSPC-120] Length zero code factor fixex

* [VSPC-120] New layout fixes with respect to review comments

* [VSPC-115] Changes to videoCOntroller for uploaded files and video url.

* [VSPC-120] UI fixes and additions from old layout.

* [VSPC-120]Fix for overflowing text space between grid elements

* [VSPC-120] trying to fix width and fit content.

* [VSPC-120]Fixing styles for smaller screens

* [VSPC-120]Adding slide button to modules page

* [VSSPC-115] Adding functionality for ediing videos added.

* [VSPC-120]Fixing Slide Text, Image and Choice blocks and exhibition
styles

* [VSPC-120] Text div styles

* [VSPC-120]Exhibition and sequence links on choice content block

* [VSPC-115] Changes to edit functionality for videos on slides.

* [VSPC-120]Fixes for adding new space and delete slide

* [VSPC-120]Space list and SpaceImageList fix

* [VSPC-120] Slide edit and image size fix

* [VSPC-120]Changes to show sequences and addressing other review comments

* [VSPC-115] Added delete functionality and changes to edit functionality.

* [VSPC-120] Removed nullpointer error when no exhibition is setup.

* [VSPC-120] Fixed error when no startSpace is set for exhibition.

* [VSPC-120] Fixing edit text block and branching point title on slides

* [VSPC-120] Removing console logs and fixing link color in list.

* [VSPC-120] Deleting jsp files and tiles_defs config file

* [VSPC-115] Fixed minor bugs and added only one form of video insertion.

* [VSPC-115] Formatting changes.

* [VSPC-120]Changing line endings to UNIX.

* [VSPC-115] Changes based on review comments.

* [VSPC-115] Changes based on review comments.

* [VSPC-115] Changes based on review comments.

* [VSPC-115] Changes to formatting and review comments.

* [VSPC-115] Formatting changes for slides.html.

* [VSPC-115] Added test cases for videoFactory class.

* [VSPC-115] Merged with develop branch.

* [VSPC-115] Merged with develop branch.

* [VSPC-115] Test cases for VideoBlockFactory class.

* [VSPC-115] Code claning and readability changes.

* [VSPC-115] Comments for IVSMedia class.

* [VSPC-115] Changes as per review comments.

* [VSPC-115] Added few fixes after merge

* [VSPC-115] Added few fixes after merge.

* [VSPC-115] Changes to public page to add title

* [VSPC-115] Added codeFactor fixes.

* [VSPC-115] Added indentation fix to ImageAPIController

* [VSPC-115] implemented the changes as suggested in PR review comments

* [VSPC-115] fixed codefactor issue

* [VSPC-115] implemented changes as suggested in PR review comments

* [VSPC-115] done some CSS changes so that UI look compatible with the existing UI

* [VSPC-115] added unit test cases

* [VSPC-115] implemented the changes as suggested in the PR review comments

* [VSPC-115] fixed aindentation issue along with fixed the issue regarding embedding mov file

* [VSPC-115] fixed indentation issue

* [VSPC-115] indentation fix

* [VSPC-115] indentation fix

* [VSPC-115] indentation fix

* [VSPC-115] changed the note to upload certain types opf videos only

* [VSPC-115] removed one semicolon

* [VSPC-115] added the backend code to update only the video title

* [VSPC-115] video title now can be edited

* [VSPC-115] console.log removed

* [VSPC-115] implemented the changes as suggested in the PR review comments

* [VSPC-115] updated the button name while editing the video block

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] testing in staging server

* [VSPC-115] impleted the changes so that the issue while deleteing and editing video will not take place

* [VSPC-115] Made minor review comment related changes

* [VSPC-115] Added one test case for video upload scenario

* [VSPC-115] Added missing test cases

* [VSPC-115] changed indentation

* [VSPC-115] removed null check

* [VSPC-115] line endings

* [VSPC-115] changed to LF

* [VSPC-115] Updated CR LF to LF

* [VSPC-115] removed unused import

---------

Co-authored-by: adhvikmadhav <[email protected]>
Co-authored-by: skhar <skhar@DESKTOP-94NFI4U>
Co-authored-by: ashmichheda <[email protected]>
Co-authored-by: Prashant Ravindra Jadhav <[email protected]>
Co-authored-by: Prashant Ravindra Jadhav <[email protected]>
Co-authored-by: skhar <skhar@DESKTOP-66MU1OA>
Co-authored-by: AvirupBiswas <[email protected]>
Co-authored-by: Tushar Anand <[email protected]>
  • Loading branch information
9 people authored Feb 14, 2023
1 parent 8f6a3d7 commit 3a14c10
Show file tree
Hide file tree
Showing 34 changed files with 1,665 additions and 151 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package edu.asu.diging.vspace.core.data;

import org.javers.spring.annotation.JaversSpringDataAuditable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import edu.asu.diging.vspace.core.model.impl.VideoBlock;

@Repository
@JaversSpringDataAuditable
public interface VideoContentBlockRepository extends PagingAndSortingRepository<VideoBlock, String> {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package edu.asu.diging.vspace.core.data;

import org.javers.spring.annotation.JaversSpringDataAuditable;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;

import edu.asu.diging.vspace.core.model.impl.VSVideo;

@Repository
@JaversSpringDataAuditable
public interface VideoRepository extends PagingAndSortingRepository<VSVideo, String> {

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package edu.asu.diging.vspace.core.exception;

public class VideoCouldNotBeStoredException extends Exception {

/**
*
*/
private static final long serialVersionUID = 1L;

public VideoCouldNotBeStoredException() {
super();
}

public VideoCouldNotBeStoredException(String message, Throwable cause, boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}

public VideoCouldNotBeStoredException(String message, Throwable cause) {
super(message, cause);
}

public VideoCouldNotBeStoredException(String message) {
super(message);
}

public VideoCouldNotBeStoredException(Throwable cause) {
super(cause);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package edu.asu.diging.vspace.core.factory;

import edu.asu.diging.vspace.core.model.ISlide;
import edu.asu.diging.vspace.core.model.IVSVideo;
import edu.asu.diging.vspace.core.model.IVideoBlock;

public interface IVideoBlockFactory {

IVideoBlock createVideoBlock(ISlide slide, IVSVideo video);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package edu.asu.diging.vspace.core.factory;

import edu.asu.diging.vspace.core.model.IVSVideo;

public interface IVideoFactory {

IVSVideo createVideo(String filename, Long size, String fileType);

IVSVideo createVideo(String url);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package edu.asu.diging.vspace.core.factory.impl;

import org.springframework.stereotype.Service;

import edu.asu.diging.vspace.core.factory.IVideoBlockFactory;
import edu.asu.diging.vspace.core.model.ISlide;
import edu.asu.diging.vspace.core.model.IVSVideo;
import edu.asu.diging.vspace.core.model.IVideoBlock;
import edu.asu.diging.vspace.core.model.impl.VideoBlock;

@Service
public class VideoBlockFactory implements IVideoBlockFactory {

/*
* (non-Javadoc)
*
* @see
* edu.asu.diging.vspace.core.factory.impl.IVideoBlockFactory#createVideoBlock(
* edu.asu.diging.vspace.core.model.ISlide,
* edu.asu.diging.vspace.core.model.IVSVideo)
*/
@Override
public IVideoBlock createVideoBlock(ISlide slide, IVSVideo video) {
IVideoBlock videoBlock = new VideoBlock();
videoBlock.setVideo(video);
videoBlock.setSlide(slide);

return videoBlock;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
package edu.asu.diging.vspace.core.factory.impl;

import org.springframework.stereotype.Service;

import edu.asu.diging.vspace.core.factory.IVideoFactory;
import edu.asu.diging.vspace.core.model.IVSVideo;
import edu.asu.diging.vspace.core.model.impl.VSVideo;

/**
* @author skhar
*
*/
@Service
public class VideoFactory implements IVideoFactory {

/*
* (non-Javadoc)
*
* @see
* edu.asu.diging.vspace.core.factory.impl.IImageFactory#createImage(java.lang.
* String, java.lang.String)
*/
@Override
public IVSVideo createVideo(String filename, Long size, String fileType) {
IVSVideo video = new VSVideo();
video.setFilename(filename);
video.setFileSize(size);
video.setFileType(fileType);
return video;
}

public IVSVideo createVideo(String url) {
IVSVideo video = new VSVideo();
video.setUrl(url);
return video;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

public interface IStorageEngine {

String storeFile(byte[] fileContent, String filename, String directory) throws FileStorageException;
String storeFile(byte[] fileContent, String filename, String directory) throws FileStorageException;

byte[] getImageContent(String directory, String filename) throws IOException;
byte[] getMediaContent(String directory, String filename) throws IOException;

boolean renameImage(IVSImage image, String newFileName);
boolean renameImage(IVSImage image, String newFileName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public String storeFile(byte[] fileContent, String filename, String directory) t
}

@Override
public byte[] getImageContent(String directory, String filename) throws IOException {
public byte[] getMediaContent(String directory, String filename) throws IOException {
File fileObject = new File(path + File.separator + directory + File.separator + filename);
URLConnection con = fileObject.toURI().toURL().openConnection();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,7 @@

import java.util.List;

public interface IVSImage extends IVSpaceElement {

String getFilename();

void setFilename(String filename);

String getParentPath();

void setParentPath(String parentPath);

void setFileType(String fileType);

String getFileType();

void setWidth(int width);

int getWidth();

void setHeight(int height);

int getHeight();
public interface IVSImage extends IVSMedia {

void setCategories(List<ImageCategory> categories);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package edu.asu.diging.vspace.core.model;

/**
* @author skhar
*
*IVSMedia is a class to hold common settings for Media classes
*IVSVideo and IVSImage classes.
*/
public interface IVSMedia extends IVSpaceElement{

String getFilename();

void setFilename(String filename);

String getParentPath();

void setParentPath(String parentPath);

void setFileType(String fileType);

String getFileType();

void setWidth(int width);

int getWidth();

void setHeight(int height);

int getHeight();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package edu.asu.diging.vspace.core.model;

public interface IVSVideo extends IVSMedia {

void setFileSize(Long fileSize);

Long getFileSize();

public String getUrl();

public void setUrl(String url);

public void setTitle(String title);

public String getTitle();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package edu.asu.diging.vspace.core.model;

public interface IVideoBlock extends IContentBlock {

void setVideo(IVSVideo video);

IVSVideo getVideo();

void setId(String id);

String getId();

}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.OneToMany;

import org.hibernate.annotations.GenericGenerator;
Expand All @@ -19,22 +18,13 @@
import edu.asu.diging.vspace.core.model.ImageCategory;

@Entity
public class VSImage extends VSpaceElement implements IVSImage {
public class VSImage extends VSMedia implements IVSImage {

@Id
@GeneratedValue(generator = "image_id_generator")
@GenericGenerator(name = "image_id_generator", parameters = @Parameter(name = "prefix", value = "IMG"), strategy = "edu.asu.diging.vspace.core.data.IdGenerator")
private String id;

@Lob
private String filename;
@Lob
private String parentPath;
private String fileType;

private int height;
private int width;

@OneToMany(targetEntity = Tag.class)
private List<ITag> tags;

Expand Down Expand Up @@ -62,77 +52,6 @@ public void setId(String id) {
this.id = id;
}

/*
* (non-Javadoc)
*
* @see edu.asu.diging.vspace.core.model.impl.IImage#getFilename()
*/
@Override
public String getFilename() {
return filename;
}

/*
* (non-Javadoc)
*
* @see
* edu.asu.diging.vspace.core.model.impl.IImage#setFilename(java.lang.String)
*/
@Override
public void setFilename(String filename) {
this.filename = filename;
}

/*
* (non-Javadoc)
*
* @see edu.asu.diging.vspace.core.model.impl.IImage#getParentPath()
*/
@Override
public String getParentPath() {
return parentPath;
}

/*
* (non-Javadoc)
*
* @see
* edu.asu.diging.vspace.core.model.impl.IImage#setParentPath(java.lang.String)
*/
@Override
public void setParentPath(String parentPath) {
this.parentPath = parentPath;
}

@Override
public String getFileType() {
return fileType;
}

@Override
public void setFileType(String fileType) {
this.fileType = fileType;
}

@Override
public int getHeight() {
return height;
}

@Override
public void setHeight(int height) {
this.height = height;
}

@Override
public int getWidth() {
return width;
}

@Override
public void setWidth(int width) {
this.width = width;
}

@Override
public List<ITag> getTags() {
Expand Down
Loading

0 comments on commit 3a14c10

Please sign in to comment.