30 | * Properties are configured in the application.yml file.
31 | * See {@link io.github.jhipster.config.JHipsterProperties} for a good example.
32 | */
33 | @ConfigurationProperties(prefix = "application", ignoreUnknownFields = false)
34 | public class ApplicationProperties {
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/Constants.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.config;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | /**
26 | * Application constants.
27 | */
28 | public final class Constants {
29 |
30 | // Regex for acceptable logins
31 | public static final String LOGIN_REGEX = "^[_'.@A-Za-z0-9-]*$";
32 |
33 | public static final String SYSTEM_ACCOUNT = "system";
34 | public static final String ANONYMOUS_USER = "anonymoususer";
35 | public static final String DEFAULT_LANGUAGE = "en";
36 |
37 | private Constants() {
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/DateTimeFormatConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.config;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import org.springframework.context.annotation.Configuration;
26 | import org.springframework.format.FormatterRegistry;
27 | import org.springframework.format.datetime.standard.DateTimeFormatterRegistrar;
28 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
29 |
30 | @Configuration
31 | public class DateTimeFormatConfiguration extends WebMvcConfigurerAdapter {
32 |
33 | @Override
34 | public void addFormatters(FormatterRegistry registry) {
35 | DateTimeFormatterRegistrar registrar = new DateTimeFormatterRegistrar();
36 | registrar.setUseIsoFormat(true);
37 | registrar.registerFormatters(registry);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/JacksonConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.config;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.fasterxml.jackson.module.afterburner.AfterburnerModule;
26 |
27 | import org.springframework.context.annotation.Bean;
28 | import org.springframework.context.annotation.Configuration;
29 | import org.zalando.problem.ProblemModule;
30 | import org.zalando.problem.validation.ConstraintViolationProblemModule;
31 |
32 | @Configuration
33 | public class JacksonConfiguration {
34 |
35 | /*
36 | * Jackson Afterburner module to speed up serialization/deserialization.
37 | */
38 | @Bean
39 | public AfterburnerModule afterburnerModule() {
40 | return new AfterburnerModule();
41 | }
42 |
43 | /*
44 | * Module for serialization/deserialization of RFC7807 Problem.
45 | */
46 | @Bean
47 | ProblemModule problemModule() {
48 | return new ProblemModule();
49 | }
50 |
51 | /*
52 | * Module for serialization/deserialization of ConstraintViolationProblem.
53 | */
54 | @Bean
55 | ConstraintViolationProblemModule constraintViolationProblemModule() {
56 | return new ConstraintViolationProblemModule();
57 | }
58 |
59 | }
60 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/LoggingAspectConfiguration.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.config;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.aop.logging.LoggingAspect;
26 |
27 | import io.github.jhipster.config.JHipsterConstants;
28 |
29 | import org.springframework.context.annotation.*;
30 | import org.springframework.core.env.Environment;
31 |
32 | @Configuration
33 | @EnableAspectJAutoProxy
34 | public class LoggingAspectConfiguration {
35 |
36 | @Bean
37 | @Profile(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT)
38 | public LoggingAspect loggingAspect(Environment env) {
39 | return new LoggingAspect(env);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/RequestLoggingFilterConfig.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.config;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import org.springframework.context.annotation.Bean;
26 | import org.springframework.context.annotation.Configuration;
27 | import org.springframework.web.filter.CommonsRequestLoggingFilter;
28 |
29 | @Configuration
30 | public class RequestLoggingFilterConfig {
31 |
32 | @Bean
33 | public CommonsRequestLoggingFilter logFilter() {
34 | CommonsRequestLoggingFilter filter
35 | = new CommonsRequestLoggingFilter();
36 | filter.setIncludeQueryString(true);
37 | filter.setIncludePayload(true);
38 | filter.setMaxPayloadLength(10000);
39 | filter.setIncludeHeaders(false);
40 | filter.setAfterMessagePrefix("REQUEST DATA : ");
41 | return filter;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/audit/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Audit specific code.
3 | */
4 | package com.redhat.gps.pathfinder.config.audit;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/dbmigrations/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * MongoDB database migrations using MongoBee.
3 | */
4 | package com.redhat.gps.pathfinder.config.dbmigrations;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/config/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Spring Framework configuration files.
3 | */
4 | package com.redhat.gps.pathfinder.config;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/domain/QuestionWeights.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.domain;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 |
26 | import lombok.Data;
27 |
28 | @Data
29 | public class QuestionWeights {
30 | public enum QuestionRank {
31 | UNKNOWN(0), RED(1), AMBER(2), GREEN(3);
32 |
33 | private final int levelCode;
34 |
35 | private QuestionRank(int levelCode) {
36 | this.levelCode = levelCode;
37 | }
38 | }
39 |
40 | private int weight;
41 |
42 | private QuestionRank rank;
43 |
44 | @Override
45 | public String toString() {
46 | return "QuestionWeights{" +
47 | "weight=" + weight +
48 | ", rank=" + rank +
49 | '}';
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/domain/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * JPA domain objects.
3 | */
4 | package com.redhat.gps.pathfinder.domain;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/repository/ApplicationsRepository.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.repository;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.domain.Applications;
26 | import org.springframework.stereotype.Repository;
27 |
28 | import org.springframework.data.mongodb.repository.MongoRepository;
29 |
30 | import java.util.List;
31 |
32 | /**
33 | * Spring Data MongoDB repository for the Applications entity.
34 | */
35 | @SuppressWarnings("unused")
36 | @Repository
37 | public interface ApplicationsRepository extends MongoRepository {
38 |
39 | @Override
40 | List findAll();
41 |
42 | @Override
43 | Applications insert(Applications entity);
44 |
45 | @Override
46 | Applications save(Applications entity);
47 |
48 | @Override
49 | boolean exists(String s);
50 |
51 | @Override
52 | long count();
53 | }
54 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/repository/AssessmentsRepository.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.repository;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.domain.Assessments;
26 | import org.springframework.stereotype.Repository;
27 |
28 | import org.springframework.data.mongodb.repository.MongoRepository;
29 |
30 | /**
31 | * Spring Data MongoDB repository for the Assessments entity.
32 | */
33 | @SuppressWarnings("unused")
34 | @Repository
35 | public interface AssessmentsRepository extends MongoRepository {
36 |
37 | @Override
38 | Assessments insert(Assessments Assessments);
39 |
40 | @Override
41 | Assessments save(Assessments entity);
42 |
43 | @Override
44 | Assessments findOne(String s);
45 |
46 | @Override
47 | boolean exists(String s);
48 |
49 | @Override
50 | long count();
51 | }
52 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/repository/CustomerRepository.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.repository;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.domain.Customer;
26 | import org.springframework.data.mongodb.repository.MongoRepository;
27 | import org.springframework.stereotype.Repository;
28 |
29 | import java.util.List;
30 |
31 | /**
32 | * Spring Data MongoDB repository for the Customer entity.
33 | */
34 | @SuppressWarnings("unused")
35 | @Repository
36 | public interface CustomerRepository extends MongoRepository {
37 |
38 | @Override
39 | Customer save(Customer entity);
40 |
41 | @Override
42 | Customer insert(Customer entity);
43 |
44 | @Override
45 | List findAll();
46 |
47 | @Override
48 | Customer findOne(String s);
49 |
50 | @Override
51 | boolean exists(String s);
52 | }
53 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/repository/MembersRepository.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.repository;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import java.util.List;
26 |
27 | import org.springframework.data.mongodb.repository.MongoRepository;
28 | import org.springframework.stereotype.Repository;
29 |
30 | import com.redhat.gps.pathfinder.domain.Member;
31 |
32 |
33 | /**
34 | * Spring Data MongoDB repository for the Member entity.
35 | */
36 | @SuppressWarnings("unused")
37 | @Repository
38 | public interface MembersRepository extends MongoRepository {
39 |
40 | @Override
41 | List findAll();
42 |
43 | @Override
44 | Member insert(Member entity);
45 |
46 | @Override
47 | Member save(Member entity);
48 |
49 | @Override
50 | boolean exists(String s);
51 |
52 | @Override
53 | long count();
54 | }
55 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/repository/QuestionMetaDataRepository.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.repository;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.domain.QuestionMetaData;
26 | import org.springframework.data.mongodb.repository.MongoRepository;
27 | import org.springframework.stereotype.Repository;
28 |
29 | import java.util.List;
30 |
31 | @SuppressWarnings("unused")
32 | @Repository
33 | public interface QuestionMetaDataRepository extends MongoRepository {
34 | @Override
35 | List findAll();
36 |
37 | @Override
38 | QuestionMetaData insert(QuestionMetaData entity);
39 |
40 | @Override
41 | QuestionMetaData save(QuestionMetaData entity);
42 |
43 | @Override
44 | boolean exists(String s);
45 |
46 | @Override
47 | long count();
48 | }
49 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/repository/ReviewsRepository.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.repository;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.domain.ApplicationAssessmentReview;
26 | import org.springframework.data.mongodb.repository.MongoRepository;
27 | import org.springframework.stereotype.Repository;
28 |
29 | import java.util.List;
30 |
31 | /**
32 | * Spring Data MongoDB repository for the Applications Assessment Review entity.
33 | */
34 | @SuppressWarnings("unused")
35 | @Repository
36 | public interface ReviewsRepository extends MongoRepository {
37 |
38 | @Override
39 | List findAll();
40 |
41 | @Override
42 | ApplicationAssessmentReview insert(ApplicationAssessmentReview entity);
43 |
44 | @Override
45 | ApplicationAssessmentReview save(ApplicationAssessmentReview entity);
46 |
47 | @Override
48 | boolean exists(String s);
49 |
50 | @Override
51 | long count();
52 | }
53 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/repository/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Spring Data JPA repositories.
3 | */
4 | package com.redhat.gps.pathfinder.repository;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/security/AuthoritiesConstants.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.security;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | /**
26 | * Constants for Spring Security authorities.
27 | */
28 | public final class AuthoritiesConstants {
29 |
30 | public static final String ADMIN = "pathfinderAdmin";
31 |
32 | public static final String USER = "pathfinderUser";
33 |
34 | public static final String ANONYMOUS = "ROLE_ANONYMOUS";
35 |
36 | private AuthoritiesConstants() {
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/security/SpringSecurityAuditorAware.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.security;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.config.Constants;
26 |
27 | import org.springframework.data.domain.AuditorAware;
28 | import org.springframework.stereotype.Component;
29 |
30 | /**
31 | * Implementation of AuditorAware based on Spring Security.
32 | */
33 | @Component
34 | public class SpringSecurityAuditorAware implements AuditorAware {
35 |
36 | @Override
37 | public String getCurrentAuditor() {
38 | return SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/security/UserNotActivatedException.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.security;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import org.springframework.security.core.AuthenticationException;
26 |
27 | /**
28 | * This exception is thrown in case of a not activated user trying to authenticate.
29 | */
30 | public class UserNotActivatedException extends AuthenticationException {
31 |
32 | private static final long serialVersionUID = 1L;
33 |
34 | public UserNotActivatedException(String message) {
35 | super(message);
36 | }
37 |
38 | public UserNotActivatedException(String message, Throwable t) {
39 | super(message, t);
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/security/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Spring Security configuration.
3 | */
4 | package com.redhat.gps.pathfinder.security;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/service/dto/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Data Transfer Objects.
3 | */
4 | package com.redhat.gps.pathfinder.service.dto;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/service/mapper/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * MapStruct mappers for mapping domain objects and Data Transfer Objects.
3 | */
4 | package com.redhat.gps.pathfinder.service.mapper;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/service/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Service layer beans.
3 | */
4 | package com.redhat.gps.pathfinder.service;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/service/util/Json.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.service.util;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import org.codehaus.jackson.map.ObjectMapper;
26 | import org.codehaus.jackson.map.SerializationConfig;
27 |
28 | public class Json {
29 |
30 | public static ObjectMapper newObjectMapper(boolean pretty){
31 | ObjectMapper mapper = new ObjectMapper();
32 | mapper.configure(SerializationConfig.Feature.INDENT_OUTPUT,pretty);
33 | return mapper;
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/service/util/MapBuilder.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.service.util;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import java.util.HashMap;
26 | import java.util.Map;
27 |
28 | public class MapBuilder {
29 | private Map s=new HashMap();
30 |
31 | public MapBuilder put(K key, V value){
32 | s.put(key, value);
33 | return this;
34 | }
35 |
36 | public Map build(){
37 | return s;
38 | }
39 |
40 | public MapBuilder putAll(Map values) {
41 | s.putAll(values);
42 | return this;
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/service/util/RequestUtils.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.service.util;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import java.util.Enumeration;
26 |
27 | import javax.servlet.http.HttpServletRequest;
28 |
29 | import org.slf4j.Logger;
30 | import org.slf4j.LoggerFactory;
31 |
32 | import com.redhat.gps.pathfinder.web.api.CustomerAPIImpl;
33 |
34 | public class RequestUtils{
35 | private static final Logger log = LoggerFactory.getLogger(RequestUtils.class);
36 |
37 | public static void printRequestHeaders(HttpServletRequest request){
38 | Enumeration headerNames=request.getHeaderNames();
39 | while(headerNames.hasMoreElements()){
40 | String name=headerNames.nextElement();
41 | String value=request.getHeader(name);
42 | log.debug("HttpServletRequest::Header name={}, value={}", name, value);
43 | }
44 | }
45 |
46 | public static String getAuthToken(HttpServletRequest request){
47 | String token=request.getHeader("Authorization");
48 | if (token!=null)
49 | token=token.replaceAll("Bearer ", "");
50 | return token;
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/service/util/Tuple.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.service.util;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | public class Tuple {
26 | private Object[] values;
27 | public Tuple(X first, Y second) {
28 | values=new Object[]{first, second};
29 | }
30 | @SuppressWarnings("unchecked")
31 | public X getFirst() {
32 | return (X)values[0];
33 | }
34 | @SuppressWarnings("unchecked")
35 | public Y getSecond() {
36 | return (Y)values[1];
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/web/api/MemberController.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.web.api;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import com.redhat.gps.pathfinder.domain.Member;
26 | import com.redhat.gps.pathfinder.web.api.model.MemberType;
27 |
28 | public class MemberController{
29 |
30 |
31 | // TOOD: Later on I will add all member REST api operations here
32 |
33 | public static MemberType populate(Member member, MemberType result){
34 | result.setUsername(member.getUsername());
35 | result.setDisplayName(member.getDisplayName());
36 | result.setEmail(member.getEmail());
37 | // result.setPassword(member.getPassword());
38 | // result.setCustomerId(member.getCustomer().getId());
39 | return result;
40 | }
41 | }
42 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/web/api/security/CredentialsException.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.web.api.security;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | public class CredentialsException extends Exception{
26 | private static final long serialVersionUID=1L;
27 |
28 | public CredentialsException(String mes){
29 | super(mes);
30 | }
31 |
32 | public CredentialsException(String mes, Throwable t){
33 | super(mes, t);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/web/api/security/JwtAuthenticationEntryPoint.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.web.api.security;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import org.springframework.security.core.AuthenticationException;
26 | import org.springframework.security.web.AuthenticationEntryPoint;
27 | import org.springframework.stereotype.Component;
28 |
29 | import javax.servlet.http.HttpServletRequest;
30 | import javax.servlet.http.HttpServletResponse;
31 | import java.io.IOException;
32 | import java.io.Serializable;
33 |
34 | @Component
35 | public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable {
36 |
37 | private static final long serialVersionUID = -8970718410437077606L;
38 |
39 | @Override
40 | public void commence(HttpServletRequest request,
41 | HttpServletResponse response,
42 | AuthenticationException authException) throws IOException {
43 | // This is invoked when user tries to access a secured REST resource without supplying any credentials
44 | // We should just send a 401 Unauthorized response because there is no 'login page' to redirect to
45 | response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized");
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/web/rest/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * Spring MVC REST controllers.
3 | */
4 | package com.redhat.gps.pathfinder.web.rest;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/web/rest/vm/LoggerVM.java:
--------------------------------------------------------------------------------
1 | package com.redhat.gps.pathfinder.web.rest.vm;
2 |
3 | /*-
4 | * #%L
5 | * Pathfinder
6 | * $Id:$
7 | * $HeadURL:$
8 | * %%
9 | * Copyright (C) 2018 RedHat
10 | * %%
11 | * Licensed under the Apache License, Version 2.0 (the "License");
12 | * you may not use this file except in compliance with the License.
13 | * You may obtain a copy of the License at
14 | *
15 | * http://www.apache.org/licenses/LICENSE-2.0
16 | *
17 | * Unless required by applicable law or agreed to in writing, software
18 | * distributed under the License is distributed on an "AS IS" BASIS,
19 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20 | * See the License for the specific language governing permissions and
21 | * limitations under the License.
22 | * #L%
23 | */
24 |
25 | import ch.qos.logback.classic.Logger;
26 |
27 | /**
28 | * View Model object for storing a Logback logger.
29 | */
30 | public class LoggerVM {
31 |
32 | private String name;
33 |
34 | private String level;
35 |
36 | public LoggerVM(Logger logger) {
37 | this.name = logger.getName();
38 | this.level = logger.getEffectiveLevel().toString();
39 | }
40 |
41 | public LoggerVM() {
42 | // Empty public constructor used by Jackson.
43 | }
44 |
45 | public String getName() {
46 | return name;
47 | }
48 |
49 | public void setName(String name) {
50 | this.name = name;
51 | }
52 |
53 | public String getLevel() {
54 | return level;
55 | }
56 |
57 | public void setLevel(String level) {
58 | this.level = level;
59 | }
60 |
61 | @Override
62 | public String toString() {
63 | return "LoggerVM{" +
64 | "name='" + name + '\'' +
65 | ", level='" + level + '\'' +
66 | '}';
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/legacy/src/main/java/com/redhat/gps/pathfinder/web/rest/vm/package-info.java:
--------------------------------------------------------------------------------
1 | /**
2 | * View Models used by Spring MVC REST controllers.
3 | */
4 | package com.redhat.gps.pathfinder.web.rest.vm;
5 |
6 | /*-
7 | * #%L
8 | * Pathfinder
9 | * $Id:$
10 | * $HeadURL:$
11 | * %%
12 | * Copyright (C) 2018 RedHat
13 | * %%
14 | * Licensed under the Apache License, Version 2.0 (the "License");
15 | * you may not use this file except in compliance with the License.
16 | * You may obtain a copy of the License at
17 | *
18 | * http://www.apache.org/licenses/LICENSE-2.0
19 | *
20 | * Unless required by applicable law or agreed to in writing, software
21 | * distributed under the License is distributed on an "AS IS" BASIS,
22 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23 | * See the License for the specific language governing permissions and
24 | * limitations under the License.
25 | * #L%
26 | */
27 |
--------------------------------------------------------------------------------
/legacy/src/main/resources/banner.txt:
--------------------------------------------------------------------------------
1 |
2 | ${AnsiColor.RED} ###### ####### ###### # # # #######
3 | ${AnsiColor.RED} # # # # # # # # # #
4 | ${AnsiColor.RED} # # # # # # # # # #
5 | ${AnsiColor.RED} ###### ##### # # ####### # # #
6 | ${AnsiColor.RED} # # # # # # # ####### #
7 | ${AnsiColor.RED} # # # # # # # # # #
8 | ${AnsiColor.RED} # # ####### ###### # # # # #
9 |
10 | ${AnsiColor.GREEN} ###### # ####### # # ####### ### # # ###### ####### ######
11 | ${AnsiColor.GREEN} # # # # # # # # # ## # # # # # #
12 | ${AnsiColor.GREEN} # # # # # # # # # # # # # # # # #
13 | ${AnsiColor.GREEN} ###### # # # ####### ##### # # # # # # ##### ######
14 | ${AnsiColor.GREEN} # ####### # # # # # # # # # # # # #
15 | ${AnsiColor.GREEN} # # # # # # # # # ## # # # # #
16 | ${AnsiColor.GREEN} # # # # # # # ### # # ###### ####### # #
17 |
18 |
19 |
--------------------------------------------------------------------------------
/legacy/src/main/resources/config/bootstrap.properties:
--------------------------------------------------------------------------------
1 | spring:
2 | profiles: dev
3 | cloud.kubernetes:
4 | configmap.enabled = false
5 | secrets.enabled = false
6 | secrets.paths= /tmp/secrets, /tmp/noc
7 | secrets.name = mongodb
8 | secrets.enableApi = false
9 |
10 | profiles: prodose
11 | cloud.kubernetes:
12 | configmap.enabled = true
13 | secrets.enabled = true
14 | secrets.paths= /tmp/secrets, /tmp/noc
15 | secrets.name = mongodb
16 | secrets.enableApi = true
17 |
--------------------------------------------------------------------------------
/legacy/src/main/resources/i18n/messages.properties:
--------------------------------------------------------------------------------
1 | # Error page
2 | error.title=Your request cannot be processed
3 | error.subtitle=Sorry, an error has occurred.
4 | error.status=Status:
5 | error.message=Message:
6 |
7 | # Activation email
8 | email.activation.title=pathfinder account activation
9 | email.activation.greeting=Dear {0}
10 | email.activation.text1=Your pathfinder account has been created, please click on the URL below to activate it:
11 | email.activation.text2=Regards,
12 | email.signature=pathfinder Team.
13 |
14 | # Creation email
15 | email.creation.text1=Your pathfinder account has been created, please click on the URL below to access it:
16 |
17 | # Reset email
18 | email.reset.title=pathfinder password reset
19 | email.reset.greeting=Dear {0}
20 | email.reset.text1=For your pathfinder account a password reset was requested, please click on the URL below to reset it:
21 | email.reset.text2=Regards,
22 |
23 |
--------------------------------------------------------------------------------
/legacy/src/main/resources/keycloak.json:
--------------------------------------------------------------------------------
1 | {
2 | "realm": "pathfinder",
3 | "bearer-only": true,
4 | "auth-server-url": "http://sso-pathfinder.192.168.99.100.nip.io/auth",
5 | "ssl-required": "external",
6 | "resource": "PathfinderServer",
7 | "confidential-port": 0
8 | }
9 |
--------------------------------------------------------------------------------
/legacy/src/main/resources/mails/activationEmail.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | JHipster activation
5 |
6 |
7 |
8 |
9 |
10 | Dear
11 |
12 |
13 | Your JHipster account has been created, please click on the URL below to activate it:
14 |