Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simplified! mapping and made CommandProcessorActor dynamically load a…
… class it interprets from the configured "mappingEngine" Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
- Loading branch information
Showing
23 changed files
with
343 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
...n/java/org/eclipse/ditto/services/amqpbridge/mapping/mapper/ImmutableMappingTemplate.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
...a/org/eclipse/ditto/services/amqpbridge/mapping/mapper/ImmutablePayloadMapperOptions.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
/* | ||
* Copyright (c) 2017 Bosch Software Innovations GmbH. | ||
* | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v2.0 | ||
* which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/org/documents/epl-2.0/index.php | ||
* | ||
* Contributors: | ||
* Bosch Software Innovations GmbH - initial contribution | ||
*/ | ||
package org.eclipse.ditto.services.amqpbridge.mapping.mapper; | ||
|
||
import java.util.Collections; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.Objects; | ||
|
||
/** | ||
* TODO doc | ||
*/ | ||
final class ImmutablePayloadMapperOptions implements PayloadMapperOptions { | ||
|
||
private final Map<String, String> optionsMap; | ||
|
||
/** | ||
* | ||
* @param optionsMap | ||
*/ | ||
ImmutablePayloadMapperOptions(final Map<String, String> optionsMap) { | ||
this.optionsMap = Collections.unmodifiableMap(new HashMap<>(optionsMap)); | ||
} | ||
|
||
@Override | ||
public Map<String, String> getAsMap() { | ||
return optionsMap; | ||
} | ||
|
||
@Override | ||
public boolean equals(final Object o) { | ||
if (this == o) { | ||
return true; | ||
} | ||
if (!(o instanceof ImmutablePayloadMapperOptions)) { | ||
return false; | ||
} | ||
final ImmutablePayloadMapperOptions that = (ImmutablePayloadMapperOptions) o; | ||
return Objects.equals(optionsMap, that.optionsMap); | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
|
||
return Objects.hash(optionsMap); | ||
} | ||
|
||
/** | ||
* | ||
*/ | ||
static final class Builder implements PayloadMapperOptions.Builder { | ||
|
||
private final Map<String, String> options; | ||
|
||
Builder(final Map<String, String> options) { | ||
this.options = options; | ||
} | ||
|
||
@Override | ||
public PayloadMapperOptions build() { | ||
return new ImmutablePayloadMapperOptions(options); | ||
} | ||
} | ||
} |
22 changes: 0 additions & 22 deletions
22
...g/src/main/java/org/eclipse/ditto/services/amqpbridge/mapping/mapper/MappingTemplate.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.