usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [24/27] git commit: Added a check for the exporters application before it’s creation.
Date Tue, 01 Apr 2014 01:21:16 GMT
Added a check for the exporters application before it’s creation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/30c0a98b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/30c0a98b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/30c0a98b

Branch: refs/pull/92/merge
Commit: 30c0a98b28221f1a47e7317648bbb78c742daaad
Parents: b9ba6ac
Author: grey <greyes@apigee.com>
Authored: Mon Mar 31 17:22:04 2014 -0700
Committer: grey <greyes@apigee.com>
Committed: Mon Mar 31 17:22:04 2014 -0700

----------------------------------------------------------------------
 .../usergrid/management/export/ExportServiceImpl.java     | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/30c0a98b/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
b/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
index 0ad61ee..469e7b3 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/export/ExportServiceImpl.java
@@ -93,8 +93,16 @@ public class ExportServiceImpl implements ExportService {
         }
 
         if ( config.get( "applicationId" ) == null ) {
-            defaultExportApp = managementService
+
+            ApplicationInfo appExists = managementService.getApplicationInfo("exporters");
+
+            if(appExists == null) {
+                defaultExportApp = managementService
                     .createApplication( ( UUID ) config.get( "organizationId" ), defaultAppExportname
);
+            }
+            else
+                defaultExportApp = appExists;
+
             config.put( "applicationId", defaultExportApp.getId() );
             //logger.error( "application information from export info could not be found"
);
             //return null;


Mime
View raw message