Skip to content

Commit

Permalink
Merge pull request #437 from phuonghuynh/master
Browse files Browse the repository at this point in the history
Update changes
  • Loading branch information
phuonghuynh committed Oct 21, 2015
2 parents eb400ce + 1b01742 commit eb919a8
Show file tree
Hide file tree
Showing 112 changed files with 4,266 additions and 2,157 deletions.
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"moment": "latest",
"angular-strap": "latest",
"datetimepicker": "latest",
"angular-summernote": "latest"
"angular-summernote": "latest",
"underscore": "latest"
},
"overrides": {
"jquery": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package com.techlooper.config;

import com.couchbase.client.CouchbaseClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
import org.springframework.core.env.Environment;
import org.springframework.data.couchbase.config.AbstractCouchbaseConfiguration;
import org.springframework.data.couchbase.repository.config.EnableCouchbaseRepositories;

import javax.annotation.Resource;
import java.net.URI;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.springframework.social.github.connect.GitHubConnectionFactory;
import org.springframework.social.google.connect.GoogleConnectionFactory;
import org.springframework.social.linkedin.connect.LinkedInConnectionFactory;
import org.springframework.social.twitter.connect.TwitterConnectionFactory;

import javax.annotation.Resource;

Expand Down
6 changes: 0 additions & 6 deletions src/main/java/com/techlooper/config/web/WebConfiguration.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
package com.techlooper.config.web;

import org.apache.commons.lang.ArrayUtils;
import org.springframework.cache.CacheManager;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.env.Environment;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.*;
import org.springframework.web.servlet.resource.CachingResourceResolver;
import org.springframework.web.servlet.resource.CachingResourceTransformer;
import org.springframework.web.servlet.resource.CssLinkResourceTransformer;
import org.springframework.web.servlet.resource.GzipResourceResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,10 @@
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.web.AuthenticationEntryPoint;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import org.springframework.security.web.authentication.logout.LogoutSuccessHandler;
import org.springframework.security.web.authentication.rememberme.InMemoryTokenRepositoryImpl;
import org.springframework.security.web.authentication.rememberme.PersistentTokenRepository;

import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import com.techlooper.model.Language;
import com.techlooper.model.SocialProvider;
import com.techlooper.model.UserProfileDto;
import com.techlooper.repository.JsonConfigRepository;
import com.techlooper.service.SocialService;
import com.techlooper.service.UserService;
import com.techlooper.service.VietnamWorksUserService;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package com.techlooper.controller;

import com.techlooper.model.ChallengeCriteriaDto;
import com.techlooper.model.ChallengeRegistrantCriteriaDto;
import com.techlooper.service.ChallengeCriteriaService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
* Created by phuonghqh on 10/16/15.
*/
@RestController
public class ChallengeCriteriaController {

@Resource
private ChallengeCriteriaService challengeCriteriaService;

@PreAuthorize("hasAuthority('EMPLOYER')")
@RequestMapping(value = "challenge/criteria", method = RequestMethod.POST)
public ChallengeCriteriaDto saveChallengeCriteria(@RequestBody ChallengeCriteriaDto challengeCriteriaDto, HttpServletRequest request, HttpServletResponse response) {
ChallengeCriteriaDto result = challengeCriteriaService.saveChallengeCriteria(challengeCriteriaDto, request.getRemoteUser());
if (result == null) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
return result;
}

@PreAuthorize("hasAuthority('EMPLOYER')")
@RequestMapping(value = "challengeRegistrant/criteria", method = RequestMethod.POST)
public ChallengeRegistrantCriteriaDto saveChallengeRegistrantCriteria(@RequestBody ChallengeRegistrantCriteriaDto registrantCriteriaDto,
HttpServletRequest request, HttpServletResponse response) {
ChallengeRegistrantCriteriaDto result = challengeCriteriaService.saveScoreChallengeRegistrantCriteria(registrantCriteriaDto, request.getRemoteUser());
if (result == null) {
response.setStatus(HttpServletResponse.SC_BAD_REQUEST);
}
return result;
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import static com.techlooper.model.JobAlertEmailResultEnum.EMAIL_SENT;
import static com.techlooper.model.JobAlertEmailResultEnum.JOB_NOT_FOUND;
import static com.techlooper.model.JobAlertEmailResultEnum.SERVER_ERROR;
import static com.techlooper.model.JobAlertEmailResultEnum.*;

/**
* Job alert registration controller
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.techlooper.controller;

import com.techlooper.entity.SalaryReviewEntity;
import com.techlooper.model.JobSearchResponse;
import com.techlooper.model.VNWJobSearchRequest;
import com.techlooper.model.VNWJobSearchResponse;
import com.techlooper.model.VNWJobSearchResponseDataItem;
import com.techlooper.service.JobSearchService;
import org.dozer.Mapper;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -13,8 +11,6 @@
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Controller
public class JobSearchController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import org.springframework.messaging.handler.annotation.SendTo;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Collections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.mail.MessagingException;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.techlooper.model.SuggestionItem;
import com.techlooper.model.SuggestionResponse;
import com.techlooper.service.SuggestionService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
Expand All @@ -13,7 +12,7 @@
import java.util.List;
import java.util.stream.Collectors;

import static org.apache.commons.lang3.StringUtils.*;
import static org.apache.commons.lang3.StringUtils.trim;

@RestController
public class SuggestionController {
Expand Down
Loading

0 comments on commit eb919a8

Please sign in to comment.