-
Notifications
You must be signed in to change notification settings - Fork 0
Idiomatic improvements: interface cleanup, handler decomposition, element constants #39
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
Closed
Closed
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e217a96
fix: use idiomatic patterns for error messages and stream collection
Schmarvinius 4b7dabd
refactor: introduce AICoreElements constants; refactor DeploymentHand…
Schmarvinius f19362c
refactor: slim AICoreService interface to public API surface
Schmarvinius d6c02a1
refactor: decompose FioriRecommendationHandler into focused helpers
Schmarvinius ae07455
refactor: accept SDK API clients as constructor parameters
Schmarvinius bd834c2
docs: document RptInferenceClient as intentional public API
Schmarvinius 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
68 changes: 68 additions & 0 deletions
68
cds-feature-ai-core/src/main/java/com/sap/cds/feature/aicore/core/AICoreElements.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,68 @@ | ||
| /* | ||
| * © 2026 SAP SE or an SAP affiliate company and cds-feature-ai contributors. | ||
| */ | ||
| package com.sap.cds.feature.aicore.core; | ||
|
|
||
| /** Element name constants for AICore CDS entities, mirroring the CDS model definitions. */ | ||
| public final class AICoreElements { | ||
|
|
||
| private AICoreElements() {} | ||
|
|
||
| public static final class Deployment { | ||
|
|
||
| private Deployment() {} | ||
|
|
||
| public static final String ID = "id"; | ||
| public static final String DEPLOYMENT_URL = "deploymentUrl"; | ||
| public static final String CONFIGURATION_ID = "configurationId"; | ||
| public static final String CONFIGURATION_NAME = "configurationName"; | ||
| public static final String EXECUTABLE_ID = "executableId"; | ||
| public static final String SCENARIO_ID = "scenarioId"; | ||
| public static final String STATUS = "status"; | ||
| public static final String STATUS_MESSAGE = "statusMessage"; | ||
| public static final String TARGET_STATUS = "targetStatus"; | ||
| public static final String LAST_OPERATION = "lastOperation"; | ||
| public static final String LATEST_RUNNING_CONFIGURATION_ID = "latestRunningConfigurationId"; | ||
| public static final String TTL = "ttl"; | ||
| public static final String CREATED_AT = "createdAt"; | ||
| public static final String MODIFIED_AT = "modifiedAt"; | ||
| public static final String SUBMISSION_TIME = "submissionTime"; | ||
| public static final String START_TIME = "startTime"; | ||
| public static final String COMPLETION_TIME = "completionTime"; | ||
| public static final String RESOURCE_GROUP = "resourceGroup"; | ||
| } | ||
|
|
||
| public static final class ResourceGroup { | ||
|
|
||
| private ResourceGroup() {} | ||
|
|
||
| public static final String RESOURCE_GROUP_ID = "resourceGroupId"; | ||
| public static final String TENANT_ID = "tenantId"; | ||
| public static final String STATUS = "status"; | ||
| public static final String STATUS_MESSAGE = "statusMessage"; | ||
| public static final String CREATED_AT = "createdAt"; | ||
| public static final String LABELS = "labels"; | ||
| } | ||
|
|
||
| public static final class Configuration { | ||
|
|
||
| private Configuration() {} | ||
|
|
||
| public static final String ID = "id"; | ||
| public static final String NAME = "name"; | ||
| public static final String EXECUTABLE_ID = "executableId"; | ||
| public static final String SCENARIO_ID = "scenarioId"; | ||
| public static final String CREATED_AT = "createdAt"; | ||
| public static final String PARAMETER_BINDINGS = "parameterBindings"; | ||
| public static final String INPUT_ARTIFACT_BINDINGS = "inputArtifactBindings"; | ||
| public static final String RESOURCE_GROUP = "resourceGroup"; | ||
| } | ||
|
|
||
| public static final class Label { | ||
|
|
||
| private Label() {} | ||
|
|
||
| public static final String KEY = "key"; | ||
| public static final String VALUE = "value"; | ||
| } | ||
| } |
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
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.
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.
Bug: The
ServiceExceptionconstructor is being called with the signature(ErrorStatus, String messageTemplate, Object... args)where the last argument is both thetenantIdvararg and theThrowable cause. Depending on how theServiceExceptionconstructor is overloaded, the exceptionemay be treated as a plain message argument (i.e.,e.toString()interpolated into{}), not as the cause — meaning the original stack trace would be lost in the logged/serialized error.Verify that
ServiceExceptionhas an overload that unambiguously accepts a trailingThrowablecause separately from the vararg message parameters. If not, pass the cause explicitly using the dedicated two-argument form or cast toThrowableto resolve the overload correctly.Please provide feedback on the review comment by checking the appropriate box: