Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align OutputConfigurationQueryParameter/Configuration for sourceTypeId #116

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface OutputConfigurationQueryParameters {
* @return the typeId of the configuration according to the
* {@link ConfigurationSourceType}
*/
@Schema(required = true, description = "TypeId of the configuration according to the corresponding ConfigurationTypeDescriptor.")
@JsonProperty("typeId")
String getTypeId();
@Schema(required = true, description = "The type ID of the corresponding ConfigurationSourceType defined by this output.")
@JsonProperty("sourceTypeId")
String getSourceTypeId();
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@
* Definition of a parameters object received by the server from a client for configurations.
*/
public class OutputConfigurationQueryParameters extends ConfigurationQueryParameters {
private @NonNull String typeId;
private @NonNull String sourceTypeId;

/**
* Constructor for Jackson
*/
public OutputConfigurationQueryParameters() {
// Default constructor for Jackson
super();
this.typeId = TmfConfiguration.UNKNOWN;
this.sourceTypeId = TmfConfiguration.UNKNOWN;
}

/**
Expand All @@ -38,28 +38,28 @@ public OutputConfigurationQueryParameters() {
* the name of the configuration
* @param description
* the description of the configuration
* @param typeId
* the typeId of the configuration
* @param sourceTypeId
* the typeId of the configuration source
*
* @param parameters
* Map of parameters
*/
public OutputConfigurationQueryParameters(String name, String description, String typeId, Map<String, Object> parameters) {
public OutputConfigurationQueryParameters(String name, String description, String sourceTypeId, Map<String, Object> parameters) {
super(name, description, parameters);
this.typeId = typeId == null ? TmfConfiguration.UNKNOWN : typeId;
this.sourceTypeId = sourceTypeId == null ? TmfConfiguration.UNKNOWN : sourceTypeId;
}

/**
* @return the type ID of configuration or {@link TmfConfiguration#UNKNOWN} if not provided
*/
@NonNull public String getTypeId() {
return typeId;
@NonNull public String getSourceTypeId() {
return sourceTypeId;
}

@SuppressWarnings("nls")
@Override
public String toString() {
return "OutputConfigurationQueryParameters [name=" + getName() + ", description=" + getDescription()
+", typeId=" + getTypeId() + ", parameters=" + getParameters() + "]";
+", typeId=" + getSourceTypeId() + ", parameters=" + getParameters() + "]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@ public Response createProvider(
ITmfConfiguration inputConfig = new TmfConfiguration.Builder()
.setName(queryParameters.getName())
.setDescription(queryParameters.getDescription())
.setSourceTypeId(queryParameters.getTypeId())
.setSourceTypeId(queryParameters.getSourceTypeId())
.setParameters(queryParameters.getParameters())
.build();
String typeId = inputConfig.getSourceTypeId();
Expand Down
Loading