diff --git a/auth/src/main/java/edu/tamu/weaver/auth/AuthConstants.java b/auth/src/main/java/edu/tamu/weaver/auth/AuthConstants.java index ebe006f0..319867f4 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/AuthConstants.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/AuthConstants.java @@ -64,4 +64,4 @@ public class AuthConstants { } } -} \ No newline at end of file +} diff --git a/auth/src/main/java/edu/tamu/weaver/auth/config/AuthWebSecurityConfig.java b/auth/src/main/java/edu/tamu/weaver/auth/config/AuthWebSecurityConfig.java index 91557bff..720e583f 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/config/AuthWebSecurityConfig.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/config/AuthWebSecurityConfig.java @@ -60,4 +60,4 @@ protected SecurityExpressionHandler webExpressionHandler() { protected abstract String buildRoleHierarchy(); -} \ No newline at end of file +} diff --git a/auth/src/main/java/edu/tamu/weaver/auth/controller/WeaverAuthController.java b/auth/src/main/java/edu/tamu/weaver/auth/controller/WeaverAuthController.java index 7a3df0bd..b829bcd4 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/controller/WeaverAuthController.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/controller/WeaverAuthController.java @@ -24,7 +24,7 @@ public abstract class WeaverAuthController { @Autowired protected TokenService tokenService; - + @Autowired protected CryptoService cryptoService; diff --git a/auth/src/main/java/edu/tamu/weaver/auth/model/Credentials.java b/auth/src/main/java/edu/tamu/weaver/auth/model/Credentials.java index 13e21c7f..6e2abcf7 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/model/Credentials.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/model/Credentials.java @@ -8,7 +8,7 @@ /** * Credentials object. * - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff @@ -34,10 +34,10 @@ public Credentials() { /** * Constructor - * + * * @param claims * Claims - * + * */ public Credentials(Claims claims) { this(); @@ -56,10 +56,10 @@ public Credentials(Claims claims) { /** * Constructor - * + * * @param claims * Map - * + * */ public Credentials(Map claims) { this(); @@ -78,9 +78,9 @@ public Credentials(Map claims) { /** * Gets last name. - * + * * @return String - * + * */ public String getLastName() { return this.lastName; @@ -88,10 +88,10 @@ public String getLastName() { /** * Sets last name. - * + * * @param lastName * String - * + * */ public void setLastName(String lastName) { this.lastName = lastName; @@ -99,9 +99,9 @@ public void setLastName(String lastName) { /** * Gets first name. - * + * * @return String - * + * */ public String getFirstName() { return this.firstName; @@ -109,10 +109,10 @@ public String getFirstName() { /** * Sets first name. - * + * * @param firstName * String - * + * */ public void setFirstName(String firstName) { this.firstName = firstName; @@ -135,9 +135,9 @@ public void setNetid(String netid) { /** * Gets UIN. - * + * * @return String - * + * */ public String getUin() { return this.uin; @@ -145,10 +145,10 @@ public String getUin() { /** * Sets UIN. - * + * * @param uin * String - * + * */ public void setUin(String uin) { this.uin = uin; @@ -156,9 +156,9 @@ public void setUin(String uin) { /** * Gets expiration. - * + * * @return String - * + * */ public String getExp() { return this.exp; @@ -166,10 +166,10 @@ public String getExp() { /** * Sets expiration. - * + * * @param exp * String - * + * */ public void setExp(String exp) { this.exp = exp; @@ -177,9 +177,9 @@ public void setExp(String exp) { /** * Gets email. - * + * * @return String - * + * */ public String getEmail() { return this.email; @@ -187,10 +187,10 @@ public String getEmail() { /** * Sets email. - * + * * @param email * String - * + * */ public void setEmail(String email) { this.email = email; @@ -198,9 +198,9 @@ public void setEmail(String email) { /** * Gets role. - * + * * @return String - * + * */ public String getRole() { return this.role; @@ -208,10 +208,10 @@ public String getRole() { /** * Sets role. - * + * * @param role * String - * + * */ public void setRole(String role) { this.role = role; diff --git a/auth/src/main/java/edu/tamu/weaver/auth/proxy/SecurityInterceptorProxy.java b/auth/src/main/java/edu/tamu/weaver/auth/proxy/SecurityInterceptorProxy.java index c96d366d..9dc0c44b 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/proxy/SecurityInterceptorProxy.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/proxy/SecurityInterceptorProxy.java @@ -16,7 +16,7 @@ public interface SecurityInterceptorProxy { public SecurityMetadataSource getSecurityMetadataSource(); public Collection getAttributes(Object object); - + public Collection getAllAttributes(); public AccessDecision decide(Authentication authentication, Object object, Collection attributes); diff --git a/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverCredentialsArgumentResolver.java b/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverCredentialsArgumentResolver.java index a8d4d8bb..43fd2fd7 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverCredentialsArgumentResolver.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverCredentialsArgumentResolver.java @@ -32,4 +32,4 @@ public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer m return authentication.getCredentials(); } -} \ No newline at end of file +} diff --git a/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverUserArgumentResolver.java b/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverUserArgumentResolver.java index f469ca50..7da7ef32 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverUserArgumentResolver.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/resolver/WeaverUserArgumentResolver.java @@ -42,4 +42,4 @@ public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer m return user.get(); } -} \ No newline at end of file +} diff --git a/auth/src/main/java/edu/tamu/weaver/auth/service/AbstractWeaverUserDetailsService.java b/auth/src/main/java/edu/tamu/weaver/auth/service/AbstractWeaverUserDetailsService.java index 48e08349..92ed575b 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/service/AbstractWeaverUserDetailsService.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/service/AbstractWeaverUserDetailsService.java @@ -26,4 +26,4 @@ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundEx public abstract UserDetails buildUserDetails(U user); -} \ No newline at end of file +} diff --git a/auth/src/main/java/edu/tamu/weaver/auth/service/CryptoService.java b/auth/src/main/java/edu/tamu/weaver/auth/service/CryptoService.java index 1c0ed2f2..71f0620d 100644 --- a/auth/src/main/java/edu/tamu/weaver/auth/service/CryptoService.java +++ b/auth/src/main/java/edu/tamu/weaver/auth/service/CryptoService.java @@ -55,4 +55,4 @@ public boolean validatePassword(String password, String encodedPassword) { return passwordEncoder.matches(password, encodedPassword); } -} \ No newline at end of file +} diff --git a/core/pom.xml b/core/pom.xml index fc65af77..17182540 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -1,51 +1,51 @@ - - - 4.0.0 - - core - - Weaver Core - - Core for Weaver - - - edu.tamu.weaver - webservice-parent - 2.1.1-RC7 - - - - - - javax.servlet - servlet-api - 3.0-alpha-1 - provided - - - - org.springframework - spring-web - - - - org.springframework - spring-context - - - - org.springframework - spring-beans - - - - org.springframework.boot - spring-boot-starter-json - - - - - - + + + 4.0.0 + + core + + Weaver Core + + Core for Weaver + + + edu.tamu.weaver + webservice-parent + 2.1.1-RC7 + + + + + + javax.servlet + servlet-api + 3.0-alpha-1 + provided + + + + org.springframework + spring-web + + + + org.springframework + spring-context + + + + org.springframework + spring-beans + + + + org.springframework.boot + spring-boot-starter-json + + + + + + diff --git a/core/src/main/java/edu/tamu/weaver/response/ApiAction.java b/core/src/main/java/edu/tamu/weaver/response/ApiAction.java index 88730d7d..402cf461 100644 --- a/core/src/main/java/edu/tamu/weaver/response/ApiAction.java +++ b/core/src/main/java/edu/tamu/weaver/response/ApiAction.java @@ -1,7 +1,7 @@ package edu.tamu.weaver.response; /** - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff diff --git a/core/src/main/java/edu/tamu/weaver/response/ApiResponse.java b/core/src/main/java/edu/tamu/weaver/response/ApiResponse.java index f5bbb8f3..53d3172e 100644 --- a/core/src/main/java/edu/tamu/weaver/response/ApiResponse.java +++ b/core/src/main/java/edu/tamu/weaver/response/ApiResponse.java @@ -8,13 +8,13 @@ /** * Abstract class for an API response. - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff * @author Jason Savell * @author William Welling - * + * */ @JsonSerialize(using = ApiResponseSerializer.class) public class ApiResponse { @@ -95,7 +95,7 @@ public ApiResponse(String id, ApiStatus status, ApiAction action, Object... payl /** * Gets meta. - * + * * @return Meta */ public Meta getMeta() { @@ -104,7 +104,7 @@ public Meta getMeta() { /** * Gets payload. - * + * * @return HashMap */ public HashMap getPayload() { diff --git a/core/src/main/java/edu/tamu/weaver/response/ApiResponseAdvice.java b/core/src/main/java/edu/tamu/weaver/response/ApiResponseAdvice.java index cc3d6f90..004924c4 100644 --- a/core/src/main/java/edu/tamu/weaver/response/ApiResponseAdvice.java +++ b/core/src/main/java/edu/tamu/weaver/response/ApiResponseAdvice.java @@ -1,16 +1,16 @@ -package edu.tamu.weaver.response; - -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; - -@ControllerAdvice -public class ApiResponseAdvice { - - @ExceptionHandler(ApiResponseStatusException.class) - public @ResponseBody ResponseEntity handleApiResponseStatusException(ApiResponseStatusException e) { - return ResponseEntity.status(e.getStatus()).body(e.getMessage()); - } - -} +package edu.tamu.weaver.response; + +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; + +@ControllerAdvice +public class ApiResponseAdvice { + + @ExceptionHandler(ApiResponseStatusException.class) + public @ResponseBody ResponseEntity handleApiResponseStatusException(ApiResponseStatusException e) { + return ResponseEntity.status(e.getStatus()).body(e.getMessage()); + } + +} diff --git a/core/src/main/java/edu/tamu/weaver/response/ApiResponseSerializer.java b/core/src/main/java/edu/tamu/weaver/response/ApiResponseSerializer.java index f8dfa2d9..1afd64d6 100644 --- a/core/src/main/java/edu/tamu/weaver/response/ApiResponseSerializer.java +++ b/core/src/main/java/edu/tamu/weaver/response/ApiResponseSerializer.java @@ -1,62 +1,62 @@ -package edu.tamu.weaver.response; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import javax.servlet.http.HttpServletRequest; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import org.springframework.boot.jackson.JsonComponent; -import org.springframework.web.context.request.RequestAttributes; -import org.springframework.web.context.request.RequestContextHolder; -import org.springframework.web.context.request.ServletRequestAttributes; - -import edu.tamu.weaver.response.ApiResponse.Meta; - -@JsonComponent -public class ApiResponseSerializer extends JsonSerializer { - - @Override - public void serialize(ApiResponse apiResponse, JsonGenerator jgen, SerializerProvider serializers) - throws IOException { - RequestAttributes attributes = RequestContextHolder.getRequestAttributes(); - HttpServletRequest request = ((ServletRequestAttributes) attributes).getRequest(); - if (request.getHeader("x-wvr-unwrap") != null) { - - Meta meta = apiResponse.getMeta(); - String message = meta.getMessage(); - switch (meta.getStatus()) { - case ERROR: - throw new ApiResponseStatusException(message, 500); - case INVALID: - throw new ApiResponseStatusException(message, 400); - case REFRESH: - case UNAUTHORIZED: - throw new ApiResponseStatusException(message, 401); - case INFO: - case SUCCESS: - case WARNING: - default: - break; - } - - List values = new ArrayList<>(apiResponse.getPayload().values()); - if (values.size() > 1) { - jgen.writeObject(apiResponse.getPayload()); - } else if (values.size() > 0) { - jgen.writeObject(values.get(0)); - } - - } else { - jgen.writeStartObject(); - jgen.writeObjectField("meta", apiResponse.getMeta()); - jgen.writeObjectField("payload", apiResponse.getPayload()); - jgen.writeEndObject(); - } - } - -} +package edu.tamu.weaver.response; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +import org.springframework.boot.jackson.JsonComponent; +import org.springframework.web.context.request.RequestAttributes; +import org.springframework.web.context.request.RequestContextHolder; +import org.springframework.web.context.request.ServletRequestAttributes; + +import edu.tamu.weaver.response.ApiResponse.Meta; + +@JsonComponent +public class ApiResponseSerializer extends JsonSerializer { + + @Override + public void serialize(ApiResponse apiResponse, JsonGenerator jgen, SerializerProvider serializers) + throws IOException { + RequestAttributes attributes = RequestContextHolder.getRequestAttributes(); + HttpServletRequest request = ((ServletRequestAttributes) attributes).getRequest(); + if (request.getHeader("x-wvr-unwrap") != null) { + + Meta meta = apiResponse.getMeta(); + String message = meta.getMessage(); + switch (meta.getStatus()) { + case ERROR: + throw new ApiResponseStatusException(message, 500); + case INVALID: + throw new ApiResponseStatusException(message, 400); + case REFRESH: + case UNAUTHORIZED: + throw new ApiResponseStatusException(message, 401); + case INFO: + case SUCCESS: + case WARNING: + default: + break; + } + + List values = new ArrayList<>(apiResponse.getPayload().values()); + if (values.size() > 1) { + jgen.writeObject(apiResponse.getPayload()); + } else if (values.size() > 0) { + jgen.writeObject(values.get(0)); + } + + } else { + jgen.writeStartObject(); + jgen.writeObjectField("meta", apiResponse.getMeta()); + jgen.writeObjectField("payload", apiResponse.getPayload()); + jgen.writeEndObject(); + } + } + +} diff --git a/core/src/main/java/edu/tamu/weaver/response/ApiResponseStatusException.java b/core/src/main/java/edu/tamu/weaver/response/ApiResponseStatusException.java index 2b5e1835..1b875a53 100644 --- a/core/src/main/java/edu/tamu/weaver/response/ApiResponseStatusException.java +++ b/core/src/main/java/edu/tamu/weaver/response/ApiResponseStatusException.java @@ -1,20 +1,20 @@ -package edu.tamu.weaver.response; - -public class ApiResponseStatusException extends RuntimeException { - - private int status; - - public ApiResponseStatusException(String message, int status) { - super(message); - this.status = status; - } - - public int getStatus() { - return status; - } - - public void setStatus(int status) { - this.status = status; - } - -} +package edu.tamu.weaver.response; + +public class ApiResponseStatusException extends RuntimeException { + + private int status; + + public ApiResponseStatusException(String message, int status) { + super(message); + this.status = status; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + +} diff --git a/core/src/main/java/edu/tamu/weaver/response/ApiStatus.java b/core/src/main/java/edu/tamu/weaver/response/ApiStatus.java index 9493a08e..338f5afb 100644 --- a/core/src/main/java/edu/tamu/weaver/response/ApiStatus.java +++ b/core/src/main/java/edu/tamu/weaver/response/ApiStatus.java @@ -1,7 +1,7 @@ package edu.tamu.weaver.response; /** - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff diff --git a/core/src/main/java/edu/tamu/weaver/utility/AnnotationUtility.java b/core/src/main/java/edu/tamu/weaver/utility/AnnotationUtility.java index e3bb9a85..94784a0e 100644 --- a/core/src/main/java/edu/tamu/weaver/utility/AnnotationUtility.java +++ b/core/src/main/java/edu/tamu/weaver/utility/AnnotationUtility.java @@ -6,7 +6,7 @@ import org.springframework.core.annotation.AnnotationUtils; public class AnnotationUtility { - + public static T findMethodAnnotation(Class annotationClass, MethodParameter parameter) { T annotation = parameter.getParameterAnnotation(annotationClass); if (annotation != null) { diff --git a/core/src/main/java/edu/tamu/weaver/utility/HttpUtility.java b/core/src/main/java/edu/tamu/weaver/utility/HttpUtility.java index cb04b2e2..ec78306f 100644 --- a/core/src/main/java/edu/tamu/weaver/utility/HttpUtility.java +++ b/core/src/main/java/edu/tamu/weaver/utility/HttpUtility.java @@ -10,7 +10,7 @@ /** * Http Utility - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff diff --git a/data/pom.xml b/data/pom.xml index 0c0d6b35..776dabc8 100644 --- a/data/pom.xml +++ b/data/pom.xml @@ -1,53 +1,53 @@ - - - 4.0.0 - - data - - Weaver Data - - Data for Weaver - - - edu.tamu.weaver - webservice-parent - 2.1.1-RC7 - - - - - - edu.tamu.weaver - core - ${project.parent.version} - - - - org.springframework.boot - spring-boot-starter-data-jpa - - - - org.springframework.boot - spring-boot-starter-websocket - - - - org.postgresql - postgresql - - - - mysql - mysql-connector-java - - - - com.h2database - h2 - - - - - + + + 4.0.0 + + data + + Weaver Data + + Data for Weaver + + + edu.tamu.weaver + webservice-parent + 2.1.1-RC7 + + + + + + edu.tamu.weaver + core + ${project.parent.version} + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + + org.springframework.boot + spring-boot-starter-websocket + + + + org.postgresql + postgresql + + + + mysql + mysql-connector-java + + + + com.h2database + h2 + + + + + diff --git a/data/src/main/java/edu/tamu/weaver/data/config/DataConfig.java b/data/src/main/java/edu/tamu/weaver/data/config/DataConfig.java index 570d17f6..9ea15e00 100644 --- a/data/src/main/java/edu/tamu/weaver/data/config/DataConfig.java +++ b/data/src/main/java/edu/tamu/weaver/data/config/DataConfig.java @@ -22,7 +22,6 @@ public class DataConfig { @Bean public ObjectMapper objectMapper() { return JsonMapper.builder() - .enable(SerializationFeature.INDENT_OUTPUT) .enable(SerializationFeature.INDENT_OUTPUT) .enable(JsonReadFeature.ALLOW_UNESCAPED_CONTROL_CHARS) .enable(JsonReadFeature.ALLOW_BACKSLASH_ESCAPING_ANY_CHARACTER) diff --git a/data/src/main/java/edu/tamu/weaver/data/model/OrderedBaseEntity.java b/data/src/main/java/edu/tamu/weaver/data/model/OrderedBaseEntity.java index b18df43d..14b7fc58 100644 --- a/data/src/main/java/edu/tamu/weaver/data/model/OrderedBaseEntity.java +++ b/data/src/main/java/edu/tamu/weaver/data/model/OrderedBaseEntity.java @@ -1,11 +1,11 @@ -/* - * BaseOrderedEntity.java - * - * Version: - * $Id$ - * - * Revisions: - * $Log$ +/* + * BaseOrderedEntity.java + * + * Version: + * $Id$ + * + * Revisions: + * $Log$ */ package edu.tamu.weaver.data.model; diff --git a/data/src/main/java/edu/tamu/weaver/data/service/OrderedEntityService.java b/data/src/main/java/edu/tamu/weaver/data/service/OrderedEntityService.java index 639477ea..75b20a8b 100644 --- a/data/src/main/java/edu/tamu/weaver/data/service/OrderedEntityService.java +++ b/data/src/main/java/edu/tamu/weaver/data/service/OrderedEntityService.java @@ -64,7 +64,7 @@ public synchronized void reorder(Class clazz, Long src, Long dest) { } /** - * + * * @param clazz * @param src * @param dest @@ -115,11 +115,11 @@ public synchronized void sort(Class clazz, String property) { /** * SELECT * FROM ${clazz} WHERE ${whereProp} = ${whereVal} ORDER BY ${property} ASC - * + * * for every row(boe) that is of {@link OrderedBaseEntity}: - * + * * boe.setOrder(i+1) -- where i is the index of the position in the result-list from the SELECT statement above as we iterate through that list. - * + * * @param clazz * -- the entity class * @param property diff --git a/email/pom.xml b/email/pom.xml index 15bef9ad..4ffd438c 100644 --- a/email/pom.xml +++ b/email/pom.xml @@ -1,37 +1,37 @@ - - - 4.0.0 - - email - - Weaver Email - - Email for Weaver - - - edu.tamu.weaver - webservice-parent - 2.1.1-RC7 - - - - - - org.springframework - spring-context - - - - org.springframework - spring-context-support - - - - org.springframework.boot - spring-boot-starter-mail - - - - - + + + 4.0.0 + + email + + Weaver Email + + Email for Weaver + + + edu.tamu.weaver + webservice-parent + 2.1.1-RC7 + + + + + + org.springframework + spring-context + + + + org.springframework + spring-context-support + + + + org.springframework.boot + spring-boot-starter-mail + + + + + diff --git a/email/src/main/java/edu/tamu/weaver/email/service/EmailSender.java b/email/src/main/java/edu/tamu/weaver/email/service/EmailSender.java index 81d2f52d..03cd6b67 100644 --- a/email/src/main/java/edu/tamu/weaver/email/service/EmailSender.java +++ b/email/src/main/java/edu/tamu/weaver/email/service/EmailSender.java @@ -8,4 +8,4 @@ public interface EmailSender extends JavaMailSender { public void sendEmail(String to, String subject, String text) throws MessagingException; -} \ No newline at end of file +} diff --git a/email/src/main/java/edu/tamu/weaver/email/service/MockEmailService.java b/email/src/main/java/edu/tamu/weaver/email/service/MockEmailService.java index 3daa52d1..ca15739f 100644 --- a/email/src/main/java/edu/tamu/weaver/email/service/MockEmailService.java +++ b/email/src/main/java/edu/tamu/weaver/email/service/MockEmailService.java @@ -15,4 +15,4 @@ protected void doSend(MimeMessage[] mimeMessages, Object[] originalMessages) thr // set message on request to assert in unit test } -} \ No newline at end of file +} diff --git a/email/src/main/java/edu/tamu/weaver/email/service/WeaverEmailService.java b/email/src/main/java/edu/tamu/weaver/email/service/WeaverEmailService.java index adb080fb..8a462c23 100644 --- a/email/src/main/java/edu/tamu/weaver/email/service/WeaverEmailService.java +++ b/email/src/main/java/edu/tamu/weaver/email/service/WeaverEmailService.java @@ -142,4 +142,4 @@ public void sendEmail(String to, String subject, String text) throws MessagingEx send(message); } -} \ No newline at end of file +} diff --git a/messaging/pom.xml b/messaging/pom.xml index 94a43154..4e533d68 100644 --- a/messaging/pom.xml +++ b/messaging/pom.xml @@ -1,32 +1,32 @@ - - - 4.0.0 - - messaging - - Weaver Messaging - - Messaging for Weaver - - - edu.tamu.weaver - webservice-parent - 2.1.1-RC7 - - - - - - org.springframework.boot - spring-boot-starter-activemq - - - - com.fasterxml.jackson.core - jackson-databind - - - - - + + + 4.0.0 + + messaging + + Weaver Messaging + + Messaging for Weaver + + + edu.tamu.weaver + webservice-parent + 2.1.1-RC7 + + + + + + org.springframework.boot + spring-boot-starter-activemq + + + + com.fasterxml.jackson.core + jackson-databind + + + + + diff --git a/messaging/src/main/java/edu/tamu/weaver/messaging/annotation/WeaverMessageListener.java b/messaging/src/main/java/edu/tamu/weaver/messaging/annotation/WeaverMessageListener.java index 8d406eef..633eb1fd 100644 --- a/messaging/src/main/java/edu/tamu/weaver/messaging/annotation/WeaverMessageListener.java +++ b/messaging/src/main/java/edu/tamu/weaver/messaging/annotation/WeaverMessageListener.java @@ -22,4 +22,4 @@ @AliasFor(annotation = JmsListener.class, attribute = "containerFactory") String containerFactory() default ""; -} \ No newline at end of file +} diff --git a/messaging/src/main/java/edu/tamu/weaver/messaging/service/MessagingService.java b/messaging/src/main/java/edu/tamu/weaver/messaging/service/MessagingService.java index c12c36a0..f0cf1dc6 100644 --- a/messaging/src/main/java/edu/tamu/weaver/messaging/service/MessagingService.java +++ b/messaging/src/main/java/edu/tamu/weaver/messaging/service/MessagingService.java @@ -26,4 +26,4 @@ public void sendMessage(String destination, Map payload) { this.jmsTemplate.send(destination, message); } -} \ No newline at end of file +} diff --git a/pom.xml b/pom.xml index 4fd79d3b..6a8fc0f3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,149 +1,149 @@ - - - 4.0.0 - - edu.tamu.weaver - - webservice-parent - - 2.1.1-RC7 - - Weaver Webservice Parent - - Parent Freamwork for Weaver - - - core - data - - auth - token - user - validation - messaging - - token-provider - - email - reporting - wro - - - - pom - - - 11 - ${java.version} - ${java.version} - UTF-8 - 2.6.6 - - - - - - org.springframework.boot - spring-boot-dependencies - ${spring.boot.version} - pom - import - - - org.springframework.cloud - spring-cloud-dependencies - 2021.0.1 - pom - import - - - - - - - tamu-releases - https://artifacts.library.tamu.edu/repository/maven-releases/ - - - tamu-snapshots - https://artifacts.library.tamu.edu/repository/maven-snapshots/ - - - - - - - - - org.springframework.boot - spring-boot-maven-plugin - ${spring.boot.version} - - false - - - - - org.apache.maven.plugins - maven-resources-plugin - 3.2.0 - - - @ - - - - - - org.jacoco - jacoco-maven-plugin - 0.8.7 - - - default-prepare-agent - - prepare-agent - - - - report-aggregate - prepare-package - - report-aggregate - - - - - - org.eluder.coveralls - coveralls-maven-plugin - 4.3.0 - - - - ${project.basedir}/target/site/jacoco-aggregate/jacoco.xml - - - - - - - - - ${project.build.directory}/site - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 2.9 - - false - - - - - - - + + + 4.0.0 + + edu.tamu.weaver + + webservice-parent + + 2.1.1-RC7 + + Weaver Webservice Parent + + Parent Freamwork for Weaver + + + core + data + + auth + token + user + validation + messaging + + token-provider + + email + reporting + wro + + + + pom + + + 11 + ${java.version} + ${java.version} + UTF-8 + 2.6.6 + + + + + + org.springframework.boot + spring-boot-dependencies + ${spring.boot.version} + pom + import + + + org.springframework.cloud + spring-cloud-dependencies + 2021.0.1 + pom + import + + + + + + + tamu-releases + https://artifacts.library.tamu.edu/repository/maven-releases/ + + + tamu-snapshots + https://artifacts.library.tamu.edu/repository/maven-snapshots/ + + + + + + + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + false + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.2.0 + + + @ + + + + + + org.jacoco + jacoco-maven-plugin + 0.8.7 + + + default-prepare-agent + + prepare-agent + + + + report-aggregate + prepare-package + + report-aggregate + + + + + + org.eluder.coveralls + coveralls-maven-plugin + 4.3.0 + + + + ${project.basedir}/target/site/jacoco-aggregate/jacoco.xml + + + + + + + + + ${project.build.directory}/site + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 2.9 + + false + + + + + + + diff --git a/reporting/src/main/java/edu/tamu/weaver/reporting/controller/ReportingController.java b/reporting/src/main/java/edu/tamu/weaver/reporting/controller/ReportingController.java index 99b6c051..883f8d5b 100644 --- a/reporting/src/main/java/edu/tamu/weaver/reporting/controller/ReportingController.java +++ b/reporting/src/main/java/edu/tamu/weaver/reporting/controller/ReportingController.java @@ -19,7 +19,7 @@ import edu.tamu.weaver.response.ApiResponse; /** - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff diff --git a/token/pom.xml b/token/pom.xml index cb31d463..aa126248 100644 --- a/token/pom.xml +++ b/token/pom.xml @@ -1,44 +1,44 @@ - - - 4.0.0 - - token - - Weaver Token Provider - - Token Provider for Weaver - - - edu.tamu.weaver - webservice-parent - 2.1.1-RC7 - - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.springframework.security - spring-security-jwt - 1.1.1.RELEASE - - - - io.jsonwebtoken - jjwt - 0.9.1 - - - - commons-codec - commons-codec - - - - - + + + 4.0.0 + + token + + Weaver Token Provider + + Token Provider for Weaver + + + edu.tamu.weaver + webservice-parent + 2.1.1-RC7 + + + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.security + spring-security-jwt + 1.1.1.RELEASE + + + + io.jsonwebtoken + jjwt + 0.9.1 + + + + commons-codec + commons-codec + + + + + diff --git a/user/src/main/java/edu/tamu/weaver/user/model/AbstractWeaverUser.java b/user/src/main/java/edu/tamu/weaver/user/model/AbstractWeaverUser.java index c74e8f18..15a64d32 100644 --- a/user/src/main/java/edu/tamu/weaver/user/model/AbstractWeaverUser.java +++ b/user/src/main/java/edu/tamu/weaver/user/model/AbstractWeaverUser.java @@ -8,7 +8,7 @@ /** * Abstract Weaver User Implementation. - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff diff --git a/user/src/main/java/edu/tamu/weaver/user/model/WeaverRole.java b/user/src/main/java/edu/tamu/weaver/user/model/WeaverRole.java index 99025d86..2a968a6b 100644 --- a/user/src/main/java/edu/tamu/weaver/user/model/WeaverRole.java +++ b/user/src/main/java/edu/tamu/weaver/user/model/WeaverRole.java @@ -1,7 +1,7 @@ package edu.tamu.weaver.user.model; /** - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff diff --git a/user/src/main/java/edu/tamu/weaver/user/model/WeaverUser.java b/user/src/main/java/edu/tamu/weaver/user/model/WeaverUser.java index d5ac5b9e..a89381b3 100644 --- a/user/src/main/java/edu/tamu/weaver/user/model/WeaverUser.java +++ b/user/src/main/java/edu/tamu/weaver/user/model/WeaverUser.java @@ -2,7 +2,7 @@ /** * Weaver User interface. - * + * * @author Micah Cooper * @author James Creel * @author Jeremy Huff @@ -14,35 +14,35 @@ public interface WeaverUser { /** * Sets username. - * + * * @param username * String - * + * */ public void setUsername(String username); /** * Gets username. - * + * * @return String - * + * */ public String getUsername(); /** * Sets role. - * + * * @param role * String - * + * */ public void setRole(IRole role); /** * Gets role. - * + * * @return String - * + * */ public IRole getRole(); diff --git a/validation/src/main/java/edu/tamu/weaver/validation/model/ValidatingEntity.java b/validation/src/main/java/edu/tamu/weaver/validation/model/ValidatingEntity.java index 3ce2d858..9f22346e 100644 --- a/validation/src/main/java/edu/tamu/weaver/validation/model/ValidatingEntity.java +++ b/validation/src/main/java/edu/tamu/weaver/validation/model/ValidatingEntity.java @@ -10,5 +10,5 @@ public interface ValidatingEntity { public void setModelValidator(Validator modelValidator); public ValidationResults validate(U model); - + } diff --git a/validation/src/main/java/edu/tamu/weaver/validation/resolver/WeaverValidatedModelMethodProcessor.java b/validation/src/main/java/edu/tamu/weaver/validation/resolver/WeaverValidatedModelMethodProcessor.java index 684e8ab0..44c538fd 100644 --- a/validation/src/main/java/edu/tamu/weaver/validation/resolver/WeaverValidatedModelMethodProcessor.java +++ b/validation/src/main/java/edu/tamu/weaver/validation/resolver/WeaverValidatedModelMethodProcessor.java @@ -23,4 +23,4 @@ protected boolean checkRequired(MethodParameter parameter) { return (parameter.getParameterAnnotation(WeaverValidatedModel.class).required() && !parameter.isOptional()); } -} \ No newline at end of file +} diff --git a/wro/pom.xml b/wro/pom.xml index ec200f17..03bec33c 100644 --- a/wro/pom.xml +++ b/wro/pom.xml @@ -1,74 +1,74 @@ - - - 4.0.0 - - wro - - Weaver Web Resource Optimization - - Web Resource Optimization for Weaver - - - edu.tamu.weaver - webservice-parent - 2.1.1-RC7 - - - - - - - edu.tamu.weaver - data - ${project.parent.version} - - - - ro.isdc.wro4j - wro4j-core - 1.10.1 - - - commons-io - commons-io - - - - - - ro.isdc.wro4j - wro4j-extensions - 1.10.1 - - - org.codehaus.gmaven.runtime - gmaven-runtime-1.7 - - - commons-io - commons-io - - - org.webjars - webjars-locator-core - - - - - - org.webjars - webjars-locator-core - 0.50 - - - - commons-io - commons-io - 2.11.0 - - - - - + + + 4.0.0 + + wro + + Weaver Web Resource Optimization + + Web Resource Optimization for Weaver + + + edu.tamu.weaver + webservice-parent + 2.1.1-RC7 + + + + + + + edu.tamu.weaver + data + ${project.parent.version} + + + + ro.isdc.wro4j + wro4j-core + 1.10.1 + + + commons-io + commons-io + + + + + + ro.isdc.wro4j + wro4j-extensions + 1.10.1 + + + org.codehaus.gmaven.runtime + gmaven-runtime-1.7 + + + commons-io + commons-io + + + org.webjars + webjars-locator-core + + + + + + org.webjars + webjars-locator-core + 0.50 + + + + commons-io + commons-io + 2.11.0 + + + + + diff --git a/wro/src/main/java/edu/tamu/weaver/wro/config/WeaverWroConfiguration.java b/wro/src/main/java/edu/tamu/weaver/wro/config/WeaverWroConfiguration.java index 7dcafbbb..397c6695 100644 --- a/wro/src/main/java/edu/tamu/weaver/wro/config/WeaverWroConfiguration.java +++ b/wro/src/main/java/edu/tamu/weaver/wro/config/WeaverWroConfiguration.java @@ -30,19 +30,19 @@ public class WeaverWroConfiguration { private static final String[] OTHER_WRO_PROP = new String[] { ConfigurableProcessorsFactory.PARAM_PRE_PROCESSORS, ConfigurableProcessorsFactory.PARAM_POST_PROCESSORS }; private String propertyPrefix = "wro"; private String wroEndpoint = propertyPrefix; - + private ThemeManager themeManagerService; - + private ResourcePatternResolver resourcePatternResolver; - + @Value("${theme.managerService:edu.tamu.weaver.wro.service.SimpleThemeManagerService}") private String themeManagerServiceClassName; - + @Value("${theme.cssGroupName:app}") private String cssGroupName; - + private final Logger logger = LoggerFactory.getLogger(this.getClass()); - + @Bean public FilterRegistrationBean webResourceOptimizer(Environment env) { FilterRegistrationBean fr = new FilterRegistrationBean<>(); @@ -56,32 +56,32 @@ public FilterRegistrationBean webResourceOptimizer(Enviro fr.addUrlPatterns("/"+getWroEndpoint()+"/*"); return fr; } - + @Bean public ThemeManager setThemeManagerServiceBean() { - logger.debug("Creating ThemeManagerService Bean with configured class: "+themeManagerServiceClassName); - Class clazz; - try { - clazz = Class.forName(themeManagerServiceClassName); - Constructor constructor; - try { - constructor = clazz.getConstructor(); - return (ThemeManager) constructor.newInstance(); - } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { - e.printStackTrace(); - logger.error("Could not create ThemeManagerService Bean with class: "+themeManagerServiceClassName, e); - } + logger.debug("Creating ThemeManagerService Bean with configured class: "+themeManagerServiceClassName); + Class clazz; + try { + clazz = Class.forName(themeManagerServiceClassName); + Constructor constructor; + try { + constructor = clazz.getConstructor(); + return (ThemeManager) constructor.newInstance(); + } catch (NoSuchMethodException | SecurityException | InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + e.printStackTrace(); + logger.error("Could not create ThemeManagerService Bean with class: "+themeManagerServiceClassName, e); + } } catch (ClassNotFoundException e) { logger.warn("Could not find ThemeManagerService implementation class: " + themeManagerServiceClassName + "! Application must create theme manager bean!"); } - return null; + return null; } - + protected Properties buildWroProperties(Environment env) { - Properties props = buildDefaultWroProperties(env); + Properties props = buildDefaultWroProperties(env); return props; } - + private Properties buildDefaultWroProperties(Environment env) { Properties prop = new Properties(); for (ConfigConstants c : ConfigConstants.values()) { @@ -99,48 +99,48 @@ protected void addProperty(Environment env, Properties to, String name) { to.put(name, value); } } - + @Autowired @Lazy public void setThemeManagerService(ThemeManager themeManagerService) { - this.themeManagerService = themeManagerService; + this.themeManagerService = themeManagerService; } - + public ThemeManager getThemeManagerService() { - return themeManagerService; + return themeManagerService; } - + @Lazy @Autowired protected void setResourcePatternResolver(ResourcePatternResolver resourcePatternResolver) { - this.resourcePatternResolver = resourcePatternResolver; + this.resourcePatternResolver = resourcePatternResolver; } - + public ResourcePatternResolver getResourcePatternResolver() { - return resourcePatternResolver; + return resourcePatternResolver; } - + protected void setPropertyPrefix(String propertyPrefix) { - this.propertyPrefix = propertyPrefix; + this.propertyPrefix = propertyPrefix; } - + protected String getPropertyPrefix() { - return propertyPrefix; + return propertyPrefix; } - + protected void setWroEndpoint(String wroEndpoint) { - this.wroEndpoint = wroEndpoint; + this.wroEndpoint = wroEndpoint; } - + protected String getWroEndpoint() { - return wroEndpoint; + return wroEndpoint; } - + protected WroManagerFactory getWroManagerFactory(Properties properties) { - return new WeaverConfigurableWroManagerFactory(properties, getThemeManagerService(), resourcePatternResolver); + return new WeaverConfigurableWroManagerFactory(properties, getThemeManagerService(), resourcePatternResolver); } - + protected RequestHandler getRequestHandler() { - return new WeaverRequestHandler(); + return new WeaverRequestHandler(); } } diff --git a/wro/src/main/java/edu/tamu/weaver/wro/model/ThemePropertyName.java b/wro/src/main/java/edu/tamu/weaver/wro/model/ThemePropertyName.java index e8129000..3250c625 100644 --- a/wro/src/main/java/edu/tamu/weaver/wro/model/ThemePropertyName.java +++ b/wro/src/main/java/edu/tamu/weaver/wro/model/ThemePropertyName.java @@ -7,7 +7,7 @@ /** * Application ThemePropertyName entity. - * + * * @author * */ diff --git a/wro/src/main/java/edu/tamu/weaver/wro/processor/RepoPostProcessor.java b/wro/src/main/java/edu/tamu/weaver/wro/processor/RepoPostProcessor.java index 037fe1c2..4014fafb 100644 --- a/wro/src/main/java/edu/tamu/weaver/wro/processor/RepoPostProcessor.java +++ b/wro/src/main/java/edu/tamu/weaver/wro/processor/RepoPostProcessor.java @@ -31,23 +31,23 @@ public void process(final Reader reader, final Writer writer) throws IOException protected String getDynamicThemeContent() { HashMap themeProperties = (HashMap) themeManagerService.getThemeProperties(); - + StringBuilder formattedProperties = new StringBuilder(); StringBuilder formattedComments = new StringBuilder(); formattedComments.append("/* The ThemeManagerService provided the following SASS vars:\n\n"); themeProperties.forEach((f,v) -> { formattedProperties.append("$" + f + ": " + v + ";\n"); - formattedComments.append("* $" + f + ": " + v + ";\n"); + formattedComments.append("* $" + f + ": " + v + ";\n"); }); formattedComments.append("*/\n\n"+formattedProperties); return formattedComments.toString(); } - + protected ThemeManager getThemeManagerService() { return themeManagerService; } - + protected void setThemeManagerService(ThemeManager themeManagerService) { this.themeManagerService = themeManagerService; } -} \ No newline at end of file +} diff --git a/wro/src/main/java/edu/tamu/weaver/wro/service/RepoThemeManagerService.java b/wro/src/main/java/edu/tamu/weaver/wro/service/RepoThemeManagerService.java index 56039233..33b493d4 100644 --- a/wro/src/main/java/edu/tamu/weaver/wro/service/RepoThemeManagerService.java +++ b/wro/src/main/java/edu/tamu/weaver/wro/service/RepoThemeManagerService.java @@ -137,10 +137,10 @@ public void refreshCurrentTheme() { @Override public Map getThemeProperties() { - Map themeProperties = new HashMap(); + Map themeProperties = new HashMap(); if (this.getCurrentTheme() != null) { for (ThemeProperty p : this.getCurrentTheme().getThemeProperties()) { - themeProperties.put(p.getThemePropertyName().getName(),p.getValue()); + themeProperties.put(p.getThemePropertyName().getName(),p.getValue()); } } return themeProperties; diff --git a/wro/src/main/java/edu/tamu/weaver/wro/service/ThemeManager.java b/wro/src/main/java/edu/tamu/weaver/wro/service/ThemeManager.java index a77aa76b..c79becc0 100644 --- a/wro/src/main/java/edu/tamu/weaver/wro/service/ThemeManager.java +++ b/wro/src/main/java/edu/tamu/weaver/wro/service/ThemeManager.java @@ -8,12 +8,12 @@ public interface ThemeManager { * @return Map */ public Map getThemeProperties(); - + /* * Trigger a re-processing of all theme resources */ public void refreshCurrentTheme(); - + /* * Get an array of all the CSS derivable file locations * @return String[] A string array of file locations