-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #61 from diging/develop
Story/vspc 16 (#31)
- Loading branch information
Showing
47 changed files
with
1,314 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/target/ | ||
/Users/ | ||
/.settings/ | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
vspace/src/main/java/edu/asu/diging/vspace/core/data/ContentBlockRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.ContentBlock; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface ContentBlockRepository extends PagingAndSortingRepository<ContentBlock, String> { | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
vspace/src/main/java/edu/asu/diging/vspace/core/data/ImageContentBlockRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.IImageBlock; | ||
import edu.asu.diging.vspace.core.model.impl.ImageBlock; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface ImageContentBlockRepository extends PagingAndSortingRepository<ImageBlock, String> { | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
vspace/src/main/java/edu/asu/diging/vspace/core/data/SlideRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package edu.asu.diging.vspace.core.data; | ||
|
||
import java.util.List; | ||
|
||
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.Module; | ||
import edu.asu.diging.vspace.core.model.impl.Slide; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface SlideRepository extends PagingAndSortingRepository<Slide, String> { | ||
|
||
public List<Slide> findByModule(Module module); | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
vspace/src/main/java/edu/asu/diging/vspace/core/data/TextContentBlockRepository.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.TextBlock; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface TextContentBlockRepository extends PagingAndSortingRepository<TextBlock, String> { | ||
|
||
} |
36 changes: 36 additions & 0 deletions
36
vspace/src/main/java/edu/asu/diging/vspace/core/exception/ModuleDoesNotExistException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package edu.asu.diging.vspace.core.exception; | ||
|
||
public class ModuleDoesNotExistException extends Exception { | ||
|
||
/** | ||
* | ||
*/ | ||
private static final long serialVersionUID = -5831237220255515528L; | ||
|
||
public ModuleDoesNotExistException() { | ||
super(); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public ModuleDoesNotExistException(String message, Throwable cause, boolean enableSuppression, | ||
boolean writableStackTrace) { | ||
super(message, cause, enableSuppression, writableStackTrace); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public ModuleDoesNotExistException(String message, Throwable cause) { | ||
super(message, cause); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public ModuleDoesNotExistException(String message) { | ||
super(message); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
public ModuleDoesNotExistException(Throwable cause) { | ||
super(cause); | ||
// TODO Auto-generated constructor stub | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
vspace/src/main/java/edu/asu/diging/vspace/core/factory/IImageBlockFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.IImageBlock; | ||
import edu.asu.diging.vspace.core.model.ISlide; | ||
import edu.asu.diging.vspace.core.model.IVSImage; | ||
|
||
public interface IImageBlockFactory { | ||
|
||
IImageBlock createImageBlock(ISlide slide, IVSImage image); | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
vspace/src/main/java/edu/asu/diging/vspace/core/factory/ISlideFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.IModule; | ||
import edu.asu.diging.vspace.core.model.ISlide; | ||
import edu.asu.diging.vspace.web.staff.forms.SlideForm; | ||
|
||
public interface ISlideFactory { | ||
|
||
ISlide createSlide(IModule modfule, SlideForm form); | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
vspace/src/main/java/edu/asu/diging/vspace/core/factory/ITextBlockFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.ITextBlock; | ||
|
||
public interface ITextBlockFactory { | ||
|
||
ITextBlock createTextBlock(ISlide slide, String text); | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
vspace/src/main/java/edu/asu/diging/vspace/core/factory/impl/ImageBlockFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.IImageBlockFactory; | ||
import edu.asu.diging.vspace.core.model.IImageBlock; | ||
import edu.asu.diging.vspace.core.model.ISlide; | ||
import edu.asu.diging.vspace.core.model.IVSImage; | ||
import edu.asu.diging.vspace.core.model.impl.ImageBlock; | ||
|
||
@Service | ||
public class ImageBlockFactory implements IImageBlockFactory { | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see | ||
* edu.asu.diging.vspace.core.factory.impl.IImageBlockFactory#createImageBlock( | ||
* edu.asu.diging.vspace.core.model.ISlide, | ||
* edu.asu.diging.vspace.core.model.IVSImage) | ||
*/ | ||
@Override | ||
public IImageBlock createImageBlock(ISlide slide, IVSImage image) { | ||
IImageBlock imageBlock = new ImageBlock(); | ||
imageBlock.setImage(image); | ||
imageBlock.setSlide(slide); | ||
|
||
return imageBlock; | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
vspace/src/main/java/edu/asu/diging/vspace/core/factory/impl/SlideFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package edu.asu.diging.vspace.core.factory.impl; | ||
|
||
import java.util.ArrayList; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
import edu.asu.diging.vspace.core.factory.ISlideFactory; | ||
import edu.asu.diging.vspace.core.model.IContentBlock; | ||
import edu.asu.diging.vspace.core.model.IModule; | ||
import edu.asu.diging.vspace.core.model.ISlide; | ||
import edu.asu.diging.vspace.core.model.impl.Slide; | ||
import edu.asu.diging.vspace.web.staff.forms.SlideForm; | ||
|
||
@Service | ||
public class SlideFactory implements ISlideFactory { | ||
|
||
/* | ||
* (non-Javadoc) | ||
* | ||
* @see | ||
* edu.asu.diging.vspace.core.factory.impl.ISlideFactory#createSlide(java.lang. | ||
* String, java.lang.String) | ||
*/ | ||
@Override | ||
public ISlide createSlide(IModule module, SlideForm form) { | ||
ISlide slide = new Slide(); | ||
|
||
slide.setContents(new ArrayList<IContentBlock>()); | ||
slide.setName(form.getName()); | ||
slide.setDescription(form.getDescription()); | ||
slide.setModule(module); | ||
return slide; | ||
} | ||
} |
Oops, something went wrong.