Use basepom as parent instead of Sonatype OSS #377
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ | |
|
||
public class ConnectorCatalog { | ||
|
||
private final static Logger log = LoggerFactory.getLogger(ConnectorCatalog.class); | ||
private static final Logger log = LoggerFactory.getLogger(ConnectorCatalog.class); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JLS declaration order must be followed |
||
|
||
private final CamelConnectorCatalog connectorCatalog; | ||
private final CamelCatalog camelCatalog; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,6 +30,16 @@ | |
<name>Syndesis REST :: Controllers</name> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>io.syndesis</groupId> | ||
<artifactId>core</artifactId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used dependencies need to be declared |
||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.syndesis</groupId> | ||
<artifactId>model</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.syndesis</groupId> | ||
<artifactId>dao</artifactId> | ||
|
@@ -50,6 +60,36 @@ | |
<artifactId>project-generator</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-beans</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-autoconfigure</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.fabric8</groupId> | ||
<artifactId>kubernetes-client</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,13 @@ | |
*/ | ||
package io.syndesis.controllers.integration; | ||
|
||
import java.util.*; | ||
import java.util.Arrays; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No stars in imports |
||
import java.util.Collections; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import io.syndesis.model.integration.Integration; | ||
|
||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.stereotype.Component; | ||
|
||
|
@@ -34,7 +38,7 @@ public List<StatusChangeHandler> getStatusChangeHandlers() { | |
); | ||
} | ||
|
||
class DemoHandler implements StatusChangeHandler { | ||
static class DemoHandler implements StatusChangeHandler { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Inner classes that do not reference outer need to be static |
||
private final Integration.Status status; | ||
private final long waitMillis; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,8 +16,15 @@ | |
package io.syndesis.controllers.integration; | ||
|
||
import java.io.IOException; | ||
import java.util.*; | ||
import java.util.concurrent.*; | ||
import java.util.Date; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No stars in imports |
||
import java.util.HashSet; | ||
import java.util.Optional; | ||
import java.util.Set; | ||
import java.util.concurrent.ConcurrentHashMap; | ||
import java.util.concurrent.ExecutorService; | ||
import java.util.concurrent.Executors; | ||
import java.util.concurrent.ScheduledExecutorService; | ||
import java.util.concurrent.TimeUnit; | ||
|
||
import javax.annotation.PostConstruct; | ||
import javax.annotation.PreDestroy; | ||
|
@@ -28,6 +35,7 @@ | |
import io.syndesis.model.ChangeEvent; | ||
import io.syndesis.model.Kind; | ||
import io.syndesis.model.integration.Integration; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
|
@@ -48,7 +56,7 @@ public class IntegrationController { | |
private ExecutorService executor; | ||
private ScheduledExecutorService scheduler; | ||
|
||
private final static long SCHEDULE_INTERVAL_IN_SECONDS = 60; | ||
private static final long SCHEDULE_INTERVAL_IN_SECONDS = 60; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JLS declaration order There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really a fan of enforcing JLS ordering as imo it doesn't add much value and is just nit picking. |
||
|
||
@Autowired | ||
public IntegrationController(DataManager dataManager, EventBus eventBus, StatusChangeHandlerProvider handlerFactory) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,14 @@ | |
*/ | ||
package io.syndesis.controllers.integration; | ||
|
||
import java.util.*; | ||
import java.util.Arrays; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No stars in imports There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually I almost never look at imports so don't mind much how they look like. But I'm fine with any import rule as along as IDEA supports it. |
||
import java.util.Collections; | ||
import java.util.HashSet; | ||
import java.util.List; | ||
import java.util.Set; | ||
|
||
import io.syndesis.model.integration.Integration; | ||
|
||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.stereotype.Component; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,12 +16,20 @@ | |
package io.syndesis.controllers.integration.online; | ||
|
||
import java.io.IOException; | ||
import java.util.*; | ||
import java.util.ArrayList; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No stars in imports |
||
import java.util.Collections; | ||
import java.util.HashMap; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.Properties; | ||
import java.util.Set; | ||
import java.util.UUID; | ||
import java.util.stream.Collectors; | ||
|
||
import io.fabric8.funktion.model.StepKinds; | ||
import io.syndesis.controllers.integration.StatusChangeHandlerProvider; | ||
import io.syndesis.core.SyndesisServerException; | ||
import io.syndesis.core.Names; | ||
import io.syndesis.core.SyndesisServerException; | ||
import io.syndesis.core.Tokens; | ||
import io.syndesis.dao.manager.DataManager; | ||
import io.syndesis.github.GitHubService; | ||
|
@@ -34,7 +42,7 @@ | |
import io.syndesis.project.converter.GenerateProjectRequest; | ||
import io.syndesis.project.converter.ImmutableGenerateProjectRequest; | ||
import io.syndesis.project.converter.ProjectGenerator; | ||
import io.fabric8.funktion.model.StepKinds; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
|
@@ -49,7 +57,7 @@ public class ActivateHandler implements StatusChangeHandlerProvider.StatusChange | |
private final GitHubService gitHubService; | ||
private final ProjectGenerator projectConverter; | ||
|
||
private final static Logger log = LoggerFactory.getLogger(ActivateHandler.class); | ||
private static final Logger log = LoggerFactory.getLogger(ActivateHandler.class); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JLS declaration order |
||
|
||
ActivateHandler(DataManager dataManager, OpenShiftService openShiftService, | ||
GitHubService gitHubService, ProjectGenerator projectConverter) { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,17 @@ | |
*/ | ||
package io.syndesis.controllers.integration.online; | ||
|
||
import java.util.Arrays; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No stars in imports |
||
import java.util.Collections; | ||
import java.util.HashSet; | ||
import java.util.Set; | ||
|
||
import io.fabric8.kubernetes.client.KubernetesClientException; | ||
import io.syndesis.controllers.integration.StatusChangeHandlerProvider; | ||
import io.syndesis.core.Tokens; | ||
import io.syndesis.model.integration.Integration; | ||
import io.syndesis.openshift.OpenShiftDeployment; | ||
import io.syndesis.openshift.OpenShiftService; | ||
import io.fabric8.kubernetes.client.KubernetesClientException; | ||
|
||
import java.util.*; | ||
|
||
public class DeactivateHandler implements StatusChangeHandlerProvider.StatusChangeHandler { | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,14 +15,15 @@ | |
*/ | ||
package io.syndesis.controllers.integration.online; | ||
|
||
import java.util.Collections; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No stars in imports |
||
import java.util.Set; | ||
|
||
import io.syndesis.controllers.integration.StatusChangeHandlerProvider; | ||
import io.syndesis.core.Tokens; | ||
import io.syndesis.model.integration.Integration; | ||
import io.syndesis.openshift.OpenShiftDeployment; | ||
import io.syndesis.openshift.OpenShiftService; | ||
|
||
import java.util.*; | ||
|
||
public class DeleteHandler implements StatusChangeHandlerProvider.StatusChangeHandler { | ||
|
||
private final OpenShiftService openShiftService; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,16 +34,46 @@ | |
<!-- (none) --> | ||
<!-- ===================================================================================== --> | ||
|
||
<dependency> | ||
<groupId>org.springframework.security</groupId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Used dependencies need to be declared |
||
<artifactId>spring-security-core</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jdk8</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.keycloak</groupId> | ||
<artifactId>keycloak-spring-security-adapter</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.keycloak</groupId> | ||
<artifactId>keycloak-common</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.keycloak</groupId> | ||
<artifactId>keycloak-core</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.keycloak</groupId> | ||
<artifactId>keycloak-adapter-core</artifactId> | ||
</dependency> | ||
|
||
<!-- Testing --> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,24 +41,24 @@ public interface Subscription { | |
* @param handler the callback that will receive the events. | ||
* @return the previously registered subscription with that id or null. | ||
*/ | ||
public Subscription subscribe(String subscriberId, Subscription handler); | ||
Subscription subscribe(String subscriberId, Subscription handler); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Redundant |
||
|
||
/** | ||
* Removes a subscription from the event bus. | ||
* @param subscriberId unique id for the subscription. | ||
* @return the previously registered subscription with that id or null if not registered. | ||
*/ | ||
public Subscription unsubscribe(String subscriberId); | ||
Subscription unsubscribe(String subscriberId); | ||
|
||
/** | ||
* Send an event to all subscribers in a bus. The event MAY get delivered to the subscriptions | ||
* after this call returns. | ||
*/ | ||
public void broadcast(String event, String data); | ||
void broadcast(String event, String data); | ||
|
||
/** | ||
* Send an event to a specific subscriber on the bus. The event MAY get delivered to the subscriptions | ||
* after this call returns. | ||
*/ | ||
public void send(String subscriberId, String event, String data); | ||
void send(String subscriberId, String event, String data); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,9 +28,9 @@ | |
*/ | ||
public class KeyGenerator { | ||
|
||
static private long lastTimestamp = System.currentTimeMillis(); | ||
static private final byte randomnessByte; | ||
static private long randomnessLong; | ||
private static long lastTimestamp = System.currentTimeMillis(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. JLS declaration order |
||
private static final byte randomnessByte; | ||
private static long randomnessLong; | ||
|
||
private KeyGenerator() {} | ||
|
||
|
@@ -40,7 +40,7 @@ private KeyGenerator() {} | |
randomnessLong = random.nextLong(); | ||
} | ||
|
||
static public String createKey() { | ||
public static String createKey() { | ||
long now = System.currentTimeMillis(); | ||
|
||
ByteBuffer buffer = ByteBuffer.wrap(new byte[8 + 1 + 8]); | ||
|
@@ -55,7 +55,7 @@ static public String createKey() { | |
} | ||
} | ||
|
||
protected synchronized static long getRandomPart(long timeStamp) { | ||
protected static synchronized long getRandomPart(long timeStamp) { | ||
if( timeStamp == lastTimestamp ) { | ||
// increment the randomness. | ||
randomnessLong ++; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used dependencies need to be declared