-
Notifications
You must be signed in to change notification settings - Fork 36
Update service design meta info #422
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
Merged
NipunaRanasinghe
merged 22 commits into
ballerina-platform:1.3.x
from
samithkavishke:metadata
Oct 27, 2025
Merged
Changes from 16 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
07bd65d
Add readonly params
samithkavishke 40942f7
Add listener support
samithkavishke 547c566
Correct the rabbitmq meta info
samithkavishke 93cfd2f
Add service class meta info
samithkavishke 50f3c90
Extract listener parameters
samithkavishke e538c49
Add metainfo to the http,graphql builder
samithkavishke fe863e4
Add metainfo to the http,graphql builder
samithkavishke cd8bd3f
Add multiple listners support
samithkavishke 2c57f64
Remove redundant comments
samithkavishke 37ab8ae
Add array logic to listner extractor
samithkavishke 6218529
Add asb custom extractor
samithkavishke 5b6c994
Remove redundant logics
samithkavishke 31cd7c4
Remove rabbitmq fallback logic
samithkavishke ac4378b
Add ftp meta info
samithkavishke 4438eab
Correct test cases
samithkavishke 54a8518
Correct the icons
samithkavishke ca4d59b
Merge 1.3.x
samithkavishke ab4cd49
Resolve check style issues
samithkavishke 9c8854c
Resolve check style issues
samithkavishke c285cbb
Resolve comments
samithkavishke be22409
Change the metadata name
samithkavishke 74e179f
Remove test updating logic
samithkavishke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
35 changes: 35 additions & 0 deletions
35
...generator-commons/src/main/java/io/ballerina/modelgenerator/commons/ReadOnlyMetaData.java
This file contains hidden or 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,35 @@ | ||
| /* | ||
| * 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.modelgenerator.commons; | ||
|
|
||
| /** | ||
| * Represents read-only metadata for a service. | ||
| * | ||
| * @param metadataKey The key/name of the metadata field | ||
| * @param displayName The display name for the metadata field | ||
| * @param kind The kind/category of the metadata field (e.g., ANNOTATION, SERVICE_DESCRIPTION, LISTENER_PARAM) | ||
| * | ||
| * @since 1.0.0 | ||
samithkavishke marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| */ | ||
| public record ReadOnlyMetaData( | ||
| String metadataKey, | ||
| String displayName, | ||
| String kind | ||
| ) { | ||
| } | ||
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -642,6 +642,36 @@ public List<Annotation> getAnnotationAttachments(String org, String packageName, | |
|
|
||
| } | ||
|
|
||
| public List<ReadOnlyMetaData> getReadOnlyMetaData(String orgName, String packageName, String serviceType) { | ||
| String sql = "SELECT " + | ||
| "metadata_key, " + | ||
| "display_name, " + | ||
| "kind " + | ||
| "FROM ServiceReadOnlyMetaData srmd " + | ||
| "JOIN Package p ON srmd.package_id = p.package_id " + | ||
| "WHERE p.name = ? AND p.org = ? "; | ||
| try (Connection conn = DriverManager.getConnection(dbPath); | ||
| PreparedStatement stmt = conn.prepareStatement(sql)) { | ||
| stmt.setString(1, packageName); | ||
| stmt.setString(2, orgName); | ||
|
|
||
| ResultSet rs = stmt.executeQuery(); | ||
| List<ReadOnlyMetaData> metaDataList = new ArrayList<>(); | ||
| while (rs.next()) { | ||
| metaDataList.add(new ReadOnlyMetaData( | ||
| rs.getString("metadata_key"), | ||
| rs.getString("display_name"), | ||
| rs.getString("kind") | ||
| )); | ||
| } | ||
| conn.close(); | ||
|
||
| return metaDataList; | ||
| } catch (SQLException e) { | ||
| Logger.getGlobal().severe("Error executing query: " + e.getMessage()); | ||
| return List.of(); | ||
| } | ||
| } | ||
|
|
||
| // Helper builder class | ||
| private static class ParameterDataBuilder { | ||
|
|
||
|
|
||
This file contains hidden or 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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.