-
Notifications
You must be signed in to change notification settings - Fork 628
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
Add: Support Custom Sequence as a Backend of an API #12524
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
5c4b8b9
Init Commit
BLasan c5c9149
Add: New REST API to upload Custom Sequence
BLasan b55dabb
Add: Custom Sequence support for the APIS
BLasan 74443fb
Fix: Analytics Type conversion issue
BLasan 65628a4
Revamp: Endpoint Config update for API import via APICTL and REST
BLasan e7f8f2f
Fix: Sequence generating Issue
BLasan ab62a27
Changed: REST API of Custom Backend update
BLasan 64fb6e5
Add: Custom Backend to APICTL file created on revision deployment
BLasan f16e756
Remove: Unnecessary Codes
BLasan 011fdf0
Remove: Unwanted Codes in SynapseArtifactGenerator
BLasan d3355fb
Remove: APIDTO Sequence update
BLasan 081b0cf
Remove: APIDTO Sequence update unwanted comments
BLasan 9e18a89
Remove: APIDTO unwanted imports and spaces
BLasan fb45ec7
Remove: Unwnated Imports APIMgtDao
BLasan 8d58008
Fix: Revision create, delete, revision deploy, revision undeploy, rev…
BLasan 6bf0333
Fix: APICTL Import scenario
BLasan 76fb15d
Update: Custom Backend REST APIs
BLasan e99d50a
Fix: Check Style Issues
BLasan 485ba08
Remove: Unused Imports
BLasan 5f3f42e
Fix: Ununsed imports and checkstyle issues
BLasan a98b09d
Fix: CheckStyle issue in If clause
BLasan 10cebc6
Fix: APIProduct Issue
BLasan 471a6f4
Fix: APIProduct deployment error
BLasan 769bcab
Fix: Custom Backend Get Issue
BLasan e4f8d8a
Add: Custom Backend Delete
BLasan a310af7
Fix: API Product Endpoint adding issue
BLasan 6b8e22d
Update: REST APIs of Custom Backend
BLasan 4af356e
Fix: REST API Issues
BLasan 5b57348
Fix: Checkstyle Issues
BLasan e1317ec
Fix: Import Order Issue
BLasan 4209a86
Add: Endpoint Configurations data
BLasan aa58c51
Fix: Bugs in Revision scenarios
BLasan 1798fa5
Add: API Validation for Sequence Backend
BLasan 63f10f6
Add: NPE handling
BLasan df82c20
Fix: Sequence Backend Download Issue
BLasan 63ae2cf
Fix: Advertised only API Issue
BLasan 2edd31e
Add: Validations for APICTL Export scenario
BLasan 720909f
Rename: Custom Backend dir to Sequence Backend
BLasan ffac3a3
Rename: Custom Backend dir to Sequence Backend
BLasan a5c791b
Add: Schema for all database types
BLasan 3784395
Add: APICTL Project export Endpoint Configuration
BLasan 87f2e12
Fix: Sequence Backend storing issue in APICTL project
BLasan 1620f6c
Add: Composite Primary Key
BLasan b758283
Fix: JSON Parsing error with Number format exception
BLasan c47b485
Fix: Null Pointer Exception for non endpoint configs
BLasan 052e53a
Hadneld: Number Format Exceptions when parsing
BLasan 8bd45c3
Revert: SESSION TIMEOUT CONFIG in Publisher CommonUtil
BLasan 58e7b20
Remove: Unused Import
BLasan be1cb81
Fix: Commented Issues
BLasan d1bb088
Fix: Input Stream Closing Issue
BLasan 15c6b2f
Fix: TemplateUtil Test error
BLasan d7415a8
Handle: Transaction Rollbacks on failure
BLasan 67d5b98
Fix: Type in debug log
BLasan 54ae42a
Fix: Lint Issues
BLasan 43047d7
Add: Sequence Backend schema for MultiDC
BLasan d12fca0
Fix: Merge Conflicts
BLasan 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 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
76 changes: 76 additions & 0 deletions
76
...carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/model/SequenceBackendData.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,76 @@ | ||
/* | ||
* Copyright (c) 2024, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
* | ||
* WSO2 Inc. 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 org.wso2.carbon.apimgt.api.model; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add license header |
||
|
||
public class SequenceBackendData { | ||
private String Id; | ||
private String sequence; | ||
private String type; | ||
private String name; | ||
private String apiUUID; | ||
private String revisionUUID; | ||
|
||
public String getSequence() { | ||
return sequence; | ||
} | ||
|
||
public void setSequence(String sequence) { | ||
this.sequence = sequence; | ||
} | ||
|
||
public String getId() { | ||
return Id; | ||
} | ||
|
||
public void setId(String id) { | ||
Id = id; | ||
} | ||
|
||
public String getType() { | ||
return type; | ||
} | ||
|
||
public void setType(String type) { | ||
this.type = type; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public String getApiUUID() { | ||
return apiUUID; | ||
} | ||
|
||
public void setApiUUID(String apiUUID) { | ||
this.apiUUID = apiUUID; | ||
} | ||
|
||
public String getRevisionUUID() { | ||
return revisionUUID; | ||
} | ||
|
||
public void setRevisionUUID(String revisionUUID) { | ||
this.revisionUUID = revisionUUID; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,11 +109,12 @@ public boolean handleResponse(MessageContext messageContext) { | |
org.apache.axis2.context.MessageContext.setCurrentMessageContext(axis2MC); | ||
if (messageContext.getProperty(APIMgtGatewayConstants.BACKEND_REQUEST_END_TIME) == null) { | ||
messageContext.setProperty(APIMgtGatewayConstants.BACKEND_REQUEST_END_TIME, System.currentTimeMillis()); | ||
if (APIUtil.isAnalyticsEnabled()) { | ||
long executionStartTime = Long.parseLong((String) messageContext.getProperty(APIMgtGatewayConstants | ||
.BACKEND_REQUEST_START_TIME)); | ||
messageContext.setProperty(APIMgtGatewayConstants.BACKEND_LATENCY, System.currentTimeMillis() - | ||
executionStartTime); | ||
if (APIUtil.isAnalyticsEnabled() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How will this be applied in Sequence as a backend scenario |
||
&& messageContext.getProperty(APIMgtGatewayConstants.BACKEND_REQUEST_START_TIME) != null) { | ||
long executionStartTime = Long.parseLong( | ||
(String) messageContext.getProperty(APIMgtGatewayConstants.BACKEND_REQUEST_START_TIME)); | ||
messageContext.setProperty(APIMgtGatewayConstants.BACKEND_LATENCY, | ||
System.currentTimeMillis() - executionStartTime); | ||
} | ||
} | ||
return true; | ||
|
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
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.
Lets add Java doc comments. Check other places as well