Commit 1a64b68e authored by Raj Shah's avatar Raj Shah
Browse files

Release 3.2.65

parent fbb2a21c
<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>de.fraunhofer.iese.ind2uce</groupId> <groupId>de.fraunhofer.iese.ind2uce</groupId>
<artifactId>parent</artifactId> <artifactId>parent</artifactId>
<version>3.2.51</version> <version>3.2.65</version>
</parent> </parent>
<artifactId>core</artifactId> <artifactId>core</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<version>3.2.51</version>
<name>IND2UCE :: Core</name> <name>IND2UCE :: Core</name>
<description>IND2UCE :: Core</description> <description>IND2UCE :: Core</description>
<url>https://git.iese.fraunhofer.de/ind2uce/core</url> <url>https://git.iese.fraunhofer.de/ind2uce/core</url>
...@@ -23,51 +23,79 @@ ...@@ -23,51 +23,79 @@
<artifactId>slf4j-api</artifactId> <artifactId>slf4j-api</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>org.slf4j</groupId>
<artifactId>logback-core</artifactId> <artifactId>jcl-over-slf4j</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>ch.qos.logback</groupId> <groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId> <artifactId>logback-classic</artifactId>
<optional>true</optional>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.google.code.gson</groupId> <groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId> <artifactId>gson</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>com.jayway.jsonpath</groupId>
<artifactId>commons-lang3</artifactId> <artifactId>json-path</artifactId>
<version>3.5</version>
</dependency> </dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.reflections</groupId> <groupId>org.reflections</groupId>
<artifactId>reflections</artifactId> <artifactId>reflections</artifactId>
<version>0.9.10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hamcrest</groupId> <groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId> <artifactId>hamcrest-all</artifactId>
<scope>test</scope> <scope>test</scope>
<version>${hamcrest.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId> <artifactId>hibernate-entitymanager</artifactId>
<version>5.3.1.Final</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</dependency>
<dependency>
<groupId>com.rabbitmq</groupId>
<artifactId>amqp-client</artifactId>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>24.0-jre</version>
</dependency> </dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
</dependencies> </dependencies>
...@@ -83,7 +111,11 @@ ...@@ -83,7 +111,11 @@
<plugin> <plugin>
<groupId>org.asciidoctor</groupId> <groupId>org.asciidoctor</groupId>
<artifactId>asciidoctor-maven-plugin</artifactId> <artifactId>asciidoctor-maven-plugin</artifactId>
<version>1.5.2</version> <configuration>
<attributes>
<project-version>${project.version}</project-version>
</attributes>
</configuration>
<executions> <executions>
<execution> <execution>
<id>generate-docs</id> <id>generate-docs</id>
...@@ -130,7 +162,17 @@ ...@@ -130,7 +162,17 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<configuration>
<instrumentation>
<ignoreTrivial>true</ignoreTrivial>
</instrumentation>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
...@@ -154,9 +196,9 @@ ...@@ -154,9 +196,9 @@
<scm> <scm>
<connection>scm:git:http://ind2uce-git.iese.de/ind2uce/dev/core.git</connection> <connection>scm:git:http://ind2uce-git.iese.de/ind2uce/dev/ind2uce.git</connection>
<developerConnection>scm:git:http://ind2uce-git.iese.de/ind2uce/dev/core.git</developerConnection> <developerConnection>scm:git:http://ind2uce-git.iese.de/ind2uce/dev/ind2uce.git</developerConnection>
<tag>3.2.51-RELEASE</tag> <tag>3.2.65</tag>
</scm> </scm>
...@@ -187,4 +229,4 @@ ...@@ -187,4 +229,4 @@
<organizationUrl>https://www.iese.fraunhofer.de/</organizationUrl> <organizationUrl>https://www.iese.fraunhofer.de/</organizationUrl>
</developer> </developer>
</developers> </developers>
</project> </project>
\ No newline at end of file
<div id="footer-text">
<a href="https://ind2uce.de/imprint.html" style="color:rgba(255,255,255,.8)">Imprint</a>
<br/>
<a href="https://www.iese.fraunhofer.de/en/data_protection.html" style="color:rgba(255,255,255,.8)">Privacy Policy</a>
</div>
\ No newline at end of file
This diff is collapsed.
/* INDUCE Documentation CSS
To be added in each .adoc:
:stylesdir: ./css
:stylesheet: ind2uce.css
:linkcss:
*/
@import "default.css";
@import "ind2uce_modifications.css";
\ No newline at end of file
/* INDUCE Documentation CSS
Modifications to default asciidoctor theme*/
#toc.toc2 {
background-color:#164e78;
border-right: none;
}
#content #toc {
background-color:#164e78;
}
#toc a {
color: #ffffff;
}
#toc a:hover {
color: rgba(135, 188, 231, 1.00);
}
#toc a:active {
color: #ffffff;
}
#toctitle {
color: #ffffff;
}
#footer {
background-color: #164e78;
}
#footer-text {
color: #ffffff:
}
h1, h2, h3, .sidebarblock > .content > .title, h4, h5, h6 {
color: #164e78;
font-family: "Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif;
}
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link {
color:#164e78
}
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{
color:rgba(135, 188, 231, 1.00);
}
#toc ul {
font-family: "Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif;
}
body {
font-family: "Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif;
}
#header > h1:first-child {
color: #164e78;
}
.subheader,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title {
color:#164e78;
}
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title {
font-family:"Helvetica Neue", Roboto, Arial, "Droid Sans", sans-serif;
}
This diff is collapsed.
/*-
* =================================LICENSE_START=================================
* IND2UCE
* %%
* Copyright (C) 2017 - 2018 Fraunhofer IESE (www.iese.fraunhofer.de)
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =================================LICENSE_END=================================
*/
package de.fraunhofer.iese.ind2uce.api.common;
public @interface CoverageIgnore {
}
...@@ -24,7 +24,6 @@ import de.fraunhofer.iese.ind2uce.api.component.description.ClassTypeDescription ...@@ -24,7 +24,6 @@ import de.fraunhofer.iese.ind2uce.api.component.description.ClassTypeDescription
import de.fraunhofer.iese.ind2uce.api.component.description.MethodInterfaceDescription; import de.fraunhofer.iese.ind2uce.api.component.description.MethodInterfaceDescription;
import de.fraunhofer.iese.ind2uce.api.component.description.TypeDescription; import de.fraunhofer.iese.ind2uce.api.component.description.TypeDescription;
import de.fraunhofer.iese.ind2uce.api.policy.parameter.DataObject; import de.fraunhofer.iese.ind2uce.api.policy.parameter.DataObject;
import de.fraunhofer.iese.ind2uce.logger.LoggerFactory;
import com.google.gson.ExclusionStrategy; import com.google.gson.ExclusionStrategy;
import com.google.gson.FieldAttributes; import com.google.gson.FieldAttributes;
...@@ -33,11 +32,14 @@ import com.google.gson.GsonBuilder; ...@@ -33,11 +32,14 @@ import com.google.gson.GsonBuilder;
import com.google.gson.JsonDeserializationContext; import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer; import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement; import com.google.gson.JsonElement;
import com.google.gson.JsonNull;
import com.google.gson.JsonObject; import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.JsonSerializationContext; import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer; import com.google.gson.JsonSerializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Type; import java.lang.reflect.Type;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -54,7 +56,7 @@ public abstract class Ind2uceEntity implements Serializable { ...@@ -54,7 +56,7 @@ public abstract class Ind2uceEntity implements Serializable {
private static List<String> unknownClasses = new ArrayList<>(); private static List<String> unknownClasses = new ArrayList<>();
/** The logger. */ /** The logger. */
private static final org.slf4j.Logger LOG = LoggerFactory.getLogger(Ind2uceEntity.class); private static final Logger LOG = LoggerFactory.getLogger(Ind2uceEntity.class);
/** /**
* The Constant serialVersionUID. * The Constant serialVersionUID.
...@@ -126,7 +128,8 @@ public abstract class Ind2uceEntity implements Serializable { ...@@ -126,7 +128,8 @@ public abstract class Ind2uceEntity implements Serializable {
return new DataObject(o, Class.forName(type)); return new DataObject(o, Class.forName(type));
} catch (final ClassNotFoundException e) { } catch (final ClassNotFoundException e) {
LOG.warn("Deserialization failed. Adding " + type + " to the list of unknown classes", e); LOG.warn("Deserialization failed. Adding " + type + " to the list of unknown classes");
LOG.debug("Deserialization failed. Adding " + type + " to the list of unknown classes", e);
unknownClasses.add(type); unknownClasses.add(type);
return this.createObjectFromUnkownClass(value, type, isComplex); return this.createObjectFromUnkownClass(value, type, isComplex);
...@@ -141,7 +144,11 @@ public abstract class Ind2uceEntity implements Serializable { ...@@ -141,7 +144,11 @@ public abstract class Ind2uceEntity implements Serializable {
@Override @Override
public JsonElement serialize(DataObject<?> src, Type typeOfSrc, JsonSerializationContext context) { public JsonElement serialize(DataObject<?> src, Type typeOfSrc, JsonSerializationContext context) {
final JsonObject jsonObject = new JsonObject(); final JsonObject jsonObject = new JsonObject();
jsonObject.add("value", GSON_PLAIN.toJsonTree(src.getValue())); JsonElement jsonsrc = GSON_PLAIN.toJsonTree(src.getValue());
if (jsonsrc == null || jsonsrc instanceof JsonNull) {
jsonsrc = GSON_PLAIN.toJsonTree(src.getValue(), src.getType());
}
jsonObject.add("value", jsonsrc);
jsonObject.addProperty("type", src.getTypeName()); jsonObject.addProperty("type", src.getTypeName());
jsonObject.addProperty("isComplex", src.isComplex()); jsonObject.addProperty("isComplex", src.isComplex());
return jsonObject; return jsonObject;
...@@ -161,7 +168,7 @@ public abstract class Ind2uceEntity implements Serializable { ...@@ -161,7 +168,7 @@ public abstract class Ind2uceEntity implements Serializable {
/** The Constant TYPE_DESCRIPTION_JSON_DESERIALIZER. */ /** The Constant TYPE_DESCRIPTION_JSON_DESERIALIZER. */
private static final JsonDeserializer<TypeDescription> TYPE_DESCRIPTION_JSON_DESERIALIZER = new JsonDeserializer<TypeDescription>() { private static final JsonDeserializer<TypeDescription> TYPE_DESCRIPTION_JSON_DESERIALIZER = new JsonDeserializer<TypeDescription>() {
@Override @Override
public TypeDescription deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException { public TypeDescription deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) {
try { try {
final String type = json.getAsJsonObject().get("type").getAsString(); final String type = json.getAsJsonObject().get("type").getAsString();
switch (type) { switch (type) {
...@@ -191,10 +198,10 @@ public abstract class Ind2uceEntity implements Serializable { ...@@ -191,10 +198,10 @@ public abstract class Ind2uceEntity implements Serializable {
/** /**
* The Constant GSON_DEFAULT. * The Constant GSON_DEFAULT.
*/ */
protected static final Gson GSON_DEFAULT = new GsonBuilder().addSerializationExclusionStrategy(HIDE_EXCLUSION).registerTypeAdapter(DataObject.class, DATAOBJECT_DESERIALIZER) protected static final Gson GSON_DEFAULT = new GsonBuilder().addSerializationExclusionStrategy(HIDE_EXCLUSION).registerTypeAdapter(DataObject.class, DATAOBJECT_DESERIALIZER).registerTypeAdapter(DataObject.class, DATAOBJECT_SERIALIZER)
.registerTypeAdapter(DataObject.class, DATAOBJECT_SERIALIZER).registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER) .registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER).registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER)
.registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER).registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER) .registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER).registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER)
.registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER).registerTypeAdapterFactory(INTERFACE_DESCRIPTION_ADAPTER).create(); .registerTypeAdapterFactory(INTERFACE_DESCRIPTION_ADAPTER).create();
/** /**
* The Constant GSON_PRETTY. * The Constant GSON_PRETTY.
...@@ -227,9 +234,9 @@ public abstract class Ind2uceEntity implements Serializable { ...@@ -227,9 +234,9 @@ public abstract class Ind2uceEntity implements Serializable {
*/ */
public static Gson getGson() { public static Gson getGson() {
return new GsonBuilder().setPrettyPrinting().addSerializationExclusionStrategy(HIDE_EXCLUSION).registerTypeAdapter(DataObject.class, DATAOBJECT_DESERIALIZER) return new GsonBuilder().setPrettyPrinting().addSerializationExclusionStrategy(HIDE_EXCLUSION).registerTypeAdapter(DataObject.class, DATAOBJECT_DESERIALIZER)
.registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER).registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER) .registerTypeAdapter(DataObject.class, DATAOBJECT_SERIALIZER).registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER)
.registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER).registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER) .registerTypeAdapter(TypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER).registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_SERIALIZER)
.registerTypeAdapterFactory(INTERFACE_DESCRIPTION_ADAPTER).create(); .registerTypeAdapter(ClassTypeDescription.class, TYPE_DESCRIPTION_JSON_DESERIALIZER).registerTypeAdapterFactory(INTERFACE_DESCRIPTION_ADAPTER).create();
} }
/** /**
......
...@@ -63,7 +63,7 @@ public abstract class ComponentBase extends Ind2uceEntity { ...@@ -63,7 +63,7 @@ public abstract class ComponentBase extends Ind2uceEntity {
protected List<URI> urls; protected List<URI> urls;
public ComponentBase() { public ComponentBase() {
// required by JPA
} }
public ComponentBase(final ComponentId cId) { public ComponentBase(final ComponentId cId) {
......
...@@ -52,7 +52,7 @@ public class PepComponent extends ComponentBase { ...@@ -52,7 +52,7 @@ public class PepComponent extends ComponentBase {
* Used for JPA. * Used for JPA.
*/ */
public PepComponent() { public PepComponent() {
// required by JPA
} }
/** /**
......
/*-
* =================================LICENSE_START=================================
* IND2UCE
* %%
* Copyright (C) 2017 - 2018 Fraunhofer IESE (www.iese.fraunhofer.de)
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =================================LICENSE_END=================================
*/
package de.fraunhofer.iese.ind2uce.api.component;
public class SolutionToken {
public static final String SPLITTER = ":";
private String solutionId;
private String tokenId;
private String secret;
public SolutionToken() {
}
public SolutionToken(String fullTokenId) {
String[] split = fullTokenId.split(SPLITTER);
// If the split is not equal to size 4 then returning it without any exception so that backward compatibility is maintained.
// If better way of handling this is can be identified
if (split.length != 4)
return;
this.solutionId = split[2];
this.tokenId = split[3];
}
public String getTokenId() {
return this.tokenId;
}
public String getSecret() {
return this.secret;
}
public String getSolutionId() {
return this.solutionId;
}
public String getFullTokenId() {
return "urn:token:" + this.solutionId + SPLITTER + this.getTokenId();
}
public void setSolutionId(String solutionId) {
this.solutionId = solutionId;
}
public void setTokenId(String tokenId) {
this.tokenId = tokenId;
}
public void setSecret(String secret) {
this.secret = secret;
}
}
...@@ -99,7 +99,7 @@ public class InputParameterDescription extends Ind2uceEntity { ...@@ -99,7 +99,7 @@ public class InputParameterDescription extends Ind2uceEntity {
* Instantiates a new input parameter description for JPA. * Instantiates a new input parameter description for JPA.
*/ */
InputParameterDescription() { InputParameterDescription() {
// required by JPA
} }
/** /**
...@@ -347,8 +347,9 @@ public class InputParameterDescription extends Ind2uceEntity { ...@@ -347,8 +347,9 @@ public class InputParameterDescription extends Ind2uceEntity {
*/ */
public void setType(Class<?> type) { public void setType(Class<?> type) {
Class<?> wrappedType = Primitives.replaceByWrapper(type); Class<?> wrappedType = Primitives.replaceByWrapper(type);
if(wrappedType != null && Number.class.isAssignableFrom(wrappedType)) if (wrappedType != null && Number.class.isAssignableFrom(wrappedType)) {
wrappedType = Number.class; wrappedType = Number.class;
}
this.type = wrappedType.getCanonicalName(); this.type = wrappedType.getCanonicalName();
} }
......