Search in sources :

Example 1 with AccountabilityConfigurationData

use of org.eclipse.winery.repository.rest.resources.apiData.AccountabilityConfigurationData in project winery by eclipse.

the class AccountabilityConfigurationResource method getAccountabilityConfiguration.

@GET
@Produces(MediaType.APPLICATION_JSON)
public Response getAccountabilityConfiguration() {
    AccountabilityConfigurationObject props = Environments.getInstance().getAccountabilityConfig();
    AccountabilityConfigurationData result = new AccountabilityConfigurationData();
    result.setAuthorizationSmartContractAddress(props.getEthereumAuthorizationSmartContractAddress());
    result.setProvenanceSmartContractAddress(props.getEthereumProvenanceSmartContractAddress());
    result.setBlockchainNodeUrl(props.getGethUrl());
    result.setActiveKeystore(props.getEthereumCredentialsFileName());
    result.setKeystorePassword(props.getEthereumPassword());
    result.setSwarmGatewayUrl(props.getSwarmGatewayUrl());
    return Response.ok(result).build();
}
Also used : AccountabilityConfigurationData(org.eclipse.winery.repository.rest.resources.apiData.AccountabilityConfigurationData) AccountabilityConfigurationObject(org.eclipse.winery.common.configuration.AccountabilityConfigurationObject) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Aggregations

GET (javax.ws.rs.GET)1 Produces (javax.ws.rs.Produces)1 AccountabilityConfigurationObject (org.eclipse.winery.common.configuration.AccountabilityConfigurationObject)1 AccountabilityConfigurationData (org.eclipse.winery.repository.rest.resources.apiData.AccountabilityConfigurationData)1