diff --git a/curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java b/curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java index ef85ce3..758f662 100644 --- a/curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java +++ b/curriculumsearch/src/main/java/com/roshka/CurriculumsearchApplication.java @@ -1,10 +1,5 @@ package com.roshka; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.List; - import com.fasterxml.jackson.core.JsonParseException; import com.fasterxml.jackson.core.type.TypeReference; import com.fasterxml.jackson.databind.JsonMappingException; @@ -12,7 +7,6 @@ import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.type.TypeFactory; import com.roshka.modelo.*; import com.roshka.repositorio.*; - import org.hibernate.PersistentObjectException; import org.springframework.boot.CommandLineRunner; import org.springframework.boot.SpringApplication; @@ -23,6 +17,11 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + @SpringBootApplication @EnableJpaRepositories("com.roshka.repositorio") @EntityScan("com.roshka.modelo") diff --git a/curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java b/curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java index 9ecf6e9..7516c30 100644 --- a/curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java +++ b/curriculumsearch/src/main/java/com/roshka/DTO/PostulanteListaDTO.java @@ -1,11 +1,11 @@ package com.roshka.DTO; -import java.util.List; - import com.roshka.modelo.ConvocatoriaCargo; import com.roshka.modelo.EstadoPostulante; import com.roshka.modelo.PostulanteTecnologia; +import java.util.List; + public class PostulanteListaDTO { private Long id; private String nombre; diff --git a/curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetails.java b/curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetails.java index 4e92c55..af5febc 100644 --- a/curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetails.java +++ b/curriculumsearch/src/main/java/com/roshka/configuration/CustomUserDetails.java @@ -1,11 +1,11 @@ package com.roshka.configuration; -import java.util.Collection; - import com.roshka.modelo.RRHHUser; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; +import java.util.Collection; + public class CustomUserDetails implements UserDetails { private RRHHUser user; diff --git a/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java b/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java index 8d5fc33..5626e38 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/CargoController.java @@ -1,10 +1,6 @@ package com.roshka.controller; -import java.util.List; - -import javax.validation.Valid; - import com.roshka.modelo.Cargo; import com.roshka.repositorio.CargoRepository; import org.springframework.beans.factory.annotation.Autowired; @@ -15,12 +11,9 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; -import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; @Controller public class CargoController { diff --git a/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java b/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java index d75211f..93d5a7a 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/ConvocatoriaController.java @@ -1,23 +1,10 @@ package com.roshka.controller; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -import com.roshka.modelo.Cargo; import com.roshka.modelo.ConvocatoriaCargo; import com.roshka.modelo.EstadoConvocatoria; -import com.roshka.modelo.EstadoConvocatoriaConverter; import com.roshka.repositorio.CargoRepository; import com.roshka.repositorio.ConvocatoriaRepository; - -import org.apache.jasper.tagplugins.jstl.core.ForEach; -import org.dom4j.Branch; -import org.hibernate.jpa.TypedParameterValue; -import org.hibernate.type.IntegerType; -import org.hibernate.type.LongType; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.context.MessageSource; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; @@ -25,13 +12,11 @@ import org.springframework.data.domain.Sort; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import java.util.Date; + @Controller public class ConvocatoriaController { diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java index 8f48777..6e200e7 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteController.java @@ -1,32 +1,11 @@ package com.roshka.controller; -import java.io.IOException; -import java.util.Date; - - -import javax.validation.ConstraintViolationException; - -import com.roshka.modelo.*; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; -import com.roshka.modelo.EstadoCivil; -import com.roshka.modelo.Nacionalidad; -import com.roshka.modelo.Postulante; -import com.roshka.modelo.TipoExperiencia; +import com.roshka.modelo.*; import com.roshka.repositorio.*; -import com.roshka.repositorio.CiudadRepository; -import com.roshka.repositorio.ConvocatoriaRepository; -import com.roshka.repositorio.DepartamentoRepository; -import com.roshka.repositorio.ExperienciaRepository; -import com.roshka.repositorio.InstitucionRepository; -import com.roshka.repositorio.PostulanteRepository; -import com.roshka.repositorio.TecnologiaRepository; import com.roshka.utils.Helper; - -import org.hibernate.jpa.TypedParameterValue; -import org.hibernate.type.IntegerType; -import org.hibernate.type.LongType; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Sort; @@ -34,13 +13,14 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; -import org.springframework.util.StringUtils; import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.view.RedirectView; +import javax.validation.ConstraintViolationException; + @Controller public class PostulanteController { diff --git a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java index 7164e2b..b199576 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/PostulanteRRHHController.java @@ -1,49 +1,41 @@ package com.roshka.controller; -import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.*; - import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.roshka.DTO.PostulanteListaDTO; -import com.roshka.modelo.*; +import com.roshka.modelo.DBFile; import com.roshka.modelo.EstadoPostulante; import com.roshka.modelo.Postulante; import com.roshka.repositorio.*; -import com.roshka.repositorio.CiudadRepository; -import com.roshka.repositorio.ConvocatoriaRepository; -import com.roshka.repositorio.DepartamentoRepository; -import com.roshka.repositorio.ExperienciaRepository; -import com.roshka.repositorio.InstitucionRepository; -import com.roshka.repositorio.PostulanteRepository; -import com.roshka.repositorio.TecnologiaRepository; import com.roshka.service.PdfGenerator; -import com.roshka.utils.Helper; - - import com.roshka.utils.PostulantesExcelExporter; import org.hibernate.jpa.TypedParameterValue; import org.hibernate.type.StringType; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ByteArrayResource; +import org.springframework.core.io.Resource; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; +import org.springframework.http.HttpHeaders; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.*; -import org.springframework.core.io.ByteArrayResource; -import org.springframework.core.io.Resource; -import org.springframework.http.HttpHeaders; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; @Controller diff --git a/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java b/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java index 39f8156..f81692c 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/RRHHUserController.java @@ -7,32 +7,20 @@ import com.roshka.service.RRHHUserService; import net.bytebuddy.utility.RandomString; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.repository.query.Param; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.mail.javamail.JavaMailSender; -import org.springframework.mail.javamail.MimeMessageHelper; import org.springframework.security.core.Authentication; -import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; -import org.springframework.web.bind.MethodArgumentNotValidException; -import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.view.RedirectView; import javax.mail.MessagingException; -import javax.mail.internet.MimeMessage; import javax.servlet.http.HttpServletRequest; import java.io.IOException; -import java.io.UnsupportedEncodingException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; diff --git a/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java b/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java index 7d77968..2080745 100644 --- a/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java +++ b/curriculumsearch/src/main/java/com/roshka/controller/TecnologiaController.java @@ -1,26 +1,18 @@ package com.roshka.controller; -import java.util.List; - -import javax.validation.Valid; - import com.roshka.modelo.Tecnologia; import com.roshka.repositorio.TecnologiaRepository; - import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.validation.BindingResult; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.ModelAttribute; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageRequest; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.validation.BindingResult; +import org.springframework.web.bind.annotation.*; + +import javax.validation.Valid; @Controller public class TecnologiaController { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java b/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java index 34b0a51..51316a1 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Cargo.java @@ -1,20 +1,12 @@ package com.roshka.modelo; -import java.util.List; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.Table; -import javax.validation.constraints.NotBlank; - import com.fasterxml.jackson.annotation.JsonManagedReference; - import lombok.Data; +import javax.persistence.*; +import javax.validation.constraints.NotBlank; +import java.util.List; + @Entity @Data @Table(name = "cargo") public class Cargo { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java b/curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java index 6e29d3f..727503c 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Ciudad.java @@ -1,21 +1,11 @@ package com.roshka.modelo; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; - -import javax.persistence.Table; - import com.fasterxml.jackson.annotation.JsonBackReference; - import lombok.Data; +import javax.persistence.*; + @Entity @Data @Table(name="ciudad") diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java b/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java index 99fdae7..0c7d977 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/ConvocatoriaCargo.java @@ -1,25 +1,15 @@ package com.roshka.modelo; -import java.util.Date; -import java.util.List; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToMany; -import javax.persistence.ManyToOne; -import javax.persistence.Table; - import com.fasterxml.jackson.annotation.JsonBackReference; import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.roshka.utils.Helper; - import lombok.Data; +import javax.persistence.*; +import java.util.Date; +import java.util.List; + @Entity @Table(name = "convocatoria_cargo") @Data @JsonIdentityInfo(generator = ObjectIdGenerators.UUIDGenerator.class, property="@UUID") diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/DBFile.java b/curriculumsearch/src/main/java/com/roshka/modelo/DBFile.java index 2eb7919..f029527 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/DBFile.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/DBFile.java @@ -1,14 +1,9 @@ package com.roshka.modelo; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.OneToOne; -import javax.persistence.Table; - import org.hibernate.annotations.GenericGenerator; +import javax.persistence.*; + @Entity @Table(name = "files") public class DBFile { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java b/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java index ada0007..c77ba7d 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Departamento.java @@ -1,18 +1,11 @@ package com.roshka.modelo; -import java.util.List; - -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.persistence.Table; - import com.fasterxml.jackson.annotation.JsonManagedReference; - import lombok.Data; +import javax.persistence.*; +import java.util.List; + @Entity @Data @Table(name="departamento") public class Departamento { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/EstadoConvocatoriaConverter.java b/curriculumsearch/src/main/java/com/roshka/modelo/EstadoConvocatoriaConverter.java index ea921a5..f8cb06c 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/EstadoConvocatoriaConverter.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/EstadoConvocatoriaConverter.java @@ -1,7 +1,8 @@ package com.roshka.modelo; -import java.util.Arrays; + import javax.persistence.AttributeConverter; import javax.persistence.Converter; +import java.util.Arrays; @Converter(autoApply = true) public class EstadoConvocatoriaConverter implements AttributeConverter, org.springframework.core.convert.converter.Converter { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulanteConverter.java b/curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulanteConverter.java index b2b550d..5eb25dd 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulanteConverter.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/EstadoPostulanteConverter.java @@ -1,9 +1,8 @@ package com.roshka.modelo; -import java.util.Arrays; - import javax.persistence.AttributeConverter; import javax.persistence.Converter; +import java.util.Arrays; @Converter(autoApply = true) public class EstadoPostulanteConverter implements AttributeConverter, org.springframework.core.convert.converter.Converter { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java b/curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java index 0cffc60..a4fac48 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Estudio.java @@ -1,16 +1,13 @@ package com.roshka.modelo; -import java.util.Date; -import java.util.List; +import com.fasterxml.jackson.annotation.JsonBackReference; +import com.roshka.utils.Helper; import javax.persistence.*; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Past; - -import com.fasterxml.jackson.annotation.JsonBackReference; -import com.fasterxml.jackson.annotation.JsonManagedReference; -import com.roshka.utils.Helper; +import java.util.Date; @Entity @Table(name="estudio") public class Estudio { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java b/curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java index b4fe4a5..f79e561 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Experiencia.java @@ -1,25 +1,14 @@ package com.roshka.modelo; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; - import com.fasterxml.jackson.annotation.JsonBackReference; -import com.fasterxml.jackson.annotation.JsonManagedReference; import com.roshka.utils.Helper; - import lombok.Data; import javax.persistence.*; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import javax.validation.constraints.Past; +import java.util.Date; @Entity @Data @Table(name = "experiencia") diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Institucion.java b/curriculumsearch/src/main/java/com/roshka/modelo/Institucion.java index fde025c..9c91893 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Institucion.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Institucion.java @@ -1,7 +1,6 @@ package com.roshka.modelo; import com.fasterxml.jackson.annotation.JsonManagedReference; - import lombok.Data; import javax.persistence.*; diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java b/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java index 8e35554..f226361 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Postulante.java @@ -1,16 +1,14 @@ package com.roshka.modelo; -import javax.persistence.*; -import javax.validation.constraints.*; - import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonManagedReference; import com.fasterxml.jackson.annotation.ObjectIdGenerators; import com.roshka.utils.Helper; - import lombok.Data; +import javax.persistence.*; +import javax.validation.constraints.*; import java.util.ArrayList; import java.util.Date; import java.util.List; diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java b/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java index 771a35c..69742cc 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/PostulanteTecnologia.java @@ -1,22 +1,11 @@ package com.roshka.modelo; -import javax.persistence.CascadeType; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; -import javax.validation.constraints.Max; -import javax.validation.constraints.Min; - - import com.fasterxml.jackson.annotation.JsonBackReference; - import lombok.Data; + +import javax.persistence.*; +import javax.validation.constraints.Max; +import javax.validation.constraints.Min; @Entity @Data @Table(name="postulante_tecnologia", uniqueConstraints=@UniqueConstraint(columnNames={"postulante_id", "tecnologia_id"})) diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/RRHHUser.java b/curriculumsearch/src/main/java/com/roshka/modelo/RRHHUser.java index c5907be..b853cac 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/RRHHUser.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/RRHHUser.java @@ -1,9 +1,9 @@ package com.roshka.modelo; -import javax.persistence.*; - import lombok.Data; +import javax.persistence.*; + @Entity @Data @Table(name = "recursos_humanos_user") public class RRHHUser { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/ReferenciaPersonal.java b/curriculumsearch/src/main/java/com/roshka/modelo/ReferenciaPersonal.java index 2fc95de..6387901 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/ReferenciaPersonal.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/ReferenciaPersonal.java @@ -1,12 +1,11 @@ package com.roshka.modelo; -import javax.persistence.*; -import javax.validation.constraints.NotBlank; - import com.fasterxml.jackson.annotation.JsonBackReference; - import lombok.Data; +import javax.persistence.*; +import javax.validation.constraints.NotBlank; + @Entity @Data @Table(name = "referencia_personal") public class ReferenciaPersonal { diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java b/curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java index 6932288..6e35845 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/Tecnologia.java @@ -1,15 +1,10 @@ package com.roshka.modelo; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.validation.constraints.NotBlank; - import lombok.Data; +import javax.persistence.*; +import javax.validation.constraints.NotBlank; + @Entity @Data @Table(name="tecnologia") diff --git a/curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumentoConverter.java b/curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumentoConverter.java index 483c9cc..247fb02 100644 --- a/curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumentoConverter.java +++ b/curriculumsearch/src/main/java/com/roshka/modelo/TipoDocumentoConverter.java @@ -1,9 +1,8 @@ package com.roshka.modelo; -import java.util.Arrays; - import javax.persistence.AttributeConverter; import javax.persistence.Converter; +import java.util.Arrays; @Converter(autoApply = true) public class TipoDocumentoConverter implements AttributeConverter { diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java index 7cd119d..a2251ea 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/CargoRepository.java @@ -1,14 +1,13 @@ package com.roshka.repositorio; -import java.util.List; - import com.roshka.modelo.Cargo; - import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; +import java.util.List; + public interface CargoRepository extends JpaRepository{ public Page findByNombreContainingIgnoreCase(String nombre, Pageable pageable); @Query(value = "SELECT c FROM Cargo c WHERE c.id=?1") diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/CiudadRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/CiudadRepository.java index 7a96b07..1ab1b19 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/CiudadRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/CiudadRepository.java @@ -1,7 +1,6 @@ package com.roshka.repositorio; import com.roshka.modelo.Ciudad; - import org.springframework.data.jpa.repository.JpaRepository; public interface CiudadRepository extends JpaRepository { diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java index 09d3f37..eecde92 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/ConvocatoriaRepository.java @@ -1,17 +1,14 @@ package com.roshka.repositorio; -import java.util.Date; -import java.util.List; - import com.roshka.modelo.ConvocatoriaCargo; import com.roshka.modelo.EstadoConvocatoria; - -import org.hibernate.jpa.TypedParameterValue; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; +import java.util.List; + public interface ConvocatoriaRepository extends JpaRepository { @Query(value = "SELECT c FROM ConvocatoriaCargo c WHERE c.id=?1") public ConvocatoriaCargo findByIdConvocatoriaCargo(Long id); diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/DBFileRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/DBFileRepository.java index 8ba8b40..83f6319 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/DBFileRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/DBFileRepository.java @@ -2,7 +2,6 @@ package com.roshka.repositorio; import com.roshka.modelo.DBFile; import com.roshka.modelo.Postulante; - import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/DepartamentoRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/DepartamentoRepository.java index f5e1b22..da25bfd 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/DepartamentoRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/DepartamentoRepository.java @@ -1,7 +1,6 @@ package com.roshka.repositorio; import com.roshka.modelo.Departamento; - import org.springframework.data.jpa.repository.JpaRepository; public interface DepartamentoRepository extends JpaRepository { diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/EstudioRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/EstudioRepository.java index ad25f79..dc1207a 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/EstudioRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/EstudioRepository.java @@ -1,10 +1,9 @@ package com.roshka.repositorio; +import com.roshka.modelo.Estudio; import com.roshka.modelo.Postulante; import org.springframework.data.jpa.repository.JpaRepository; -import com.roshka.modelo.Estudio; - import java.util.List; public interface EstudioRepository extends JpaRepository{ diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java index 5eadaaf..3eef131 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/ExperienciaRepository.java @@ -1,13 +1,11 @@ package com.roshka.repositorio; +import com.roshka.modelo.Experiencia; import com.roshka.modelo.Postulante; import org.springframework.data.jpa.repository.JpaRepository; - import java.util.List; -import com.roshka.modelo.Experiencia; - public interface ExperienciaRepository extends JpaRepository { public List findByCargoLike(String cargo); diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java index 72ec7c9..4913bb2 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteRepository.java @@ -1,9 +1,7 @@ package com.roshka.repositorio; -import java.util.List; - -import javax.transaction.Transactional; - +import com.roshka.modelo.EstadoPostulante; +import com.roshka.modelo.Postulante; import org.hibernate.jpa.TypedParameterValue; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; @@ -11,9 +9,8 @@ import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; -import com.roshka.modelo.ConvocatoriaCargo; -import com.roshka.modelo.EstadoPostulante; -import com.roshka.modelo.Postulante; +import javax.transaction.Transactional; +import java.util.List; public interface PostulanteRepository extends JpaRepository { diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java index 012f485..6b732dd 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/PostulanteTecnologiaRepository.java @@ -1,9 +1,8 @@ package com.roshka.repositorio; import com.roshka.modelo.Postulante; -import org.springframework.data.jpa.repository.JpaRepository; - import com.roshka.modelo.PostulanteTecnologia; +import org.springframework.data.jpa.repository.JpaRepository; import java.util.List; diff --git a/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java b/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java index 29e6b4c..d31a509 100644 --- a/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java +++ b/curriculumsearch/src/main/java/com/roshka/repositorio/TecnologiaRepository.java @@ -1,14 +1,11 @@ package com.roshka.repositorio; +import com.roshka.modelo.Tecnologia; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; -import java.util.List; - -import com.roshka.modelo.Tecnologia; - public interface TecnologiaRepository extends JpaRepository { public Page findByNombreContainingIgnoreCase(String nombre, Pageable pageable); diff --git a/curriculumsearch/src/main/java/com/roshka/service/PdfGenerator.java b/curriculumsearch/src/main/java/com/roshka/service/PdfGenerator.java index 0d75e82..95cd477 100644 --- a/curriculumsearch/src/main/java/com/roshka/service/PdfGenerator.java +++ b/curriculumsearch/src/main/java/com/roshka/service/PdfGenerator.java @@ -1,26 +1,16 @@ package com.roshka.service; -import java.io.ByteArrayOutputStream; -import java.util.Date; -import java.util.stream.Collectors; - -import com.itextpdf.text.List; -import com.itextpdf.text.ListItem; - - -import org.springframework.stereotype.Component; - - -import com.itextpdf.text.Document; -import com.itextpdf.text.DocumentException; -import com.itextpdf.text.Element; -import com.itextpdf.text.Font; -import com.itextpdf.text.Paragraph; +import com.itextpdf.text.*; import com.itextpdf.text.pdf.PdfWriter; import com.roshka.modelo.Estudio; import com.roshka.modelo.Experiencia; import com.roshka.modelo.Postulante; import com.roshka.utils.Helper; +import org.springframework.stereotype.Component; + +import java.io.ByteArrayOutputStream; +import java.util.Date; +import java.util.stream.Collectors; @Component("pdfGenerator") public class PdfGenerator { diff --git a/curriculumsearch/src/main/java/com/roshka/utils/Helper.java b/curriculumsearch/src/main/java/com/roshka/utils/Helper.java index 954bdd1..5d0c733 100644 --- a/curriculumsearch/src/main/java/com/roshka/utils/Helper.java +++ b/curriculumsearch/src/main/java/com/roshka/utils/Helper.java @@ -1,5 +1,9 @@ package com.roshka.utils; +import com.roshka.modelo.DBFile; +import org.springframework.util.StringUtils; +import org.springframework.web.multipart.MultipartFile; + import java.io.IOException; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -9,11 +13,6 @@ import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.concurrent.TimeUnit; -import com.roshka.modelo.DBFile; - -import org.springframework.util.StringUtils; -import org.springframework.web.multipart.MultipartFile; - public class Helper { /** * Se espera fecha en el formato yyyy-MM-dd diff --git a/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java b/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java index dec1e91..dd4d514 100644 --- a/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java +++ b/curriculumsearch/src/main/java/com/roshka/utils/PostulantesExcelExporter.java @@ -1,24 +1,22 @@ package com.roshka.utils; -import java.io.IOException; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.HashMap; -import java.util.List; - -import javax.servlet.ServletOutputStream; -import javax.servlet.http.HttpServletResponse; - import com.roshka.DTO.PostulanteListaDTO; import com.roshka.modelo.PostulanteTecnologia; -import com.roshka.modelo.Tecnologia; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFFont; import org.apache.poi.xssf.usermodel.XSSFSheet; import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + public class PostulantesExcelExporter { private XSSFWorkbook workbook; private XSSFSheet sheet; diff --git a/curriculumsearch/src/main/webapp/img/fondoform.svg b/curriculumsearch/src/main/webapp/img/fondoform.svg index ee8c3f6..e2986d6 100644 --- a/curriculumsearch/src/main/webapp/img/fondoform.svg +++ b/curriculumsearch/src/main/webapp/img/fondoform.svg @@ -1 +1,2 @@ - \ No newline at end of file + \ No newline at end of file