-
Notifications
You must be signed in to change notification settings - Fork 2
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 #263 from axonivy-market/develop
MARP-1709 Create Marketplace release 1.7.0
- Loading branch information
Showing
105 changed files
with
3,818 additions
and
1,130 deletions.
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
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
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
14 changes: 14 additions & 0 deletions
14
marketplace-service/src/main/java/com/axonivy/market/config/RestTemplateConfig.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,14 @@ | ||
package com.axonivy.market.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.web.client.RestTemplate; | ||
|
||
@Configuration | ||
public class RestTemplateConfig { | ||
|
||
@Bean | ||
public RestTemplate restTemplate() { | ||
return new RestTemplate(); | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
marketplace-service/src/main/java/com/axonivy/market/constants/LoggingConstants.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,22 @@ | ||
package com.axonivy.market.constants; | ||
|
||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public class LoggingConstants { | ||
|
||
public static final String ENTRY_FORMAT = " <%s>%s</%s>%n"; | ||
public static final String ENTRY_START = " <LogEntry>\n"; | ||
public static final String ENTRY_END = " </LogEntry>\n"; | ||
public static final String DATE_FORMAT = "yyyy-MM-dd"; | ||
public static final String TIMESTAMP_FORMAT = "yyyy-MM-dd HH:mm:ss"; | ||
public static final String LOG_START = "<Logs>\n"; | ||
public static final String LOG_END = "</Logs>"; | ||
public static final String METHOD = "method"; | ||
public static final String ARGUMENTS = "arguments"; | ||
public static final String TIMESTAMP = "timestamp"; | ||
public static final String NO_ARGUMENTS = "No arguments"; | ||
public static final String MARKET_WEBSITE = "marketplace-website"; | ||
|
||
} |
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
39 changes: 39 additions & 0 deletions
39
...tplace-service/src/main/java/com/axonivy/market/controller/SecurityMonitorController.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,39 @@ | ||
package com.axonivy.market.controller; | ||
|
||
import com.axonivy.market.constants.GitHubConstants; | ||
import com.axonivy.market.github.service.GitHubService; | ||
import com.axonivy.market.github.model.ProductSecurityInfo; | ||
import com.axonivy.market.util.AuthorizationUtils; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.AllArgsConstructor; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import java.util.List; | ||
|
||
import static com.axonivy.market.constants.RequestMappingConstants.SECURITY_MONITOR; | ||
import static org.springframework.http.HttpHeaders.AUTHORIZATION; | ||
|
||
@RestController | ||
@RequestMapping(SECURITY_MONITOR) | ||
@Tag(name = "Security Monitor Controllers", description = "API collection to get Github Marketplace security's detail.") | ||
@AllArgsConstructor | ||
public class SecurityMonitorController { | ||
private final GitHubService gitHubService; | ||
|
||
@GetMapping | ||
@Operation(hidden = true) | ||
public ResponseEntity<Object> getGitHubMarketplaceSecurity( | ||
@RequestHeader(value = AUTHORIZATION) String authorizationHeader) { | ||
String token = AuthorizationUtils.getBearerToken(authorizationHeader); | ||
gitHubService.validateUserInOrganizationAndTeam(token, GitHubConstants.AXONIVY_MARKET_ORGANIZATION_NAME, | ||
GitHubConstants.AXONIVY_MARKET_TEAM_NAME); | ||
List<ProductSecurityInfo> securityInfoList = gitHubService.getSecurityDetailsForAllProducts(token, | ||
GitHubConstants.AXONIVY_MARKET_ORGANIZATION_NAME); | ||
return ResponseEntity.ok(securityInfoList); | ||
} | ||
} |
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
10 changes: 10 additions & 0 deletions
10
marketplace-service/src/main/java/com/axonivy/market/enums/AccessLevel.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,10 @@ | ||
package com.axonivy.market.enums; | ||
|
||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
@AllArgsConstructor | ||
public enum AccessLevel { | ||
NO_PERMISSION, ENABLED, DISABLED | ||
} |
Oops, something went wrong.