Skip to content

Commit

Permalink
GH-2 Refactored server spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerd Wuetherich committed Jun 8, 2019
1 parent c3fc39d commit 8b761c4
Show file tree
Hide file tree
Showing 26 changed files with 2,131 additions and 20 deletions.
40 changes: 40 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,44 @@
<module>slizaa-web</module>
</modules>

<build>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
io.codekontor.slizaa.mojos
</groupId>
<artifactId>
ecoregenerator-maven-plugin
</artifactId>
<versionRange>
[1.0.0-SNAPSHOT,)
</versionRange>
<goals>
<goal>
generateFromEcore
</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>

</project>
5 changes: 5 additions & 0 deletions slizaa-poms/slizaa-server-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell-starter</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,71 @@
import io.codekontor.slizaa.server.specs.api.IServerExtensionSpec;
import io.codekontor.slizaa.server.specs.internal.model.serverconfig.ServerExtension;

public class ServerExtensionSpec extends ServerExtension implements IServerExtensionSpec {
public class ServerExtensionSpec {

public ServerExtensionSpec(String symbolicName, String version) {
super(symbolicName, version);
private String symbolicName;

private String version;

@SuppressWarnings("unused")
private ServerExtension() {
//
}

public ServerExtension(String symbolicName, String version) {
this.symbolicName = checkNotNull(symbolicName);
this.version = checkNotNull(version);
}

public String getSymbolicName() {
return symbolicName;
}

public String getVersion() {
return version;
}

@Override
public String toString() {
return this.getClass().getSimpleName() + " [symbolicName=" + symbolicName + ", version=" + version + "]";
}

@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((symbolicName == null) ? 0 : symbolicName.hashCode());
result = prime * result + ((version == null) ? 0 : version.hashCode());
return result;
}

@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (! (obj instanceof ServerExtension )) {
return false;
}
ServerExtension other = (ServerExtension) obj;
if (symbolicName == null) {
if (other.symbolicName != null) {
return false;
}
} else if (!symbolicName.equals(other.symbolicName)) {
return false;
}
if (version == null) {
if (other.version != null) {
return false;
}
} else if (!version.equals(other.version)) {
return false;
}
return true;
}

}
2 changes: 2 additions & 0 deletions slizaa-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@
<module>slizaa-server-service-backend</module>
<module>slizaa-server-service-svg</module>
<module>slizaa-server-service-slizaa</module>
<module>slizaa-server-service-spec</module>
<module>slizaa-server-staticcontent</module>
<module>slizaa-server-graphql</module>
<module>slizaa-server-main</module>
<module>slizaa-server-spec</module>
</modules>

</project>
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/**
* slizaa-server-graphql - Slizaa Static Software Analysis Tools
* Copyright © 2019 Code-Kontor GmbH and others ([email protected])
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package io.codekontor.slizaa.server.graphql;

public class ErrorMessages {
Expand Down
15 changes: 0 additions & 15 deletions slizaa-server/slizaa-server-main/SlizaaServer-Dev.launch

This file was deleted.

6 changes: 5 additions & 1 deletion slizaa-server/slizaa-server-main/pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
slizaa-server-main - Slizaa Static Software Analysis Tools
Expand Down Expand Up @@ -67,6 +66,11 @@
<artifactId>slizaa-server-service-svg</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell-starter</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<!-- we have to overwrite the version here to support java 11 -->
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.codekontor.slizaa.scanner.spi.contentdefinition.IContentDefinition;
import io.codekontor.slizaa.scanner.spi.contentdefinition.IContentDefinitionProvider;
import io.codekontor.slizaa.scanner.spi.contentdefinition.IContentDefinitionProviderFactory;
import io.codekontor.slizaa.scanner.spi.contentdefinition.InvalidContentDefinitionException;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Loading

0 comments on commit 8b761c4

Please sign in to comment.