-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #532 from KavinduZoysa/data-mapped-model
Implement datamapper
- Loading branch information
Showing
125 changed files
with
12,191 additions
and
16 deletions.
There are no files selected for viewing
849 changes: 848 additions & 1 deletion
849
...del-generator-core/src/main/java/io/ballerina/flowmodelgenerator/core/DataMapManager.java
Large diffs are not rendered by default.
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
36 changes: 36 additions & 0 deletions
36
...n/java/io/ballerina/flowmodelgenerator/extension/request/DataMapperAddElementRequest.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,36 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com) | ||
* | ||
* WSO2 LLC. licenses this file to you 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. | ||
*/ | ||
|
||
package io.ballerina.flowmodelgenerator.extension.request; | ||
|
||
import com.google.gson.JsonElement; | ||
import io.ballerina.tools.text.LinePosition; | ||
|
||
/** | ||
* Represents a request to get the data mapper model for types. | ||
* | ||
* @param filePath file path of the source file | ||
* @param flowNode flow node of form | ||
* @param position position to add the element | ||
* @param propertyKey The property that needs to consider to get the type | ||
* @param targetField The target field that needs to consider to get the type | ||
* @since 2.0.0 | ||
*/ | ||
public record DataMapperAddElementRequest(String filePath, JsonElement flowNode, LinePosition position, | ||
String propertyKey, String targetField) { | ||
} |
37 changes: 37 additions & 0 deletions
37
...c/main/java/io/ballerina/flowmodelgenerator/extension/request/DataMapperModelRequest.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,37 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com) | ||
* | ||
* WSO2 LLC. licenses this file to you 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. | ||
*/ | ||
|
||
package io.ballerina.flowmodelgenerator.extension.request; | ||
|
||
import com.google.gson.JsonElement; | ||
import io.ballerina.tools.text.LinePosition; | ||
|
||
/** | ||
* Represents a request to get the data mapper model for types. | ||
* | ||
* @param filePath file path of the source file | ||
* @param flowNode diagram node | ||
* @param position position of the end of previous statement | ||
* @param propertyKey The property that needs to consider to get the type | ||
* @param targetField The target field that needs to consider to get the type | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
public record DataMapperModelRequest(String filePath, JsonElement flowNode, LinePosition position, String propertyKey, | ||
String targetField) { | ||
} |
37 changes: 37 additions & 0 deletions
37
...java/io/ballerina/flowmodelgenerator/extension/request/DataMapperQueryConvertRequest.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,37 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com) | ||
* | ||
* WSO2 LLC. licenses this file to you 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. | ||
*/ | ||
|
||
package io.ballerina.flowmodelgenerator.extension.request; | ||
|
||
import com.google.gson.JsonElement; | ||
import io.ballerina.tools.text.LinePosition; | ||
|
||
/** | ||
* Represents a request to get the data mapper model for types. | ||
* | ||
* @param filePath file path of the source file | ||
* @param flowNode flow node of form | ||
* @param position position of the cursor | ||
* @param propertyKey The property that needs to consider to get the type | ||
* @param targetField The target field that needs to consider to get the type | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
public record DataMapperQueryConvertRequest(String filePath, JsonElement flowNode, LinePosition position, | ||
String propertyKey, String targetField) { | ||
} |
36 changes: 36 additions & 0 deletions
36
.../main/java/io/ballerina/flowmodelgenerator/extension/request/DataMapperSourceRequest.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,36 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com) | ||
* | ||
* WSO2 LLC. licenses this file to you 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. | ||
*/ | ||
|
||
package io.ballerina.flowmodelgenerator.extension.request; | ||
|
||
import com.google.gson.JsonElement; | ||
|
||
/** | ||
* Represents a request to get the data mapper model for types. | ||
* | ||
* @param filePath file path of the source file | ||
* @param flowNode flow node of form | ||
* @param mappings data mappings | ||
* @param propertyKey The property that needs to consider to get the type | ||
* @param targetField The target field that needs to consider to get the type | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
public record DataMapperSourceRequest(String filePath, JsonElement flowNode, JsonElement mappings, String propertyKey, | ||
String targetField) { | ||
} |
34 changes: 34 additions & 0 deletions
34
...in/java/io/ballerina/flowmodelgenerator/extension/request/DataMapperVisualizeRequest.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,34 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com) | ||
* | ||
* WSO2 LLC. licenses this file to you 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. | ||
*/ | ||
|
||
package io.ballerina.flowmodelgenerator.extension.request; | ||
|
||
import com.google.gson.JsonElement; | ||
import io.ballerina.tools.text.LinePosition; | ||
|
||
/** | ||
* Represents a request to get the data mapper model for types. | ||
* | ||
* @param filePath file path of the source file | ||
* @param flowNode flow node of form | ||
* @param position position of the cursor | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
public record DataMapperVisualizeRequest(String filePath, JsonElement flowNode, LinePosition position) { | ||
} |
42 changes: 42 additions & 0 deletions
42
...java/io/ballerina/flowmodelgenerator/extension/response/DataMapperAddElementResponse.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,42 @@ | ||
/* | ||
* Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com) | ||
* | ||
* WSO2 LLC. licenses this file to you 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. | ||
*/ | ||
|
||
package io.ballerina.flowmodelgenerator.extension.response; | ||
|
||
/** | ||
* Represents the response containing data mapper model data mapping. | ||
* | ||
* @since 2.0.0 | ||
*/ | ||
public class DataMapperAddElementResponse extends AbstractFlowModelResponse { | ||
|
||
// TODO: Add diagram and mappings | ||
private String source; | ||
|
||
public DataMapperAddElementResponse() { | ||
|
||
} | ||
|
||
public void setSource(String source) { | ||
this.source = source; | ||
} | ||
|
||
public String getSource() { | ||
return this.source; | ||
} | ||
} |
Oops, something went wrong.