-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: Skeleton code for configuration service per data provider
Includes also swagger doc updates. [Added] Skeleton code for configuration service per data provider Signed-off-by: Bernd Hufmann <[email protected]>
- Loading branch information
Showing
7 changed files
with
249 additions
and
0 deletions.
There are no files selected for viewing
24 changes: 24 additions & 0 deletions
24
...compass/incubator/internal/trace/server/jersey/rest/core/model/CreationConfiguration.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,24 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2023 Ericsson | ||
* | ||
* All rights reserved. This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 which | ||
* accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
|
||
package org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.model; | ||
|
||
import org.eclipse.jdt.annotation.NonNullByDefault; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
/** | ||
* Contributes to the model used for TSP swagger-core annotations. | ||
*/ | ||
@NonNullByDefault | ||
@Schema(allOf = Configuration.class) | ||
public interface CreationConfiguration extends Configuration { | ||
} |
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
29 changes: 29 additions & 0 deletions
29
...ator/internal/trace/server/jersey/rest/core/model/OutputConfigurationQueryParameters.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,29 @@ | ||
/********************************************************************** | ||
* Copyright (c) 2023 Ericsson | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License 2.0 which | ||
* accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
**********************************************************************/ | ||
|
||
package org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.model; | ||
|
||
import org.eclipse.jdt.annotation.NonNull; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
|
||
/** | ||
* Contributes to the model used for TSP swagger-core annotations. | ||
*/ | ||
@Schema(allOf = ConfigurationQueryParameters.class) | ||
public interface OutputConfigurationQueryParameters extends ConfigurationQueryParameters { | ||
|
||
/** | ||
* @return The configuration type ID | ||
*/ | ||
@Schema(required = true, description = "The configuration source type ID.") | ||
@NonNull String getTypeId(); | ||
} |
59 changes: 59 additions & 0 deletions
59
...nternal/trace/server/jersey/rest/core/model/views/OutputConfigurationQueryParameters.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,59 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2024 Ericsson | ||
* | ||
* All rights reserved. This program and the accompanying materials are | ||
* made available under the terms of the Eclipse Public License 2.0 which | ||
* accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
*******************************************************************************/ | ||
|
||
package org.eclipse.tracecompass.incubator.internal.trace.server.jersey.rest.core.model.views; | ||
|
||
import org.eclipse.jdt.annotation.Nullable; | ||
|
||
import com.fasterxml.jackson.databind.JsonNode; | ||
|
||
/** | ||
* Definition of a parameters object received by the server from a client for configurations to create | ||
* data providers. | ||
*/ | ||
public class OutputConfigurationQueryParameters extends ConfigurationQueryParameters { | ||
|
||
private @Nullable String typeId; | ||
|
||
/** | ||
* Constructor for Jackson | ||
*/ | ||
public OutputConfigurationQueryParameters() { | ||
super(); | ||
} | ||
|
||
/** | ||
* Constructor. | ||
* | ||
* @param parameters | ||
* json object | ||
* @param typeId | ||
* the configuration source type ID | ||
*/ | ||
public OutputConfigurationQueryParameters(JsonNode parameters, String typeId) { | ||
super(parameters); | ||
this.typeId = typeId; | ||
} | ||
|
||
/** | ||
* Gets the configuration source type ID. | ||
* @return the configuration source type ID | ||
*/ | ||
public String getTypeId() { | ||
return this.typeId; | ||
} | ||
|
||
@SuppressWarnings("nls") | ||
@Override | ||
public String toString() { | ||
return "OutputConfigurationQueryParameters [parameters=" + super.getParameters().toString() + ", typeId=" + typeId + "]"; | ||
} | ||
} |
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