TSK-1009: Fix more building errors after checkstyle changes
This commit is contained in:
parent
c4cd616e35
commit
85725a052c
|
@ -3,8 +3,8 @@ package pro.taskana.simplehistory.query;
|
||||||
import pro.taskana.QueryColumnName;
|
import pro.taskana.QueryColumnName;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum containing the column names for {@see
|
* Enum containing the column names for
|
||||||
* pro.taskana.simplehistory.impl.mappings.HistoryQueryMapper#queryHistoryColumnValues}.
|
* {@link pro.taskana.simplehistory.impl.mappings.HistoryQueryMapper#queryHistoryColumnValues}.
|
||||||
*
|
*
|
||||||
* @author bv
|
* @author bv
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -8,7 +8,6 @@ import static org.junit.Assert.fail;
|
||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.text.MessageFormat;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import javax.sql.DataSource;
|
import javax.sql.DataSource;
|
||||||
|
@ -51,8 +50,10 @@ public class TaskHistoryEventControllerIntTest {
|
||||||
|
|
||||||
private static final Logger LOGGER =
|
private static final Logger LOGGER =
|
||||||
LoggerFactory.getLogger(TaskHistoryEventControllerIntTest.class);
|
LoggerFactory.getLogger(TaskHistoryEventControllerIntTest.class);
|
||||||
|
|
||||||
@Value("${taskana.schemaName:TASKANA}")
|
@Value("${taskana.schemaName:TASKANA}")
|
||||||
public String schemaName;
|
public String schemaName;
|
||||||
|
|
||||||
String server = "http://127.0.0.1:";
|
String server = "http://127.0.0.1:";
|
||||||
|
|
||||||
RestTemplate template;
|
RestTemplate template;
|
||||||
|
@ -106,11 +107,10 @@ public class TaskHistoryEventControllerIntTest {
|
||||||
public void testGetSpecificTaskHistoryEvent() {
|
public void testGetSpecificTaskHistoryEvent() {
|
||||||
ResponseEntity<TaskHistoryEventListResource> response =
|
ResponseEntity<TaskHistoryEventListResource> response =
|
||||||
template.exchange(
|
template.exchange(
|
||||||
MessageFormat.format(
|
server
|
||||||
"{0}{1}/api/v1/task-history-event?"
|
+ port
|
||||||
+ "business-process-id=BPI:01&sort-by=business-process-id&"
|
+ "/api/v1/task-history-event?business-process-id=BPI:01"
|
||||||
+ "order=asc&page-size=6&page=1",
|
+ "&sort-by=business-process-id&order=asc&page-size=6&page=1",
|
||||||
server, port),
|
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
request,
|
request,
|
||||||
new ParameterizedTypeReference<TaskHistoryEventListResource>() {});
|
new ParameterizedTypeReference<TaskHistoryEventListResource>() {});
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package pro.taskana;
|
package pro.taskana;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enum containing the column names for @see {@link
|
* Enum containing the column names for {@link
|
||||||
* pro.taskana.mappings.QueryMapper#queryObjectReferenceColumnValues
|
* pro.taskana.mappings.QueryMapper#queryObjectReferenceColumnValues
|
||||||
* (pro.taskana.impl.ObjectReferenceQueryImpl)}.
|
* (pro.taskana.impl.ObjectReferenceQueryImpl)}.
|
||||||
*
|
*
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Update;
|
||||||
import pro.taskana.impl.ClassificationImpl;
|
import pro.taskana.impl.ClassificationImpl;
|
||||||
|
|
||||||
/** This class is the mybatis mapping of classifications. */
|
/** This class is the mybatis mapping of classifications. */
|
||||||
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
|
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
|
||||||
public interface ClassificationMapper {
|
public interface ClassificationMapper {
|
||||||
|
|
||||||
@Select(
|
@Select(
|
||||||
|
|
|
@ -11,7 +11,7 @@ import org.apache.ibatis.annotations.Update;
|
||||||
import pro.taskana.ObjectReference;
|
import pro.taskana.ObjectReference;
|
||||||
|
|
||||||
/** This class is the mybatis mapping of ObjectReference. */
|
/** This class is the mybatis mapping of ObjectReference. */
|
||||||
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
|
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
|
||||||
public interface ObjectReferenceMapper {
|
public interface ObjectReferenceMapper {
|
||||||
|
|
||||||
@Select(
|
@Select(
|
||||||
|
|
|
@ -17,7 +17,7 @@ import pro.taskana.impl.WorkbasketQueryImpl;
|
||||||
import pro.taskana.impl.WorkbasketSummaryImpl;
|
import pro.taskana.impl.WorkbasketSummaryImpl;
|
||||||
|
|
||||||
/** This class provides a mapper for all queries. */
|
/** This class provides a mapper for all queries. */
|
||||||
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
|
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
|
||||||
public interface QueryMapper {
|
public interface QueryMapper {
|
||||||
|
|
||||||
String OBJECTREFERENCEMAPPER_FINDBYID = "pro.taskana.mappings.ObjectReferenceMapper.findById";
|
String OBJECTREFERENCEMAPPER_FINDBYID = "pro.taskana.mappings.ObjectReferenceMapper.findById";
|
||||||
|
|
|
@ -18,7 +18,7 @@ import pro.taskana.impl.report.item.TimestampQueryItem;
|
||||||
import pro.taskana.report.Timestamp;
|
import pro.taskana.report.Timestamp;
|
||||||
|
|
||||||
/** This class is the mybatis mapping of task monitoring. */
|
/** This class is the mybatis mapping of task monitoring. */
|
||||||
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:indentation"})
|
@SuppressWarnings({"checkstyle:LineLength", "checkstyle:Indentation"})
|
||||||
public interface TaskMonitorMapper {
|
public interface TaskMonitorMapper {
|
||||||
|
|
||||||
@Select(
|
@Select(
|
||||||
|
|
|
@ -25,6 +25,7 @@ import pro.taskana.sampledata.SampleDataGenerator;
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@ComponentScan(basePackages = "pro.taskana")
|
@ComponentScan(basePackages = "pro.taskana")
|
||||||
|
@SuppressWarnings("checkstyle:Indentation")
|
||||||
@Import({
|
@Import({
|
||||||
TransactionalJobsConfiguration.class,
|
TransactionalJobsConfiguration.class,
|
||||||
LdapConfiguration.class,
|
LdapConfiguration.class,
|
||||||
|
|
|
@ -20,7 +20,7 @@ public class LdapCacheTestImpl implements LdapCache {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dictionary is a {@link Map} collection that contains {@link AccessIdResource} as key (user) and
|
* Dictionary is a {@link Map} collection that contains {@link AccessIdResource} as key (user) and
|
||||||
* {@link List<AccessIdResource>} as value (groups of which the user is a member) .
|
* {@link List} as value (groups of which the user is a member) .
|
||||||
*/
|
*/
|
||||||
private static Map<AccessIdResource, List<AccessIdResource>> users;
|
private static Map<AccessIdResource, List<AccessIdResource>> users;
|
||||||
|
|
||||||
|
@ -355,10 +355,10 @@ public class LdapCacheTestImpl implements LdapCache {
|
||||||
});
|
});
|
||||||
|
|
||||||
int groupNumber = 0;
|
int groupNumber = 0;
|
||||||
List<AccessIdResource> group0 = new ArrayList<>(),
|
List<AccessIdResource> group0 = new ArrayList<>();
|
||||||
group1 = new ArrayList<>(),
|
List<AccessIdResource> group1 = new ArrayList<>();
|
||||||
group2 = new ArrayList<>(),
|
List<AccessIdResource> group2 = new ArrayList<>();
|
||||||
group3 = new ArrayList<>();
|
List<AccessIdResource> group3 = new ArrayList<>();
|
||||||
|
|
||||||
for (AccessIdResource group : groups) {
|
for (AccessIdResource group : groups) {
|
||||||
switch (groupNumber) {
|
switch (groupNumber) {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert
|
||||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
/** The Web MVC Configuration. */
|
/** The Web MVC Configuration. */
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebMvc
|
@EnableWebMvc
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
package pro.taskana.rest.models;
|
package pro.taskana.rest.models;
|
||||||
|
|
||||||
/** model for a user. */
|
/** model for a user. */
|
||||||
public class User {
|
public class User {
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
public FilterRegistrationBean<CorsFilter> corsFilter() {
|
public FilterRegistrationBean<CorsFilter> corsFilter() {
|
||||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||||
CorsConfiguration config = new CorsConfiguration();
|
CorsConfiguration config = new CorsConfiguration();
|
||||||
config.setAllowCredentials(true);
|
config.setAllowCredentials(true);
|
||||||
config.addAllowedOrigin("*");
|
config.addAllowedOrigin("*");
|
||||||
|
@ -96,11 +96,11 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||||
.antMatchers("/h2-console/**")
|
.antMatchers("/h2-console/**")
|
||||||
.permitAll();
|
.permitAll();
|
||||||
} else {
|
} else {
|
||||||
AddLoginPageConfiguration(http);
|
addLoginPageConfiguration(http);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddLoginPageConfiguration(HttpSecurity http) throws Exception {
|
private void addLoginPageConfiguration(HttpSecurity http) throws Exception {
|
||||||
http.authorizeRequests()
|
http.authorizeRequests()
|
||||||
.anyRequest()
|
.anyRequest()
|
||||||
.fullyAuthenticated()
|
.fullyAuthenticated()
|
||||||
|
|
|
@ -41,8 +41,8 @@ import pro.taskana.rest.resource.TaskResourceAssembler;
|
||||||
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
class AsyncUpdateJobIntTest {
|
class AsyncUpdateJobIntTest {
|
||||||
|
|
||||||
private static final String CLASSIFICATION_ID = "CLI:100000000000000000000000000000000003";
|
|
||||||
static RestTemplate template;
|
static RestTemplate template;
|
||||||
|
private static final String CLASSIFICATION_ID = "CLI:100000000000000000000000000000000003";
|
||||||
@Autowired ClassificationResourceAssembler classificationResourceAssembler;
|
@Autowired ClassificationResourceAssembler classificationResourceAssembler;
|
||||||
@Autowired TaskResourceAssembler taskResourceAssembler;
|
@Autowired TaskResourceAssembler taskResourceAssembler;
|
||||||
@Autowired JobScheduler jobScheduler;
|
@Autowired JobScheduler jobScheduler;
|
||||||
|
@ -57,8 +57,8 @@ class AsyncUpdateJobIntTest {
|
||||||
void testUpdateClassificationPrioServiceLevel() throws Exception {
|
void testUpdateClassificationPrioServiceLevel() throws Exception {
|
||||||
|
|
||||||
// 1st step: get old classification :
|
// 1st step: get old classification :
|
||||||
Instant before = Instant.now();
|
final Instant before = Instant.now();
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
final ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
||||||
ResponseEntity<ClassificationResource> response =
|
ResponseEntity<ClassificationResource> response =
|
||||||
template.exchange(
|
template.exchange(
|
||||||
|
|
|
@ -25,6 +25,7 @@ import pro.taskana.sampledata.SampleDataGenerator;
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
@ComponentScan(basePackages = "pro.taskana")
|
@ComponentScan(basePackages = "pro.taskana")
|
||||||
|
@SuppressWarnings("checkstyle:Indentation")
|
||||||
@Import({
|
@Import({
|
||||||
TransactionalJobsConfiguration.class,
|
TransactionalJobsConfiguration.class,
|
||||||
LdapConfiguration.class,
|
LdapConfiguration.class,
|
||||||
|
|
|
@ -39,6 +39,7 @@ import pro.taskana.sampledata.SampleDataGenerator;
|
||||||
*/
|
*/
|
||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
@EnableScheduling
|
@EnableScheduling
|
||||||
|
@SuppressWarnings("checkstyle:Indentation")
|
||||||
@Import({
|
@Import({
|
||||||
TransactionalJobsConfiguration.class,
|
TransactionalJobsConfiguration.class,
|
||||||
LdapConfiguration.class,
|
LdapConfiguration.class,
|
||||||
|
@ -90,7 +91,8 @@ public class TaskanaWildFlyApplication extends SpringBootServletInitializer {
|
||||||
return dataSource;
|
return dataSource;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
LOGGER.error(
|
LOGGER.error(
|
||||||
"Caught exception {} when attempting to start Taskana with Datasource from Jndi. Using default H2 datasource. ",
|
"Caught exception {} when attempting to start Taskana with Datasource "
|
||||||
|
+ "from Jndi. Using default H2 datasource. ",
|
||||||
e);
|
e);
|
||||||
return dsProperties.initializeDataSourceBuilder().build();
|
return dsProperties.initializeDataSourceBuilder().build();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue