usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sfeld...@apache.org
Subject [2/8] incubator-usergrid git commit: remove application id
Date Wed, 01 Jul 2015 22:52:31 GMT
remove application id


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

Branch: refs/heads/two-dot-o-dev
Commit: cd6b63d23f7bc30e6ea2fc87e2a11d95f0cb9d67
Parents: d1c1943
Author: Shawn Feldman <sfeldman@apache.org>
Authored: Wed Jul 1 09:06:23 2015 -0600
Committer: Shawn Feldman <sfeldman@apache.org>
Committed: Wed Jul 1 09:06:23 2015 -0600

----------------------------------------------------------------------
 .../usergrid/corepersistence/CpEntityManagerFactory.java       | 1 -
 .../corepersistence/rx/impl/AllApplicationsObservableImpl.java | 3 +--
 .../src/main/java/org/apache/usergrid/persistence/Schema.java  | 1 -
 .../src/test/java/org/apache/usergrid/CoreITSetupImpl.java     | 6 ++----
 .../test/java/org/apache/usergrid/persistence/CounterIT.java   | 5 ++---
 .../java/org/apache/usergrid/persistence/EntityManagerIT.java  | 3 +--
 .../persistence/cassandra/EntityManagerFactoryImplIT.java      | 4 +---
 7 files changed, 7 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cd6b63d2/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
index a962def..025acbf 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityManagerFactory.java
@@ -83,7 +83,6 @@ import rx.Observable;
 
 import static java.lang.String.CASE_INSENSITIVE_ORDER;
 
-import static org.apache.usergrid.persistence.Schema.PROPERTY_APPLICATION_ID;
 import static org.apache.usergrid.persistence.Schema.PROPERTY_NAME;
 import static org.apache.usergrid.persistence.Schema.TYPE_APPLICATION;
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cd6b63d2/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
index b130ac6..9c766a8 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/rx/impl/AllApplicationsObservableImpl.java
@@ -118,8 +118,7 @@ public class AllApplicationsObservableImpl implements AllApplicationsObservable
 
                         @Override
                         public ApplicationScope call( final Entity entity ) {
-                            final UUID uuid = UUIDUtils.tryExtractUUID(
-                                entity.getField( Schema.PROPERTY_APPLICATION_ID ).getValue().toString()
);
+                            final UUID uuid =entity.getId().getUuid();
                             return getApplicationScope( uuid );
                         }
                     } );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cd6b63d2/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java b/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java
index 1e3826d..b42995a 100644
--- a/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java
+++ b/stack/core/src/main/java/org/apache/usergrid/persistence/Schema.java
@@ -108,7 +108,6 @@ public class Schema {
     public static final String TYPE_MEMBER = "member";
 
     public static final String PROPERTY_ACTIVATED = "activated";
-    public static final String PROPERTY_APPLICATION_ID = "applicationId";
     public static final String PROPERTY_COLLECTION_NAME = "collectionName";
     public static final String PROPERTY_CREATED = "created";
     public static final String PROPERTY_CONFIRMED = "confirmed";

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cd6b63d2/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java b/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
index 3b01d3c..30e8b35 100644
--- a/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
+++ b/stack/core/src/test/java/org/apache/usergrid/CoreITSetupImpl.java
@@ -34,8 +34,6 @@ import org.slf4j.LoggerFactory;
 
 import java.util.UUID;
 
-import static org.apache.usergrid.persistence.Schema.PROPERTY_APPLICATION_ID;
-
 
 public class CoreITSetupImpl implements CoreITSetup, TestEntityIndex {
     private static final Logger LOG = LoggerFactory.getLogger( CoreITSetupImpl.class );
@@ -125,8 +123,8 @@ public class CoreITSetupImpl implements CoreITSetup, TestEntityIndex {
     @Override
     public UUID createApplication( String organizationName, String applicationName ) throws
Exception {
         Entity appInfo = emf.createApplicationV2(organizationName, applicationName);
-        UUID applicationId = UUIDUtils.tryExtractUUID(
-            appInfo.getProperty(PROPERTY_APPLICATION_ID).toString());
+        UUID applicationId = appInfo.getUuid();
+
         return applicationId;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cd6b63d2/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
index 4e8b599..b16b943 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/CounterIT.java
@@ -48,7 +48,6 @@ import com.google.inject.Inject;
 
 import net.jcip.annotations.NotThreadSafe;
 
-import static org.apache.usergrid.persistence.Schema.PROPERTY_APPLICATION_ID;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
@@ -226,8 +225,8 @@ public class CounterIT extends AbstractCoreIT {
         organizationEntity = em.create( organizationEntity );
 
         Entity appInfo = setup.getEmf().createApplicationV2( orgName, appName  );
-        UUID applicationId = UUIDUtils.tryExtractUUID(
-            appInfo.getProperty(PROPERTY_APPLICATION_ID).toString());
+        UUID applicationId =
+            appInfo.getUuid();
 
         Map<String, Object> properties = new LinkedHashMap<String, Object>();
         properties.put( "name", orgName + "/" + appName );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cd6b63d2/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
index c70a141..1fc97e9 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/EntityManagerIT.java
@@ -39,7 +39,6 @@ import org.apache.usergrid.persistence.entities.User;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 import org.apache.usergrid.utils.UUIDUtils;
 
-import static org.apache.usergrid.persistence.Schema.PROPERTY_APPLICATION_ID;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
@@ -394,7 +393,7 @@ public class EntityManagerIT extends AbstractCoreIT {
 
         Entity appInfo =
             setup.getEmf().createApplicationV2( "testCounterOrg", "testEntityCounters" +
UUIDGenerator.newTimeUUID() );
-        UUID applicationId = UUIDUtils.tryExtractUUID( appInfo.getProperty( PROPERTY_APPLICATION_ID
).toString() );
+        UUID applicationId = appInfo.getUuid();
 
         Map<String, Object> properties = new LinkedHashMap<String, Object>();
         properties.put( "name", "testEntityCounters" );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/cd6b63d2/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
b/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
index 83760e2..ec5688d 100644
--- a/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
+++ b/stack/core/src/test/java/org/apache/usergrid/persistence/cassandra/EntityManagerFactoryImplIT.java
@@ -49,7 +49,6 @@ import rx.functions.Func2;
 
 import javax.annotation.concurrent.NotThreadSafe;
 
-import static org.apache.usergrid.persistence.Schema.PROPERTY_APPLICATION_ID;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
@@ -94,8 +93,7 @@ public class EntityManagerFactoryImplIT extends AbstractCoreIT {
 
     public UUID createApplication( String organizationName, String applicationName ) throws
Exception {
         Entity appInfo = emf.createApplicationV2(organizationName, applicationName);
-        UUID appId = UUIDUtils.tryExtractUUID(
-            appInfo.getProperty(PROPERTY_APPLICATION_ID).toString());
+        UUID appId = appInfo.getUuid();
         return appId;
     }
 


Mime
View raw message