-
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 #304 from diging/develop
Prepare release
- Loading branch information
Showing
20 changed files
with
199 additions
and
40 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
8 changes: 8 additions & 0 deletions
8
vspace/src/main/java/edu/asu/diging/vspace/core/data/ModuleLinkRepository.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,21 @@ | ||
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 org.springframework.data.jpa.repository.Modifying; | ||
import org.springframework.data.jpa.repository.Query; | ||
|
||
import edu.asu.diging.vspace.core.model.impl.ModuleLink; | ||
import edu.asu.diging.vspace.core.model.IModuleLink; | ||
|
||
@Repository | ||
@JaversSpringDataAuditable | ||
public interface ModuleLinkRepository extends PagingAndSortingRepository<ModuleLink, String> { | ||
|
||
@Query("select moduleLink from ModuleLink moduleLink where module_id = ?1") | ||
List<IModuleLink> findModuleLinksByModuleId(String moduleId); | ||
|
||
} |
2 changes: 1 addition & 1 deletion
2
...eb/exception/ModuleNotFoundException.java → ...re/exception/ModuleNotFoundException.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
2 changes: 1 addition & 1 deletion
2
.../exception/SequenceNotFoundException.java → .../exception/SequenceNotFoundException.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
2 changes: 1 addition & 1 deletion
2
...web/exception/SlideNotFoundException.java → ...ore/exception/SlideNotFoundException.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
2 changes: 1 addition & 1 deletion
2
...on/SlidesInSequenceNotFoundException.java → ...on/SlidesInSequenceNotFoundException.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
2 changes: 1 addition & 1 deletion
2
...web/exception/SpaceNotFoundException.java → ...ore/exception/SpaceNotFoundException.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
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
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
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
37 changes: 37 additions & 0 deletions
37
vspace/src/main/java/edu/asu/diging/vspace/web/staff/DeleteModuleController.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,37 @@ | ||
package edu.asu.diging.vspace.web.staff; | ||
|
||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.ui.Model; | ||
import org.springframework.web.bind.annotation.PathVariable; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestMethod; | ||
|
||
import edu.asu.diging.vspace.core.exception.ModuleNotFoundException; | ||
import edu.asu.diging.vspace.core.services.IModuleManager; | ||
|
||
@Controller | ||
public class DeleteModuleController { | ||
|
||
private final Logger logger = LoggerFactory.getLogger(getClass()); | ||
|
||
@Autowired | ||
private IModuleManager moduleManager; | ||
|
||
@RequestMapping(value="/staff/module/{moduleId}/delete", method=RequestMethod.DELETE) | ||
public ResponseEntity<String> deleteModule(@PathVariable("moduleId") String moduleId, Model model) { | ||
try { | ||
moduleManager.deleteModule(moduleId); | ||
} catch (ModuleNotFoundException exception) { | ||
logger.error("Could not delete Module.", exception); | ||
return new ResponseEntity<String>("Sorry, unable to delete the module.", | ||
HttpStatus.NOT_FOUND); | ||
} | ||
return new ResponseEntity<String>("Ok", HttpStatus.OK); | ||
} | ||
} |
File renamed without changes.
Oops, something went wrong.