-
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 #200 from diging/develop
Prepare release
- Loading branch information
Showing
264 changed files
with
11,783 additions
and
12,877 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,24 @@ | ||
# Guidelines for Pull Requests | ||
|
||
If you haven't yet read our code review guidelines, please do so, You can find them [here](https://diging.atlassian.net/wiki/spaces/DIGING/pages/2256076801/Code+Review+Guidelines). | ||
|
||
Please confirm the following by adding an x for each item (turn `[ ]` into `[x]`). | ||
|
||
- [ ] I have removed all code style changes that are not necessary (e.g. changing blanks across the whole file that don’t need to be changed, adding empty lines in parts other than your own code) | ||
- [ ] I am not making any changes to files that don’t have any effect (e.g. imports added that don’t need to be added) | ||
- [ ] I do not have any sysout statements in my code or commented out code that isn’t needed anymore | ||
- [ ] I am not reformatting any files in the wrong format or without cause. | ||
- [ ] I am not changing file encoding or line endings to something else than UTF-8, LF | ||
- [ ] My pull request does not show an insane amount of files being changed although my ticket only requires a few files being changed | ||
- [ ] I have added Javadoc/documentation where appropriate | ||
- [ ] I have added test cases where appropriate | ||
- [ ] I have explained any part of my code/implementation decisions that is not be self-explanatory | ||
|
||
## Please provide a brief description of your ticket | ||
(you can copy the ticket if it hasn't changed) | ||
|
||
...Put description here... | ||
|
||
## Anything else the reviewer needs to know? | ||
|
||
... describe here ... |
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
37 changes: 37 additions & 0 deletions
37
vspace/src/main/java/edu/asu/diging/simpleusers/web/admin/ListUsersController.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.simpleusers.web.admin; | ||
|
||
import javax.servlet.http.HttpServletRequest; | ||
import javax.servlet.http.HttpServletResponse; | ||
|
||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.stereotype.Controller; | ||
import org.springframework.web.servlet.ModelAndView; | ||
import org.springframework.web.servlet.mvc.AbstractController; | ||
|
||
import edu.asu.diging.simpleusers.core.config.ConfigurationProvider; | ||
import edu.asu.diging.simpleusers.core.service.IUserManager; | ||
import edu.asu.diging.vspace.core.services.IExhibitionManager; | ||
|
||
@Controller | ||
public class ListUsersController extends AbstractController { | ||
|
||
public final static String REQUEST_MAPPING_PATH = "list"; | ||
|
||
@Autowired | ||
private ConfigurationProvider configProvider; | ||
|
||
@Autowired | ||
private IUserManager userManager; | ||
|
||
@Autowired | ||
private IExhibitionManager exhibitionManager; | ||
|
||
@Override | ||
protected ModelAndView handleRequestInternal(HttpServletRequest arg0, HttpServletResponse arg1) throws Exception { | ||
ModelAndView model = new ModelAndView(); | ||
model.addObject("users", userManager.findAll()); | ||
model.addObject("exhibition",exhibitionManager.getStartExhibition()); | ||
model.setViewName(configProvider.getUserListView()); | ||
return model; | ||
} | ||
} |
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
14 changes: 14 additions & 0 deletions
14
vspace/src/main/java/edu/asu/diging/vspace/config/ServletConfig.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.config; | ||
|
||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; | ||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; | ||
|
||
@Configuration | ||
public class ServletConfig implements WebMvcConfigurer{ | ||
|
||
@Override | ||
public void addResourceHandlers(ResourceHandlerRegistry registry) { | ||
registry.addResourceHandler("/resources/**").addResourceLocations("/resources/"); | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
vspace/src/main/java/edu/asu/diging/vspace/config/ThymeleafConfig.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,64 @@ | ||
package edu.asu.diging.vspace.config; | ||
import java.nio.charset.Charset; | ||
|
||
import org.apache.commons.io.Charsets; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.context.ApplicationContext; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.thymeleaf.extras.springsecurity5.dialect.SpringSecurityDialect; | ||
import org.thymeleaf.spring5.SpringTemplateEngine; | ||
import org.thymeleaf.spring5.templateresolver.SpringResourceTemplateResolver; | ||
import org.thymeleaf.spring5.view.ThymeleafViewResolver; | ||
import org.thymeleaf.templatemode.TemplateMode; | ||
|
||
import nz.net.ultraq.thymeleaf.LayoutDialect; | ||
|
||
@Configuration | ||
public class ThymeleafConfig { | ||
|
||
@Autowired | ||
private ApplicationContext applicationContext; | ||
|
||
@Bean | ||
public SpringResourceTemplateResolver templateResolver() { | ||
// SpringResourceTemplateResolver automatically integrates with Spring's own | ||
// resource resolution infrastructure, which is highly recommended. | ||
SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver(); | ||
templateResolver.setApplicationContext(this.applicationContext); | ||
templateResolver.setCharacterEncoding(Charset.defaultCharset().toString()); | ||
templateResolver.setPrefix("/WEB-INF/views/"); | ||
templateResolver.setSuffix(".html"); | ||
// HTML is the default value, added here for the sake of clarity. | ||
templateResolver.setTemplateMode(TemplateMode.HTML); | ||
// Template cache is true by default. Set to false if you want | ||
// templates to be automatically updated when modified. | ||
templateResolver.setCacheable(false); | ||
return templateResolver; | ||
} | ||
|
||
@Bean | ||
public SpringTemplateEngine templateEngine() { | ||
// SpringTemplateEngine automatically applies SpringStandardDialect and | ||
// enables Spring's own MessageSource message resolution mechanisms. | ||
SpringTemplateEngine templateEngine = new SpringTemplateEngine(); | ||
templateEngine.setTemplateResolver(templateResolver()); | ||
// Enabling the SpringEL compiler with Spring 4.2.4 or newer can | ||
// speed up execution in most scenarios, but might be incompatible | ||
// with specific cases when expressions in one template are reused | ||
// across different data types, so this flag is "false" by default | ||
// for safer backwards compatibility. | ||
templateEngine.setEnableSpringELCompiler(true); | ||
templateEngine.addDialect(new LayoutDialect()); | ||
templateEngine.addDialect(new SpringSecurityDialect()); | ||
return templateEngine; | ||
} | ||
|
||
@Bean | ||
public ThymeleafViewResolver viewResolver() { | ||
ThymeleafViewResolver viewResolver = new ThymeleafViewResolver(); | ||
viewResolver.setTemplateEngine(templateEngine()); | ||
viewResolver.setCharacterEncoding(Charset.defaultCharset().toString()); | ||
return viewResolver; | ||
} | ||
} |
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
Oops, something went wrong.