+ },
+
+ saveRole(appId) {
+ return $http.post(conf.api.saveRole.replace(':appId', appId))
+ .then(function(response) {
+ if (typeof response.data === 'object') {
+ return response.data;
+ } else {
+ return $q.reject(response.data);
+ }
+
+ }, function(response) {
+ // something went wrong
+ return $q.reject(response.data);
+ });
+ },
+
+ getCentralizedApps: function(userId) {
+
+ return $http.get(conf.api.centralizedApps + '?userId=' + userId,{
+ cache: false,
+ headers: {
+ 'X-ECOMP-RequestID':uuid4.generate()
+ }
+ })
+ .then(function(response) {
+ if (typeof response.data === 'object') {
+ return response.data;
+ } else {
+ return $q.reject(response.data);
+ }
+
+ }, function(response) {
+ // something went wrong
+ return $q.reject(response.data);
+ });
+ },
+
+ setManageRoleDetails:function(apps, id){
+ manageRoleDetails = {
+ apps: apps,
+ id: id
+ }
+ },
+
+ getManageRoleDetails: function(){
+ return manageRoleDetails;