Add GatewayProfileService thrift handler
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/59826196 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/59826196 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/59826196 Branch: refs/heads/user-profile Commit: 598261960369714a8499cc04262453b61c1b8941 Parents: ce58c98 Author: Gourav Shenoy <[email protected]> Authored: Mon Mar 6 17:50:35 2017 -0500 Committer: Gourav Shenoy <[email protected]> Committed: Mon Mar 6 17:50:35 2017 -0500 ---------------------------------------------------------------------- .../handlers/GatewayProfileServiceHandler.java | 61 ++++++++++++++++++++ 1 file changed, 61 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/59826196/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GatewayProfileServiceHandler.java ---------------------------------------------------------------------- diff --git a/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GatewayProfileServiceHandler.java b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GatewayProfileServiceHandler.java new file mode 100644 index 0000000..082be22 --- /dev/null +++ b/airavata-services/profile-service/profile-service-server/src/main/java/org/apache/airavata/service/profile/handlers/GatewayProfileServiceHandler.java @@ -0,0 +1,61 @@ +package org.apache.airavata.service.profile.handlers; + +import org.apache.airavata.model.workspace.Gateway; +import org.apache.airavata.service.profile.gateway.cpi.GatewayProfileService; +import org.apache.airavata.service.profile.gateway.cpi.exception.GatewayProfileServiceException; +import org.apache.airavata.service.profile.gateway.cpi.profile_gateway_cpiConstants; +import org.apache.thrift.TException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; + +/** + * Created by goshenoy on 3/6/17. + */ +public class GatewayProfileServiceHandler implements GatewayProfileService.Iface { + + private final static Logger logger = LoggerFactory.getLogger(GatewayProfileServiceHandler.class); + + @Override + public String getAPIVersion() throws GatewayProfileServiceException { + try { + return profile_gateway_cpiConstants.GATEWAY_PROFILE_CPI_VERSION; + } catch (Exception ex) { + logger.error("Error getting API version, reason: " + ex.getMessage(), ex); + GatewayProfileServiceException exception = new GatewayProfileServiceException(); + exception.setMessage("Error getting API version, reason: " + ex.getMessage()); + throw ex; + } + } + + @Override + public String addGateway(Gateway gateway) throws GatewayProfileServiceException { + return null; + } + + @Override + public boolean updateGateway(String gatewayId, Gateway updatedGateway) throws GatewayProfileServiceException { + return false; + } + + @Override + public Gateway getGateway(String gatewayId) throws GatewayProfileServiceException { + return null; + } + + @Override + public boolean deleteGateway(String gatewayId) throws GatewayProfileServiceException { + return false; + } + + @Override + public List<Gateway> getAllGateways() throws GatewayProfileServiceException { + return null; + } + + @Override + public boolean isGatewayExist(String gatewayId) throws GatewayProfileServiceException { + return false; + } +}
