Changed path of user profile cpi classes
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fcb8d1c9 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fcb8d1c9 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fcb8d1c9 Branch: refs/heads/registry-refactoring Commit: fcb8d1c9c5c489cbee0faa0c18d62b3a31457731 Parents: 659da19 Author: Abhiit Karanjkar <[email protected]> Authored: Tue Nov 8 17:13:47 2016 -0500 Committer: Abhiit Karanjkar <[email protected]> Committed: Tue Nov 8 17:13:47 2016 -0500 ---------------------------------------------------------------------- .../userprofile/cpi/UserProfileCPI.java | 42 -------------------- .../userprofile/cpi/UserProfileException.java | 32 --------------- .../component-cpis/generate-cpi-stubs.sh | 4 +- .../component-cpis/user-profile-crud-cpi.thrift | 17 ++++++-- 4 files changed, 16 insertions(+), 79 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/fcb8d1c9/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileCPI.java ---------------------------------------------------------------------- diff --git a/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileCPI.java b/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileCPI.java deleted file mode 100644 index 76b5e39..0000000 --- a/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileCPI.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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.apache.airavata.userprofile.cpi; - -import org.apache.airavata.model.user.UserProfile; - -import java.util.List; - -public interface UserProfileCPI { - - public List<UserProfile> getAllUserProfilesInGateway(String gatewayId) throws UserProfileException; - - public String createUserProfile(UserProfile userProfile) throws UserProfileException; - - public boolean updateUserProfile(UserProfile userProfile) throws UserProfileException; - - public boolean deleteUserProfile(String userId) throws UserProfileException; - - public UserProfile getUserProfileFromUserId(String userId) throws UserProfileException; - - public UserProfile getUserProfileFromUserName(String userName, String gatewayId) throws UserProfileException; - - public boolean userProfileExists(String userName, String gatewayId) throws UserProfileException; -} http://git-wip-us.apache.org/repos/asf/airavata/blob/fcb8d1c9/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileException.java ---------------------------------------------------------------------- diff --git a/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileException.java b/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileException.java deleted file mode 100644 index 645210b..0000000 --- a/modules/user-profile/user-profile-cpi/src/main/java/org/apache/airavata/userprofile/cpi/UserProfileException.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF 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.apache.airavata.userprofile.cpi; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class UserProfileException extends Exception { - private final static Logger logger = LoggerFactory.getLogger(UserProfileException.class); - - public UserProfileException(Exception e) { - super(e); - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/fcb8d1c9/thrift-interface-descriptions/component-cpis/generate-cpi-stubs.sh ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/component-cpis/generate-cpi-stubs.sh b/thrift-interface-descriptions/component-cpis/generate-cpi-stubs.sh index d969040..3a28f99 100755 --- a/thrift-interface-descriptions/component-cpis/generate-cpi-stubs.sh +++ b/thrift-interface-descriptions/component-cpis/generate-cpi-stubs.sh @@ -74,7 +74,7 @@ REGISTRY_THRIFT_FILE='registry-api.thrift' REGISTRY_SRC_DIR='../../modules/registry/registry-server/registry-api-stubs/src/main/java/' REGISTRY_USER_PROFILE_CPI_THRIFT_FILE='user-profile-crud-cpi.thrift' -REGISTRY_USER_PROFILE_SRC_DIR='../../modules/registry/registry-cpi/src/main/java' +REGISTRY_USER_PROFILE_SRC_DIR='../../modules/user-profile/user-profile-cpi/src/main/java' # Initialize the thrift arguments. # Since most of the Airavata API and Data Models have includes, use recursive option by default. @@ -190,7 +190,7 @@ do gfac) echo "Generate GFac Stubs" generate_thrift_stubs ${GFAC_THRIFT_FILE} ${GFAC_SRC_DIR} ;; - uprofcpi) echo "Generate REgistry User Profile CPI" + uprofcpi) echo "Generate Registry User Profile CPI" generate_thrift_stubs ${REGISTRY_USER_PROFILE_CPI_THRIFT_FILE} ${REGISTRY_USER_PROFILE_SRC_DIR} ;; registry) echo "Generate Registry Stubs" http://git-wip-us.apache.org/repos/asf/airavata/blob/fcb8d1c9/thrift-interface-descriptions/component-cpis/user-profile-crud-cpi.thrift ---------------------------------------------------------------------- diff --git a/thrift-interface-descriptions/component-cpis/user-profile-crud-cpi.thrift b/thrift-interface-descriptions/component-cpis/user-profile-crud-cpi.thrift index 8cd9b0c..b3951d2 100644 --- a/thrift-interface-descriptions/component-cpis/user-profile-crud-cpi.thrift +++ b/thrift-interface-descriptions/component-cpis/user-profile-crud-cpi.thrift @@ -24,24 +24,35 @@ */ include "../data-models/user-group-models/user_profile_model.thrift" +include "registry_api_errors.thrift" namespace java org.apache.airavata.userprofile.crude.cpi -const string CS_CPI_VERSION = "0.16.0" +const string USER_PROFILE_CPI_VERSION = "0.16.0" service UserProfileCrudeService { string addUserProfile (1: required user_profile_model.UserProfile userProfile) throws (1:registry_api_errors.RegistryServiceException registryException); - string updateUserProfile (1: required user_profile_model.UserProfile userProfile) + bool updateUserProfile (1: required user_profile_model.UserProfile userProfile) throws (1:registry_api_errors.RegistryServiceException registryException); - user_profile_model.UserProfile getUserProfile(1: required string userId) + user_profile_model.UserProfile getUserProfileById(1: required string userId, 2: required string gatewayId) throws (1:registry_api_errors.RegistryServiceException registryException); bool deleteUserProfile(1: required string userId) throws (1:registry_api_errors.RegistryServiceException registryException); + list<user_profile_model.UserProfile> getAllUserProfilesInGateway (1: required string gatewayId) + throws (1:registry_api_errors.RegistryServiceException registryException); + + user_profile_model.UserProfile getUserProfileByName(1: required string userName, 2: required string gatewayId) + throws (1:registry_api_errors.RegistryServiceException registryException); + + bool doesUserExist(1: required string userName, 2: required string gatewayId) + throws (1:registry_api_errors.RegistryServiceException registryException); + + } \ No newline at end of file
