You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/04/08 22:21:39 UTC
[12/40] git commit: Added a check for the exporters application before it’s creation.
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/heads/master
Commit: 30c0a98b28221f1a47e7317648bbb78c742daaad
Parents: b9ba6ac
Author: grey <gr...@apigee.com>
Authored: Mon Mar 31 17:22:04 2014 -0700
Committer: grey <gr...@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;