You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/06/11 00:25:47 UTC
[01/19] incubator-usergrid git commit: Add organization export to
ExportAdmins tool and organization import to ImportAdmins tool.
Repository: incubator-usergrid
Updated Branches:
refs/heads/USERGRID-670-two-dot-o 5905b46fa -> 807789aaf
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 5b77534..8561300 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -496,7 +496,7 @@ public class ManagementServiceImpl implements ManagementService {
user = createAdminUserInternal( username, name, email, password, activated, disabled, userProperties );
}
- organization = createOrganizationInternal( organizationName, user, true, organizationProperties );
+ organization = createOrganizationInternal( null, organizationName, user, true, organizationProperties );
}
finally {
emailLock.unlock();
@@ -508,14 +508,16 @@ public class ManagementServiceImpl implements ManagementService {
}
- private OrganizationInfo createOrganizationInternal( String organizationName, UserInfo user, boolean activated )
- throws Exception {
- return createOrganizationInternal( organizationName, user, activated, null );
+ private OrganizationInfo createOrganizationInternal(
+ UUID orgUuid, String organizationName, UserInfo user, boolean activated) throws Exception {
+ return createOrganizationInternal( orgUuid, organizationName, user, activated, null );
}
- private OrganizationInfo createOrganizationInternal( String organizationName, UserInfo user, boolean activated,
- Map<String, Object> properties ) throws Exception {
+ private OrganizationInfo createOrganizationInternal(
+ UUID orgUuid, String organizationName, UserInfo user, boolean activated,
+ Map<String, Object> properties ) throws Exception {
+
if ( ( organizationName == null ) || ( user == null ) ) {
return null;
}
@@ -524,7 +526,13 @@ public class ManagementServiceImpl implements ManagementService {
Group organizationEntity = new Group();
organizationEntity.setPath( organizationName );
- organizationEntity = em.create( organizationEntity );
+
+ if ( orgUuid == null ) {
+ organizationEntity = em.create( organizationEntity );
+ } else {
+ em.create( orgUuid, Group.ENTITY_TYPE, organizationEntity.getProperties() );
+ organizationEntity = em.get( orgUuid, Group.class );
+ }
em.addToCollection( organizationEntity, "users", new SimpleEntityRef( User.ENTITY_TYPE, user.getUuid() ) );
@@ -536,20 +544,29 @@ public class ManagementServiceImpl implements ManagementService {
new OrganizationInfo( organizationEntity.getUuid(), organizationName, properties );
updateOrganization( organization );
- logger.info( "createOrganizationInternal: {}", organizationName );
- postOrganizationActivity( organization.getUuid(), user, "create", organizationEntity, "Organization",
- organization.getName(),
- "<a href=\"mailto:" + user.getEmail() + "\">" + user.getName() + " (" + user.getEmail()
- + ")</a> created a new organization account named " + organizationName, null );
+ if ( orgUuid == null ) { // no import ID specified, so do the activation email flow stuff
- startOrganizationActivationFlow( organization );
+ logger.info( "createOrganizationInternal: {}", organizationName );
+ postOrganizationActivity( organization.getUuid(), user, "create", organizationEntity, "Organization",
+ organization.getName(),
+ "<a href=\"mailto:" + user.getEmail() + "\">" + user.getName() + " (" + user.getEmail()
+ + ")</a> created a new organization account named " + organizationName, null );
+
+ startOrganizationActivationFlow( organization );
+ }
return organization;
}
@Override
- public OrganizationInfo createOrganization( String organizationName, UserInfo user, boolean activated )
+ public OrganizationInfo createOrganization(String organizationName, UserInfo user, boolean activated)
+ throws Exception {
+ return createOrganization( organizationName, user, activated );
+ }
+
+ @Override
+ public OrganizationInfo createOrganization(UUID orgUuid, String organizationName, UserInfo user, boolean activated)
throws Exception {
if ( ( organizationName == null ) || ( user == null ) ) {
@@ -563,7 +580,7 @@ public class ManagementServiceImpl implements ManagementService {
}
try {
groupLock.lock();
- return createOrganizationInternal( organizationName, user, activated );
+ return createOrganizationInternal( orgUuid, organizationName, user, activated );
}
finally {
groupLock.unlock();
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/tools/pom.xml b/stack/tools/pom.xml
index 0fac833..77fcee4 100644
--- a/stack/tools/pom.xml
+++ b/stack/tools/pom.xml
@@ -35,7 +35,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.7</version>
+ <version>2.9.1</version>
</plugin>
</plugins>
</reporting>
@@ -233,5 +233,21 @@
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
+
+ <dependency>
+ <groupId>org.apache.usergrid</groupId>
+ <artifactId>usergrid-test-utils</artifactId>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.usergrid</groupId>
+ <artifactId>usergrid-services</artifactId>
+ <classifier>tests</classifier>
+ <version>${project.version}</version>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
</project>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
index fe2752f..8831b89 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
@@ -1,6 +1,3 @@
-/**
- * Created by ApigeeCorporation on 4/9/15.
- */
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -26,6 +23,7 @@ import java.util.Map;
import java.util.Set;
import java.util.UUID;
+import com.google.common.collect.BiMap;
import org.codehaus.jackson.JsonGenerator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -39,7 +37,6 @@ import org.apache.usergrid.persistence.Query;
import org.apache.usergrid.persistence.Results;
import org.apache.usergrid.persistence.Results.Level;
import org.apache.usergrid.persistence.cassandra.CassandraService;
-import org.apache.usergrid.utils.JsonUtils;
/**
@@ -47,8 +44,10 @@ import org.apache.usergrid.utils.JsonUtils;
*/
public class ExportAdmins extends ExportingToolBase {
- static final Logger logger = LoggerFactory.getLogger( Export.class );
+ static final Logger logger = LoggerFactory.getLogger( ExportAdmins.class );
+ public static final String ADMIN_USERS_PREFIX = "admin-users";
+ public static final String ADMIN_USER_METADATA_PREFIX = "admin-user-metadata";
@Override
public void runTool( CommandLine line ) throws Exception {
@@ -61,30 +60,29 @@ public class ExportAdmins extends ExportingToolBase {
outputDir = createOutputParentDir();
logger.info( "Export directory: " + outputDir.getAbsolutePath() );
- exportApplicationsForOrg( null );
+ exportAdminUsers();
}
- private void exportApplicationsForOrg( Map.Entry<UUID, String> organization ) throws Exception {
+ private void exportAdminUsers() throws Exception {
+
+ int count = 0;
EntityManager em = emf.getEntityManager( CassandraService.MANAGEMENT_APPLICATION_ID );
- // Get the JSon serializer.
- JsonGenerator jg = getJsonGenerator( createOutputFile( "application", em.getApplication().getName() ) );
+ // write one JSON file for management application users
- jg.writeStartArray();
+ JsonGenerator usersFile =
+ getJsonGenerator( createOutputFile( ADMIN_USERS_PREFIX, em.getApplication().getName() ) );
+ usersFile.writeStartArray();
- // Create a GENERATOR for the application collections.
- JsonGenerator collectionsJg =
- getJsonGenerator( createOutputFile( "collections", em.getApplication().getName() ) );
- collectionsJg.writeStartObject();
+ // write one JSON file for metadata: collections, connections and dictionaries of those users
- Map<String, Object> metadata = em.getApplicationCollectionMetadata();
- echo( JsonUtils.mapToFormattedJsonString( metadata ) );
+ JsonGenerator metadataFile =
+ getJsonGenerator( createOutputFile( ADMIN_USER_METADATA_PREFIX, em.getApplication().getName() ) );
+ metadataFile.writeStartObject();
- // Loop through the collections. This is the only way to loop
- // through the entities in the application (former namespace).
- // for ( String collectionName : metadata.keySet() ) {
+ // query for and loop through all users in management application
Query query = new Query();
query.setLimit( MAX_ENTITY_FETCH );
@@ -95,33 +93,37 @@ public class ExportAdmins extends ExportingToolBase {
while ( entities.size() > 0 ) {
for ( Entity entity : entities ) {
- // Export the entity first and later the collections for
- // this entity.
- jg.writeObject( entity );
+
+ // write user to application file
+ usersFile.writeObject( entity );
echo( entity );
- saveCollectionMembers( collectionsJg, em, null, entity );
+ // write user's collections, connections, etc. to collections file
+ saveEntityMetadata( metadataFile, em, null, entity );
+
+ logger.debug("Exported user {}", entity.getProperty( "email" ));
+
+ count++;
+ if ( count % 1000 == 0 ) {
+ logger.info("Exported {} admin users", count);
+ }
+
}
- //we're done
if ( entities.getCursor() == null ) {
break;
}
-
query.setCursor( entities.getCursor() );
-
entities = em.searchCollection( em.getApplicationRef(), "users", query );
}
- //}
- // Close writer for the collections for this application.
- collectionsJg.writeEndObject();
- collectionsJg.close();
+ metadataFile.writeEndObject();
+ metadataFile.close();
- // Close writer and file for this application.
- jg.writeEndArray();
- jg.close();
- // }
+ usersFile.writeEndArray();
+ usersFile.close();
+
+ logger.info("Exported total of {} admin users", count);
}
@@ -132,8 +134,20 @@ public class ExportAdmins extends ExportingToolBase {
* @param application Application name
* @param entity entity
*/
- private void saveCollectionMembers( JsonGenerator jg, EntityManager em, String application, Entity entity )
- throws Exception {
+ private void saveEntityMetadata(
+ JsonGenerator jg, EntityManager em, String application, Entity entity) throws Exception {
+
+ saveCollections( jg, em, entity );
+ saveConnections( entity, em, jg );
+ saveOrganizations( entity, em, jg );
+ saveDictionaries( entity, em, jg );
+
+ // End the object if it was Started
+ jg.writeEndObject();
+ }
+
+
+ private void saveCollections(JsonGenerator jg, EntityManager em, Entity entity) throws Exception {
Set<String> collections = em.getCollections( entity );
@@ -164,17 +178,9 @@ public class ExportAdmins extends ExportingToolBase {
// End collection array.
jg.writeEndArray();
}
-
- // Write connections
- saveConnections( entity, em, jg );
-
- // Write dictionaries
- saveDictionaries( entity, em, jg );
-
- // End the object if it was Started
- jg.writeEndObject();
}
+
/**
* Persists the connection for this entity.
*/
@@ -207,8 +213,9 @@ public class ExportAdmins extends ExportingToolBase {
jg.writeEndObject();
}
+
/**
- * Persists the connection for this entity.
+ * Persists the outgoing connections for this entity.
*/
private void saveConnections( Entity entity, EntityManager em, JsonGenerator jg ) throws Exception {
@@ -232,5 +239,34 @@ public class ExportAdmins extends ExportingToolBase {
}
jg.writeEndObject();
}
+
+
+ /**
+ * Persists the incoming connections for this entity.
+ */
+ private void saveOrganizations(Entity entity, EntityManager em, JsonGenerator jg) throws Exception {
+
+ final BiMap<UUID, String> orgs = managementService.getOrganizationsForAdminUser( entity.getUuid() );
+
+ jg.writeFieldName( "organizations" );
+
+ jg.writeStartArray();
+
+ for ( UUID uuid : orgs.keySet() ) {
+
+ jg.writeStartObject();
+
+ jg.writeFieldName( "uuid" );
+ jg.writeObject( uuid );
+
+ jg.writeFieldName( "name" );
+ jg.writeObject( orgs.get( uuid ) );
+
+ jg.writeEndObject();
+ }
+
+ jg.writeEndArray();
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
index 76b2343..bf0a2e4 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
@@ -17,33 +17,29 @@
package org.apache.usergrid.tools;
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.UUID;
-
-import org.codehaus.jackson.JsonFactory;
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.JsonParser;
-import org.codehaus.jackson.JsonToken;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Options;
import org.apache.commons.io.filefilter.PrefixFileFilter;
-
import org.apache.usergrid.management.OrganizationInfo;
-import org.apache.usergrid.persistence.Entity;
+import org.apache.usergrid.management.UserInfo;
import org.apache.usergrid.persistence.EntityManager;
import org.apache.usergrid.persistence.EntityRef;
-import org.apache.usergrid.persistence.entities.Application;
+import org.apache.usergrid.persistence.entities.User;
import org.apache.usergrid.persistence.exceptions.DuplicateUniquePropertyExistsException;
-import org.apache.usergrid.utils.JsonUtils;
+import org.codehaus.jackson.JsonFactory;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonToken;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.UUID;
import static org.apache.usergrid.persistence.Schema.PROPERTY_TYPE;
import static org.apache.usergrid.persistence.Schema.PROPERTY_UUID;
@@ -75,14 +71,15 @@ public class ImportAdmins extends ToolBase {
@SuppressWarnings( "static-access" )
public Options createOptions() {
- Option hostOption =
- OptionBuilder.withArgName( "host" ).hasArg().withDescription( "Cassandra host" ).create( "host" );
+ Option hostOption = OptionBuilder.withArgName( "host" )
+ .hasArg().withDescription( "Cassandra host" ).create( "host" );
- Option inputDir = OptionBuilder.hasArg().withDescription( "input directory -inputDir" ).create( INPUT_DIR );
+ Option inputDir = OptionBuilder
+ .hasArg().withDescription( "input directory -inputDir" ).create( INPUT_DIR );
- Option verbose =
- OptionBuilder.withDescription( "Print on the console an echo of the content written to the file" )
- .create( VERBOSE );
+ Option verbose = OptionBuilder
+ .withDescription( "Print on the console an echo of the content written to the file" )
+ .create( VERBOSE );
Options options = new Options();
options.addOption( hostOption );
@@ -95,118 +92,101 @@ public class ImportAdmins extends ToolBase {
@Override
public void runTool( CommandLine line ) throws Exception {
+
startSpring();
setVerbose( line );
openImportDirectory( line );
- importApplications();
-
- importCollections();
+ importAdminUsers();
- //forces the counters to flush
- logger.info( "Sleeping 35 seconds for batcher" );
+ importMetadata();
- Thread.sleep( 35000 );
+ // forces the counters to flush
+// logger.info( "Sleeping 35 seconds for batcher" );
+// Thread.sleep( 35000 );
}
/**
- * Import applications
+ * Import admin users.
*/
- private void importApplications() throws Exception {
- String[] nanemspaceFileNames = importDir.list( new PrefixFileFilter( "application." ) );
- logger.info( "Applications to read: " + nanemspaceFileNames.length );
+ private void importAdminUsers() throws Exception {
+ String[] fileNames = importDir.list( new PrefixFileFilter( ExportAdmins.ADMIN_USERS_PREFIX + "." ) );
+ logger.info( "Applications to read: " + fileNames.length );
//this fails on the second run of the applications find out why.
- for ( String applicationName : nanemspaceFileNames ) {
+ for ( String fileName : fileNames ) {
try {
- importApplication( applicationName );
+ importAdminUsers( fileName );
}
catch ( Exception e ) {
- logger.warn( "Unable to import application: " + applicationName, e );
+ logger.warn( "Unable to import application: " + fileName, e );
}
}
}
/**
- * Imports a application
+ * Imports admin users.
*
- * @param applicationName file name where the application was exported.
+ * @param fileName Name of admin user data file.
*/
- private void importApplication( String applicationName ) throws Exception {
- // Open up application file.
- File applicationFile = new File( importDir, applicationName );
-
- logger.info( "Loading application file: " + applicationFile.getAbsolutePath() );
- JsonParser jp = getJsonParserForFile( applicationFile );
-
- JsonToken token = jp.nextToken();
- validateStartArray( token );
+ private void importAdminUsers( String fileName ) throws Exception {
- // Move to next object (the application).
- // The application object is the first object followed by all the
- // objects in this application.
- token = jp.nextValue();
-
- Application application = jp.readValueAs( Application.class );
-
- UUID appId = MANAGEMENT_APPLICATION_ID;
-
- EntityManager em = emf.getEntityManager( appId );
-
- // we now need to remove all roles, they'll be imported again below
-
- for ( Entry<String, String> entry : em.getRoles().entrySet() ) {
- em.deleteRole( entry.getKey() );
- }
+ int count = 0;
- //load all the dictionaries
- @SuppressWarnings( "unchecked" ) Map<String, Object> dictionaries =
- ( Map<String, Object> ) application.getMetadata( "dictionaries" );
+ File adminUsersFile = new File( importDir, fileName );
- if ( dictionaries != null ) {
- EntityManager rootEm = emf.getEntityManager( MANAGEMENT_APPLICATION_ID );
+ logger.info( "----- Loading file: " + adminUsersFile.getAbsolutePath() );
+ JsonParser jp = getJsonParserForFile( adminUsersFile );
- Entity appEntity = rootEm.get( appId );
+ JsonToken token = jp.nextToken();
+ validateStartArray( token );
+ EntityManager em = emf.getEntityManager( MANAGEMENT_APPLICATION_ID );
- for ( Entry<String, Object> dictionary : dictionaries.entrySet() ) {
- @SuppressWarnings( "unchecked" ) Map<Object, Object> value =
- ( Map<Object, Object> ) dictionary.getValue();
+ while ( jp.nextValue() != JsonToken.END_ARRAY ) {
- em.addMapToDictionary( appEntity, dictionary.getKey(), value );
- }
- }
+ @SuppressWarnings( "unchecked" )
+ Map<String, Object> entityProps = jp.readValueAs( HashMap.class );
- while ( jp.nextValue() != JsonToken.END_ARRAY ) {
- @SuppressWarnings( "unchecked" ) Map<String, Object> entityProps = jp.readValueAs( HashMap.class );
// Import/create the entity
UUID uuid = getId( entityProps );
String type = getType( entityProps );
+
try {
em.create( uuid, type, entityProps );
+
+ logger.debug( "Imported admin user {} {}", uuid, entityProps.get( "username" ) );
+ count++;
+ if ( count % 1000 == 0 ) {
+ logger.info("Imported {} admin users", count);
+ }
}
catch ( DuplicateUniquePropertyExistsException de ) {
- logger.error( "Unable to create entity. It appears to be a duplicate", de );
+ logger.warn( "Unable to create entity. It appears to be a duplicate: " +
+ "id={}, type={}, name={}, username={}",
+ new Object[] { uuid, type, entityProps.get("name"), entityProps.get("username")});
+ if ( logger.isDebugEnabled() ) {
+ logger.debug( "Exception" , de );
+ }
continue;
}
if ( em.get( uuid ) == null ) {
- logger.error( "Holy hell, we wrote an entity and it's missing. Entity Id was {} and type is {}", uuid,
- type );
+ logger.error( "Holy hell, we wrote an entity and it's missing. " +
+ "Entity Id was {} and type is {}", uuid, type );
System.exit( 1 );
}
-
- logger.info( "Counts {}", JsonUtils.mapToFormattedJsonString( em.getApplicationCounters() ) );
-
echo( entityProps );
}
- logger.info( "----- End of application:" + application.getName() );
+ logger.info( "----- End: Imported {} admin users from file {}",
+ count, adminUsersFile.getAbsolutePath() );
+
jp.close();
}
@@ -238,198 +218,181 @@ public class ImportAdmins extends ToolBase {
/**
* Import collections. Collections files are named: collections.<application_name>.Timestamp.json
*/
- private void importCollections() throws Exception {
- String[] collectionsFileNames = importDir.list( new PrefixFileFilter( "collections." ) );
- logger.info( "Collections to read: " + collectionsFileNames.length );
+ private void importMetadata() throws Exception {
+
+ String[] fileNames = importDir.list(
+ new PrefixFileFilter( ExportAdmins.ADMIN_USER_METADATA_PREFIX + "." ) );
+ logger.info( "Metadata files to read: " + fileNames.length );
- for ( String collectionName : collectionsFileNames ) {
+ for ( String fileName : fileNames ) {
try {
- importCollection( collectionName );
+ importMetadata( fileName );
}
catch ( Exception e ) {
- logger.warn( "Unable to import collection: " + collectionName, e );
+ logger.warn( "Unable to import metadata file: " + fileName, e );
}
}
}
- private void importCollection( String collectionFileName ) throws Exception {
- // Retrieve the namepsace for this collection. It's part of the name
- String applicationName = getApplicationFromColllection( collectionFileName );
-
- UUID appId = emf.lookupApplication( applicationName );
-
- //no org in path, this is a pre public beta so we need to create the new path
- if ( appId == null && !applicationName.contains( "/" ) ) {
- String fileName = collectionFileName.replace( "collections", "application" );
-
- File applicationFile = new File( importDir, fileName );
+ @SuppressWarnings( "unchecked" )
+ private void importMetadata( String fileName ) throws Exception {
- if ( !applicationFile.exists() ) {
- logger.error( "Could not load application file {} to search for org information",
- applicationFile.getAbsolutePath() );
- return;
- }
-
-
- logger.info( "Loading application file: " + applicationFile.getAbsolutePath() );
+ EntityManager em = emf.getEntityManager( MANAGEMENT_APPLICATION_ID );
- JsonParser jp = getJsonParserForFile( applicationFile );
+ File metadataFile = new File( importDir, fileName );
- JsonToken token = jp.nextToken();
- validateStartArray( token );
+ logger.info( "----- Loading metadata file: " + metadataFile.getAbsolutePath() );
- // Move to next object (the application).
- // The application object is the first object followed by all the
- // objects in this application.
- token = jp.nextValue();
+ JsonParser jp = getJsonParserForFile( metadataFile );
- Application application = jp.readValueAs( Application.class );
+ JsonToken jsonToken = null; // jp.nextToken();// START_OBJECT this is the outer hashmap
- jp.close();
+ int depth = 1;
- @SuppressWarnings( "unchecked" ) String orgName =
- ( ( Map<String, String> ) application.getMetadata( "organization" ) ).get( "value" );
+ while ( depth > 0 ) {
- OrganizationInfo info = managementService.getOrganizationByName( orgName );
+ jsonToken = jp.nextToken();
- if ( info == null ) {
- logger.error( "Could not find org with name {}", orgName );
- return;
+ if ( jsonToken == null ) {
+ logger.info("token is null, breaking");
+ break;
}
- applicationName = orgName + "/" + applicationName;
-
- appId = emf.lookupApplication( applicationName );
- }
-
-
- if ( appId == null ) {
- logger.error( "Unable to find application with name {}. Skipping collections", appId );
- return;
- }
-
- File collectionFile = new File( importDir, collectionFileName );
-
- logger.info( "Loading collections file: " + collectionFile.getAbsolutePath() );
-
- JsonParser jp = getJsonParserForFile( collectionFile );
+ if (jsonToken.equals( JsonToken.START_OBJECT )) {
+ depth++;
+ } else if (jsonToken.equals( JsonToken.END_OBJECT )) {
+ depth--;
+ }
- jp.nextToken(); // START_OBJECT this is the outter hashmap
+ if (jsonToken.equals( JsonToken.FIELD_NAME ) && depth == 2 ) {
+ jp.nextToken();
- EntityManager em = emf.getEntityManager( appId );
+ String entityOwnerId = jp.getCurrentName();
+ EntityRef entityRef = em.getRef( UUID.fromString( entityOwnerId ) );
- while ( jp.nextToken() != JsonToken.END_OBJECT ) {
- try {
- importEntitysStuff( jp, em );
- }
- catch ( NullPointerException nae ) {
- //consume the read of the value so we can move on to process the next token.
- jp.readValueAs( JsonNode.class );
+ Map<String, Object> metadata = (Map<String, Object>)jp.readValueAs( Map.class );
+ importEntityMetadata( em, entityRef, metadata );
}
}
- logger.info( "----- End of collections -----" );
+ logger.info( "----- End of metadata -----" );
jp.close();
}
/**
* Imports the entity's connecting references (collections and connections)
- *
- * @param jp JsonPrser pointing to the beginning of the object.
*/
- private void importEntitysStuff( JsonParser jp, EntityManager em ) throws Exception {
- // The entity that owns the collections
- String entityOwnerId = jp.getCurrentName();
- EntityRef ownerEntityRef = em.getRef( UUID.fromString( entityOwnerId ) );
-
-
- jp.nextToken(); // start object
-
- //this is done after getting the next token so that we only capture the JsonNode object
- // and not the entire file response.
- if ( ownerEntityRef == null ) {
- throw new NullPointerException( "Couldn't retrieve entity ref from: " + entityOwnerId );
+ @SuppressWarnings("unchecked")
+ private void importEntityMetadata(
+ EntityManager em, EntityRef entityRef, Map<String, Object> metadata ) throws Exception {
+
+ Map<String, Object> connectionsMap = (Map<String, Object>) metadata.get( "connections" );
+
+ if (connectionsMap != null && !connectionsMap.isEmpty()) {
+ for (String type : connectionsMap.keySet()) {
+ try {
+ UUID uuid = UUID.fromString( (String) connectionsMap.get( type ) );
+ EntityRef connectedEntityRef = em.getRef( uuid );
+ em.createConnection( entityRef, type, connectedEntityRef );
+
+ logger.debug( "Creating connection from {} type {} target {}",
+ new Object[]{entityRef, type, connectedEntityRef});
+
+ } catch (Exception e) {
+ if (logger.isDebugEnabled()) {
+ logger.error( "Error importing connection of type "
+ + type + " for user " + entityRef.getUuid(), e );
+ } else {
+ logger.error( "Error importing connection of type "
+ + type + " for user " + entityRef.getUuid() );
+ }
+ }
+ }
}
- // Go inside the value after getting the owner entity id.
- while ( jp.nextToken() != JsonToken.END_OBJECT ) {
- String collectionName = jp.getCurrentName();
+ Map<String, Object> dictionariesMap = (Map<String, Object>) metadata.get( "dictionaries" );
- if ( collectionName.equals( "connections" ) ) {
+ if (dictionariesMap != null && !dictionariesMap.isEmpty()) {
+ for (String name : dictionariesMap.keySet()) {
+ try {
+ Map<String, Object> dictionary = (Map<String, Object>) dictionariesMap.get( name );
+ em.addMapToDictionary( entityRef, name, dictionary );
- jp.nextToken(); // START_OBJECT
- while ( jp.nextToken() != JsonToken.END_OBJECT ) {
- String connectionType = jp.getCurrentName();
+ logger.debug("Creating dictionary for {} name {} map {}",
+ new Object[] { entityRef, name, dictionary });
- jp.nextToken(); // START_ARRAY
- while ( jp.nextToken() != JsonToken.END_ARRAY ) {
- String entryId = jp.getText();
- EntityRef entryRef = em.getRef( UUID.fromString( entryId ) );
- // Store in DB
- em.createConnection( ownerEntityRef, connectionType, entryRef );
+ } catch (Exception e) {
+ if (logger.isDebugEnabled()) {
+ logger.error( "Error importing dictionary name "
+ + name + " for user " + entityRef.getUuid(), e );
+ } else {
+ logger.error( "Error importing dictionary name "
+ + name + " for user " + entityRef.getUuid() );
}
}
}
- else if ( collectionName.equals( "dictionaries" ) ) {
+ }
- jp.nextToken(); // START_OBJECT
- while ( jp.nextToken() != JsonToken.END_OBJECT ) {
+ List<String> collectionsList = (List<String>) metadata.get( "collections" );
+ if (collectionsList != null && !collectionsList.isEmpty()) {
+ for (String name : collectionsList) {
+ try {
+ UUID uuid = UUID.fromString( (String) connectionsMap.get( name ) );
+ EntityRef collectedEntityRef = em.getRef( uuid );
+ em.addToCollection( entityRef, name, collectedEntityRef );
+
+ logger.debug("Add to collection of {} name {} entity {}",
+ new Object[] { entityRef, name, collectedEntityRef });
+
+ } catch (Exception e) {
+ if (logger.isDebugEnabled()) {
+ logger.error( "Error adding to collection "
+ + name + " for user " + entityRef.getUuid(), e );
+ } else {
+ logger.error( "Error adding to collection "
+ + name + " for user " + entityRef.getUuid() );
+ }
+ }
+ }
+ }
- String dictionaryName = jp.getCurrentName();
+ List<Object> organizationsList = (List<Object>) metadata.get( "organizations" );
+ if (organizationsList != null && !organizationsList.isEmpty()) {
- jp.nextToken();
+ for ( Object orgObject : organizationsList ) {
- @SuppressWarnings( "unchecked" ) Map<String, Object> dictionary = jp.readValueAs( HashMap.class );
+ Map<String, Object> orgMap = (Map<String, Object>)orgObject;
+ UUID orgUuid = UUID.fromString( (String)orgMap.get("uuid") );
+ String orgName = (String)orgMap.get("name");
- em.addMapToDictionary( ownerEntityRef, dictionaryName, dictionary );
- }
- }
+ User user = em.get( entityRef, User.class );
+ final UserInfo userInfo = managementService.getAdminUserByEmail( user.getEmail() );
- else {
- // Regular collections
+ // create org only if it does not exist
+ OrganizationInfo orgInfo = managementService.getOrganizationByUuid( orgUuid );
+ if ( orgInfo == null ) {
+ try {
+ managementService.createOrganization( orgUuid, orgName, userInfo, false );
+ orgInfo = managementService.getOrganizationByUuid( orgUuid );
- jp.nextToken(); // START_ARRAY
- while ( jp.nextToken() != JsonToken.END_ARRAY ) {
- String entryId = jp.getText();
- EntityRef entryRef = em.getRef( UUID.fromString( entryId ) );
+ logger.debug( "Created new org {} for user {}",
+ new Object[]{orgInfo.getName(), user.getEmail()} );
- // store it
- em.addToCollection( ownerEntityRef, collectionName, entryRef );
+ } catch (DuplicateUniquePropertyExistsException dpee ) {
+ logger.error("Org {} already exists", orgName );
+ }
+ } else {
+ managementService.addAdminUserToOrganization( userInfo, orgInfo, false );
+ logger.debug( "Added user {} to org {}", new Object[]{user.getEmail(), orgName} );
}
}
}
}
- /**
- * Extract a application name from a collectionsFileName in the way:
- * collections.<a_name_space_name>.TIMESTAMP.json
- *
- * @param collectionFileName
- * a collection file name
- * @return the application name for this collections file name
- */
- /**
- * Extract a application name from a collectionsFileName in the way: collections.<a_name_space_name>.TIMESTAMP.json
- *
- * @param collectionFileName a collection file name
- *
- * @return the application name for this collections file name
- */
- private String getApplicationFromColllection( String collectionFileName ) {
- int firstDot = collectionFileName.indexOf( "." );
- int secondDot = collectionFileName.indexOf( ".", firstDot + 1 );
-
- // The application will be in the subString between the dots.
-
- String appName = collectionFileName.substring( firstDot + 1, secondDot );
-
- return appName.replace( PATH_REPLACEMENT, "/" );
- }
-
/**
* Open up the import directory based on <code>importDir</code>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
index d0780a6..63187a4 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
@@ -64,7 +64,7 @@ public abstract class ToolBase {
static final Logger logger = LoggerFactory.getLogger( ToolBase.class );
- protected static final String PATH_REPLACEMENT = "USERGIRD-PATH-BACKSLASH";
+ protected static final String PATH_REPLACEMENT = "-";
protected EmbeddedServerHelper embedded = null;
@@ -80,6 +80,10 @@ public abstract class ToolBase {
public void startTool( String[] args ) {
+ startTool( args, true );
+ }
+
+ public void startTool( String[] args, boolean exit ) {
CommandLineParser parser = new GnuParser();
CommandLine line = null;
try {
@@ -103,7 +107,9 @@ public abstract class ToolBase {
catch ( Exception e ) {
e.printStackTrace();
}
- System.exit( 0 );
+ if ( exit ) {
+ System.exit( 0 );
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/resources/log4j.properties b/stack/tools/src/main/resources/log4j.properties
index e9c23e5..73ade48 100644
--- a/stack/tools/src/main/resources/log4j.properties
+++ b/stack/tools/src/main/resources/log4j.properties
@@ -26,20 +26,21 @@ log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) [%c] - %m%n
-log4j.category.org.apache.usergrid.tools=TRACE, stdout
-
-log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN, stdout
-log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN, stdout
-log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN, stdout
-log4j.logger.org.apache.usergrid.persistence.cassandra.DaoUtils=WARN, stdout
-log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerImpl=WARN, stdout
-log4j.logger.org.apache.usergrid.persistence.cassandra.ConnectionRefImpl=WARN, stdout
-log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=WARN, stdout
-log4j.logger.org.apache.usergrid.rest.security.AllowAjaxFilter=WARN, stdout
-log4j.logger.me.prettyprint.hector.api.beans.AbstractComposite=ERROR, stdout
+log4j.logger.org.apache.usergrid.tools=DEBUG
+log4j.logger.org.apache.usergrid.management.cassandra=DEBUB
+
+log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN
+log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN
+log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN
+log4j.logger.org.apache.usergrid.persistence.cassandra.DaoUtils=WARN
+log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerImpl=WARN
+log4j.logger.org.apache.usergrid.persistence.cassandra.ConnectionRefImpl=WARN
+log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=WARN
+log4j.logger.org.apache.usergrid.rest.security.AllowAjaxFilter=WARN
+log4j.logger.me.prettyprint.hector.api.beans.AbstractComposite=ERROR
#log4j.logger.org.apache.usergrid.locking.singlenode.SingleNodeLockManagerImpl=DEBUG, stdout
-log4j.logger.org.apache.usergrid.persistence.hector.CountingMutator=INFO, stdout
+log4j.logger.org.apache.usergrid.persistence.hector.CountingMutator=INFO
#log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG, stdout
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java b/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java
new file mode 100644
index 0000000..bab6150
--- /dev/null
+++ b/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java
@@ -0,0 +1,232 @@
+/*
+ * 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.usergrid.tools;
+
+import com.google.common.collect.BiMap;
+import com.google.common.io.Files;
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.RandomStringUtils;
+import org.apache.usergrid.ServiceITSetup;
+import org.apache.usergrid.ServiceITSetupImpl;
+import org.apache.usergrid.ServiceITSuite;
+import org.apache.usergrid.management.OrganizationInfo;
+import org.apache.usergrid.management.OrganizationOwnerInfo;
+import org.apache.usergrid.management.UserInfo;
+import org.apache.usergrid.utils.UUIDUtils;
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.junit.ClassRule;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileOutputStream;
+import java.io.FilenameFilter;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.UUID;
+
+import static junit.framework.TestCase.assertNotNull;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+
+public class ExportImportAdminsTest {
+ static final Logger logger = LoggerFactory.getLogger( ExportImportAdminsTest.class );
+
+ @ClassRule
+ public static ServiceITSetup setup = new ServiceITSetupImpl( ServiceITSuite.cassandraResource );
+
+ @org.junit.Test
+ public void testExportUserAndOrg() throws Exception {
+
+ // create two orgs each with owning user
+
+ final String random1 = RandomStringUtils.randomAlphanumeric( 10 );
+ final OrganizationOwnerInfo orgOwnerInfo1 = setup.getMgmtSvc().createOwnerAndOrganization(
+ "org_" + random1, "user_" + random1, "user_" + random1,
+ "user_" + random1 + "@example.com", "password" );
+
+ final String random2 = RandomStringUtils.randomAlphanumeric( 10 );
+ final OrganizationOwnerInfo orgOwnerInfo2 = setup.getMgmtSvc().createOwnerAndOrganization(
+ "org_" + random2, "user_" + random2, "user_" + random2,
+ "user_" + random2 + "@example.com", "password" );
+
+ // Add user1 to org2
+
+ setup.getMgmtSvc().addAdminUserToOrganization(
+ orgOwnerInfo1.getOwner(), orgOwnerInfo2.getOrganization(), false );
+
+ setup.getMgmtSvc().addAdminUserToOrganization(
+ orgOwnerInfo1.getOwner(), orgOwnerInfo2.getOrganization(), false );
+
+ // export to file
+
+ String directoryName = "./target/export" + RandomStringUtils.randomAlphanumeric(10);
+
+ ExportAdmins exportAdmins = new ExportAdmins();
+ exportAdmins.startTool( new String[] {
+ "-host", "localhost:" + ServiceITSuite.cassandraResource.getRpcPort(),
+ "-outputDir", directoryName
+ }, false );
+
+ // read, parse and verify files
+
+ // first, the admin users file
+
+ File directory = new File( directoryName );
+ String[] adminUsersFileNames = directory.list( new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.startsWith("admin-users.");
+ }
+ });
+
+ // only one. read it into a map
+
+ File adminUsersFile = new File(
+ directory.getAbsolutePath() + File.separator + adminUsersFileNames[0] );
+
+ ObjectMapper mapper = new ObjectMapper();
+ JsonNode node = mapper.readTree( adminUsersFile );
+ assertTrue( node.isArray() );
+
+ // does file contain our two admin users?
+
+ Set<String> usernames = new HashSet<String>();
+ for ( int i=0; i<node.size(); i++) {
+ JsonNode jsonNode = node.get( i );
+ usernames.add( jsonNode.get("username").asText() );
+ }
+ assertTrue( usernames.contains( "user_" + random1 ));
+ assertTrue( usernames.contains( "user_" + random2 ));
+
+ // second, the metadata file
+
+ String[] metadataFileNames = directory.list( new FilenameFilter() {
+ public boolean accept(File dir, String name) {
+ return name.startsWith("admin-user-metadata.");
+ }
+ });
+
+ // only one, read it into a map
+
+ File metadataFile = new File(
+ directory.getAbsolutePath() + File.separator + metadataFileNames[0] );
+
+ mapper = new ObjectMapper();
+ node = mapper.readTree( metadataFile );
+ assertTrue( node.isObject() );
+
+ // do users belong to correct orgs
+
+ JsonNode user1node = node.findValue( orgOwnerInfo1.getOwner().getUuid().toString() );
+ JsonNode orgs1 = user1node.findValue( "organizations");
+ assertEquals( 2, orgs1.size() );
+
+ JsonNode user2node = node.findValue( orgOwnerInfo2.getOwner().getUuid().toString() );
+ JsonNode orgs2 = user2node.findValue( "organizations");
+ assertEquals( 1, orgs2.size() );
+ }
+
+
+ @org.junit.Test
+ public void testImportAdminUsersAndOrgs() throws Exception {
+
+ // first: generate the data file with unique user and org IDs and names
+
+ String rand1 = RandomStringUtils.randomAlphanumeric( 10 );
+ String rand2 = RandomStringUtils.randomAlphanumeric( 10 );
+
+ UUID user_uuid_1 = UUIDUtils.newTimeUUID();
+ UUID user_uuid_2 = UUIDUtils.newTimeUUID();
+
+ UUID org_uuid_1 = UUIDUtils.newTimeUUID();
+ UUID org_uuid_2 = UUIDUtils.newTimeUUID();
+
+ String user_name_1 = "user_" + rand1;
+ String user_name_2 = "user_" + rand2;
+
+ String org_name_1 = "org_" + rand1;
+ String org_name_2 = "org_" + rand2;
+
+ // loop through resource files with prefix 'admin-user' those are the data file templates
+
+ File resourcesDir = new File("./target/test-classes");
+ String[] fileNames = resourcesDir.list();
+ File tempDir = Files.createTempDir();
+
+ for ( String fileName : fileNames ) {
+
+ if ( fileName.startsWith("admin-user")) {
+
+ // substitute our new unique IDs and names and write data files to temp directory
+
+ String fileContent = IOUtils.toString( new FileInputStream(
+ resourcesDir.getAbsolutePath() + File.separator + fileName ) );
+
+ fileContent = fileContent.replaceAll( "USER_UUID_1", user_uuid_1.toString() );
+ fileContent = fileContent.replaceAll( "USER_UUID_2", user_uuid_2.toString() );
+
+ fileContent = fileContent.replaceAll( "ORG_UUID_1", org_uuid_1.toString() );
+ fileContent = fileContent.replaceAll( "ORG_UUID_2", org_uuid_2.toString() );
+
+ fileContent = fileContent.replaceAll( "USER_NAME_1", user_name_1 );
+ fileContent = fileContent.replaceAll( "USER_NAME_2", user_name_2 );
+
+ fileContent = fileContent.replaceAll( "ORG_NAME_1", org_name_1 );
+ fileContent = fileContent.replaceAll( "ORG_NAME_2", org_name_2 );
+
+ FileOutputStream os = new FileOutputStream(
+ tempDir.getAbsolutePath() + File.separator + fileName );
+
+ IOUtils.write( fileContent, os );
+ os.close();
+ }
+ }
+
+ // import data from temp directory
+
+ ImportAdmins importAdmins = new ImportAdmins();
+ importAdmins.startTool( new String[] {
+ "-host", "localhost:" + ServiceITSuite.cassandraResource.getRpcPort(),
+ "-inputDir", tempDir.getAbsolutePath()
+ }, false );
+
+ // verify that users and orgs were created correctly
+
+ OrganizationInfo orgInfo1 = setup.getMgmtSvc().getOrganizationByUuid( org_uuid_1 );
+ assertNotNull( orgInfo1 );
+
+ OrganizationInfo orgInfo2 = setup.getMgmtSvc().getOrganizationByUuid( org_uuid_2 );
+ assertNotNull( orgInfo2 );
+
+ BiMap<UUID, String> user1_orgs = setup.getMgmtSvc().getOrganizationsForAdminUser( user_uuid_1 );
+ assertEquals("user1 has two orgs", 2, user1_orgs.size() );
+
+ BiMap<UUID, String> user2_orgs = setup.getMgmtSvc().getOrganizationsForAdminUser( user_uuid_2 );
+ assertEquals("user2 has one orgs", 1, user2_orgs.size() );
+
+ List<UserInfo> org1_users = setup.getMgmtSvc().getAdminUsersForOrganization( org_uuid_1 );
+ assertEquals("org1 has one user", 1, org1_users.size() );
+
+ List<UserInfo> org2_users = setup.getMgmtSvc().getAdminUsersForOrganization( org_uuid_2 );
+ assertEquals("org2 has two users", 2, org2_users.size() );
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/src/test/resources/admin-user-metadata.usergrid-management.1433331614293.json
----------------------------------------------------------------------
diff --git a/stack/tools/src/test/resources/admin-user-metadata.usergrid-management.1433331614293.json b/stack/tools/src/test/resources/admin-user-metadata.usergrid-management.1433331614293.json
new file mode 100644
index 0000000..320f8ed
--- /dev/null
+++ b/stack/tools/src/test/resources/admin-user-metadata.usergrid-management.1433331614293.json
@@ -0,0 +1,85 @@
+{
+ "USER_UUID_1" : {
+ "activities" : [ ],
+ "devices" : [ ],
+ "feed" : [ "4c6275ba-09e5-11e5-bccc-97be717704cf" ],
+ "groups" : [ "4c5444ea-09e5-11e5-908d-61d76b477be4", "4c88c26a-09e5-11e5-8a66-594dd93a503d" ],
+ "roles" : [ ],
+ "connections" : { },
+ "organizations" : [ {
+ "uuid" : "ORG_UUID_1",
+ "name" : "ORG_NAME_1"
+ }, {
+ "uuid" : "ORG_UUID_2",
+ "name" : "ORG_NAME_2"
+ } ],
+ "dictionaries" : {
+ "credentials" : {
+ "mongo_pwd" : {
+ "recoverable" : true,
+ "encrypted" : false,
+ "secret" : "e045e38bbe5bf23334407ca9419ac94c",
+ "hashType" : null,
+ "created" : 1433331613575,
+ "cryptoChain" : [ "plaintext" ]
+ },
+ "password" : {
+ "recoverable" : false,
+ "encrypted" : true,
+ "secret" : "JDJhJDA5JEFpeC5IbHlpclo4ODFFVVNVTmN3Q3VEeGJ5emMyQlBwREN5WGZ6aHkydkVLdThJQlFzZExL",
+ "hashType" : null,
+ "created" : 1433331613505,
+ "cryptoChain" : [ "bcrypt" ]
+ },
+ "secret" : {
+ "recoverable" : true,
+ "encrypted" : false,
+ "secret" : "YWQ6bpC6YOMVf0s0dIQZ1CUdXIxDTY0",
+ "hashType" : null,
+ "created" : 1433331613575,
+ "cryptoChain" : [ "plaintext" ]
+ }
+ }
+ }
+ },
+ "USER_UUID_2" : {
+ "activities" : [ ],
+ "devices" : [ ],
+ "feed" : [ "4c8fee64-09e5-11e5-b3c6-57bd4e12c0b1" ],
+ "groups" : [ "4c88c26a-09e5-11e5-8a66-594dd93a503d" ],
+ "roles" : [ ],
+ "connections" : { },
+ "organizations" : [ {
+ "uuid" : "ORG_UUID_2",
+ "name" : "ORG_NAME_2"
+ } ],
+ "dictionaries" : {
+ "credentials" : {
+ "mongo_pwd" : {
+ "recoverable" : true,
+ "encrypted" : false,
+ "secret" : "e7b4fc7db5b97088997e44eced015d42",
+ "hashType" : null,
+ "created" : 1433331614067,
+ "cryptoChain" : [ "plaintext" ]
+ },
+ "password" : {
+ "recoverable" : false,
+ "encrypted" : true,
+ "secret" : "JDJhJDA5JER0RTdNSldMRjkxSUlJVm5hZWJMTy5DelFLemwvd2tXdUttaHViZWdyRjRURVdxYk5TUGJt",
+ "hashType" : null,
+ "created" : 1433331614018,
+ "cryptoChain" : [ "bcrypt" ]
+ },
+ "secret" : {
+ "recoverable" : true,
+ "encrypted" : false,
+ "secret" : "YWQ6Rx9A-m5U-TihpkPVS4PmyQO4qig",
+ "hashType" : null,
+ "created" : 1433331614067,
+ "cryptoChain" : [ "plaintext" ]
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/tools/src/test/resources/admin-users.usergrid-management.1433331614293.json
----------------------------------------------------------------------
diff --git a/stack/tools/src/test/resources/admin-users.usergrid-management.1433331614293.json b/stack/tools/src/test/resources/admin-users.usergrid-management.1433331614293.json
new file mode 100644
index 0000000..5f192bf
--- /dev/null
+++ b/stack/tools/src/test/resources/admin-users.usergrid-management.1433331614293.json
@@ -0,0 +1,23 @@
+[ {
+ "uuid" : "USER_UUID_1",
+ "type" : "user",
+ "name" : "USER_NAME_1",
+ "created" : 1433331613479,
+ "modified" : 1433331613479,
+ "username" : "USER_NAME_1",
+ "email" : "USER_NAME_1@example.com",
+ "activated" : true,
+ "confirmed" : true,
+ "disabled" : false
+}, {
+ "uuid" : "USER_UUID_2",
+ "type" : "user",
+ "name" : "USER_NAME_2",
+ "created" : 1433331614002,
+ "modified" : 1433331614002,
+ "username" : "USER_NAME_2",
+ "email" : "USER_NAME_2@example.com",
+ "activated" : true,
+ "confirmed" : true,
+ "disabled" : false
+} ]
\ No newline at end of file
[19/19] incubator-usergrid git commit: Merge branch 'two-dot-o' of
https://git-wip-us.apache.org/repos/asf/incubator-usergrid into
USERGRID-670-two-dot-o
Posted by gr...@apache.org.
Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into USERGRID-670-two-dot-o
# By Dave Johnson (10) and GERey (2)
# Via Dave Johnson (2) and others
* 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid:
[USERGRID-613] juryrigged a way to test for lowercase and mixed case values.
POM should be set to 1.0.2 not 1.0.2-SNAPSHOT
Incrementing snapshot version to 1.0.3-SNAPSHOT.
Updating CHANGELOG for 1.0.2 release.
Set correct version for creating RC1.
Updating CHANGELOG and applying USERGRID-358 fixes to LICENSE and NOTICE.
Merge fix to assets test, fix to LocalFileBinaryStore and more sensible logging in REST tests.
Fix for StackOverflow introduced when org support as added to Admin User import/export.
Preparing for 1.0.2 RC 1.
Small fixes to ImportAdmins tool based on results of testing.
[USERGRID-613] Added fix mixed cases in two-dot-o.
Add organization export to ExportAdmins tool and organization import to ImportAdmins tool.
Conflicts:
stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/807789aa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/807789aa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/807789aa
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 807789aaf667e5b440d00e0933084532bc6d3ec0
Parents: 5905b46 31c1f21
Author: GERey <gr...@apigee.com>
Authored: Wed Jun 10 15:25:44 2015 -0700
Committer: GERey <gr...@apigee.com>
Committed: Wed Jun 10 15:25:44 2015 -0700
----------------------------------------------------------------------
CHANGELOG | 28 +-
LICENSE | 55 ++-
NOTICE | 13 +-
stack/java-sdk-old/pom.xml | 2 +-
.../org/apache/usergrid/rest/IndexResource.java | 10 +-
.../apache/usergrid/rest/IndexResourceIT.java | 92 +++--
.../applications/assets/AssetResourceIT.java | 13 +-
.../rest/test/resource2point0/ClientSetup.java | 14 +-
.../endpoints/SystemResource.java | 21 +
.../endpoints/mgmt/ApplicationResource.java | 6 +-
stack/rest/src/test/resources/log4j.properties | 6 +
.../usergrid/management/ManagementService.java | 5 +-
.../cassandra/ManagementServiceImpl.java | 49 ++-
.../assets/data/LocalFileBinaryStore.java | 51 +++
stack/tools/pom.xml | 18 +-
.../org/apache/usergrid/tools/ExportAdmins.java | 154 ++++---
.../org/apache/usergrid/tools/ImportAdmins.java | 412 +++++++++----------
.../org/apache/usergrid/tools/ToolBase.java | 10 +-
stack/tools/src/main/resources/log4j.properties | 19 +
.../usergrid/tools/ExportImportAdminsTest.java | 234 +++++++++++
...adata.usergrid-management.1433331614293.json | 85 ++++
...users.usergrid-management.1433331614293.json | 23 ++
22 files changed, 946 insertions(+), 374 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/807789aa/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
----------------------------------------------------------------------
diff --cc stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
index 7966d3b,82e7c70..7dc4eb5
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
@@@ -112,16 -116,12 +116,16 @@@ public class ClientSetup implements Tes
organization = restClient.management().orgs().post(new Organization( orgName,username,username+"@usergrid.com",username,username, null ));
+ refreshIndex();
+
restClient.management().token().post(new Token(username,username));
- refreshIndex();
-
- restClient.management().orgs().organization(organization.getName()).app().post(new Application(appName));
+ application = restClient.management().orgs().organization(organization.getName()).app().post(new Application(appName));
+ // application = restClient.management().orgs().organization(organization.getName()).app().get();
+ appUuid = (String)((LinkedHashMap)application.getDynamicProperties().get( "data" )).get( orgName+"/"+appName );
+ refreshIndex();
+
}
public String getUsername(){return username;}
[16/19] incubator-usergrid git commit: Merge branch 'master' into
two-dot-o
Posted by gr...@apache.org.
Merge branch 'master' into two-dot-o
Conflicts:
stack/build-tools/pom.xml
stack/config/pom.xml
stack/core/pom.xml
stack/launcher/pom.xml
stack/mongo-emulator/pom.xml
stack/pom.xml
stack/rest/pom.xml
stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
stack/rest/src/test/resources/log4j.properties
stack/services/pom.xml
stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
stack/test-utils/pom.xml
stack/tools/pom.xml
stack/tools/src/main/resources/log4j.properties
stack/websocket/pom.xml
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/d8fdc3a1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/d8fdc3a1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/d8fdc3a1
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: d8fdc3a1045a607d6f5a696a3f3b84c4a921023c
Parents: a784016 5fbe31f
Author: Dave Johnson <dm...@apigee.com>
Authored: Tue Jun 9 12:11:20 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Tue Jun 9 12:11:20 2015 -0400
----------------------------------------------------------------------
CHANGELOG | 28 +-
LICENSE | 55 ++-
NOTICE | 13 +-
stack/java-sdk-old/pom.xml | 2 +-
.../applications/assets/AssetResourceIT.java | 13 +-
stack/rest/src/test/resources/log4j.properties | 6 +
.../usergrid/management/ManagementService.java | 5 +-
.../cassandra/ManagementServiceImpl.java | 49 ++-
.../assets/data/LocalFileBinaryStore.java | 51 +++
stack/tools/pom.xml | 18 +-
.../org/apache/usergrid/tools/ExportAdmins.java | 154 ++++---
.../org/apache/usergrid/tools/ImportAdmins.java | 412 +++++++++----------
.../org/apache/usergrid/tools/ToolBase.java | 10 +-
stack/tools/src/main/resources/log4j.properties | 19 +
.../usergrid/tools/ExportImportAdminsTest.java | 234 +++++++++++
...adata.usergrid-management.1433331614293.json | 85 ++++
...users.usergrid-management.1433331614293.json | 23 ++
17 files changed, 841 insertions(+), 336 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
----------------------------------------------------------------------
diff --cc stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
index 6455748,10e9703..0fb5149
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
@@@ -399,14 -372,14 +399,15 @@@ public class AssetResourceIT extends Ab
// create the entity that will be the asset, an image
Map<String, String> payload = hashMap("name", "cassandra_eye.jpg");
- JsonNode node = resource().path(orgAppPath + "/foos")
- .header( "Authorization", "Bearer " + access_token )
- //.queryParam("access_token", access_token)
- .accept( MediaType.APPLICATION_JSON )
- .type( MediaType.APPLICATION_JSON_TYPE )
- .post(JsonNode.class, payload);
+
+ JsonNode node = resource().path("/test-organization/test-app/foos")
+ .queryParam("access_token", access_token)
+ .accept(MediaType.APPLICATION_JSON)
+ .type(MediaType.APPLICATION_JSON_TYPE)
+ .post(JsonNode.class, payload);
++
JsonNode idNode = node.get("entities").get(0).get("uuid");
- uuid = idNode.getTextValue();
+ uuid = idNode.textValue();
// post image data to the asset entity
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/rest/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --cc stack/rest/src/test/resources/log4j.properties
index 8b1eac2,3ae1591..4d3d764
--- a/stack/rest/src/test/resources/log4j.properties
+++ b/stack/rest/src/test/resources/log4j.properties
@@@ -24,13 -24,12 +24,19 @@@ log4j.rootLogger=WARN,stdou
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
#log4j.appender.stdout.layout=org.apache.log4j.SimpleLayout
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) [%c] - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) %c{1} - %m%n
++<<<<<<< HEAD
+log4j.logger.org.apache.usergrid=INFO
+#log4j.logger.org.apache.usergrid.cassandra=DEBUG
+#log4j.logger.org.apache.usergrid.persistence.cassandra=DEBUG
++=======
+ log4j.category.org.apache=ERROR, stdout
+ log4j.category.org.apache.usergrid=WARN, stdout
+ log4j.category.org.apache.usergrid.rest=INFO, stdout
++>>>>>>> master
+log4j.logger.org.apache.usergrid.persistence.cassandra.CounterUtils=ERROR, stdout
log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN, stdout
log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN, stdout
log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN, stdout
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --cc stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 85ddcbb,b3204a7..2f5f7d0
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@@ -516,8 -496,7 +516,8 @@@ public class ManagementServiceImpl impl
user = createAdminUserInternal( username, name, email, password, activated, disabled, userProperties );
}
+ logger.debug("User created");
- organization = createOrganizationInternal( organizationName, user, true, organizationProperties );
+ organization = createOrganizationInternal( null, organizationName, user, true, organizationProperties );
}
finally {
emailLock.unlock();
@@@ -529,28 -508,21 +529,28 @@@
}
- private OrganizationInfo createOrganizationInternal( String organizationName, UserInfo user, boolean activated )
- private OrganizationInfo createOrganizationInternal(
- UUID orgUuid, String organizationName, UserInfo user, boolean activated) throws Exception {
++ private OrganizationInfo createOrganizationInternal( UUID orgUuid, String organizationName, UserInfo user, boolean activated )
+ throws Exception {
+ logger.debug("createOrganizationInternal1");
- return createOrganizationInternal( organizationName, user, activated, null );
+ return createOrganizationInternal( orgUuid, organizationName, user, activated, null );
}
- private OrganizationInfo createOrganizationInternal( String organizationName, UserInfo user, boolean activated,
- private OrganizationInfo createOrganizationInternal(
- UUID orgUuid, String organizationName, UserInfo user, boolean activated,
- Map<String, Object> properties ) throws Exception {
++ private OrganizationInfo createOrganizationInternal( UUID orgUuid, String organizationName, UserInfo user, boolean activated,
+ Map<String, Object> properties ) throws Exception {
+
+ logger.info( "createOrganizationInternal2: {}", organizationName );
- if ( ( organizationName == null ) || ( user == null ) ) {
+ if ( organizationName == null ) {
+ logger.debug("organizationName = null");
+ return null;
+ }
+ if ( user == null ) {
+ logger.debug("user = null");
return null;
}
- logger.info( "createOrganizationInternal: {}", organizationName );
- EntityManager em = emf.getEntityManager( MANAGEMENT_APPLICATION_ID );
+
+ EntityManager em = emf.getEntityManager( smf.getManagementAppId() );
Group organizationEntity = new Group();
organizationEntity.setPath( organizationName );
@@@ -567,37 -544,39 +573,47 @@@
new OrganizationInfo( organizationEntity.getUuid(), organizationName, properties );
updateOrganization( organization );
- postOrganizationActivity( organization.getUuid(), user, "create", organizationEntity, "Organization",
- organization.getName(),
- "<a href=\"mailto:" + user.getEmail() + "\">" + user.getName() + " (" + user.getEmail()
- + ")</a> created a new organization account named " + organizationName, null );
+ if ( orgUuid == null ) { // no import ID specified, so do the activation email flow stuff
+
+ logger.info( "createOrganizationInternal: {}", organizationName );
+ postOrganizationActivity( organization.getUuid(), user, "create", organizationEntity, "Organization",
+ organization.getName(),
+ "<a href=\"mailto:" + user.getEmail() + "\">" + user.getName() + " (" + user.getEmail()
+ + ")</a> created a new organization account named " + organizationName, null );
- startOrganizationActivationFlow( organization );
+ startOrganizationActivationFlow( organization );
+ }
+
+
return organization;
}
@Override
- public OrganizationInfo createOrganization( String organizationName, UserInfo user, boolean activated )
+ public OrganizationInfo createOrganization(String organizationName, UserInfo user, boolean activated)
+ throws Exception {
+ return createOrganization( null, organizationName, user, activated );
+ }
+
+ @Override
+ public OrganizationInfo createOrganization(UUID orgUuid, String organizationName, UserInfo user, boolean activated)
throws Exception {
- if ( ( organizationName == null ) || ( user == null ) ) {
+ if ( organizationName == null ) {
+ logger.debug("organizationName = null");
return null;
}
+ if ( user == null ) {
+ logger.debug("user = null");
+ return null;
+ }
+
Lock groupLock =
- getUniqueUpdateLock( lockManager, MANAGEMENT_APPLICATION_ID, organizationName, "groups", "path" );
- EntityManager em = emf.getEntityManager( MANAGEMENT_APPLICATION_ID );
- if ( !em.isPropertyValueUniqueForEntity( "group", "path", organizationName ) ) {
- throw new DuplicateUniquePropertyExistsException( "group", "path", organizationName );
+ getUniqueUpdateLock( lockManager, smf.getManagementAppId(), organizationName, "groups", PROPERTY_PATH );
+ EntityManager em = emf.getEntityManager( smf.getManagementAppId() );
+ if ( !em.isPropertyValueUniqueForEntity( "group", PROPERTY_PATH, organizationName ) ) {
+ throw new DuplicateUniquePropertyExistsException( "group", PROPERTY_PATH, organizationName );
}
try {
groupLock.lock();
@@@ -1507,20 -1472,21 +1523,25 @@@
String path = null;
- for ( Entity entity : results.getEntities() ) {
+ do {
+ for ( Entity entity : results.getEntities() ) {
- path = ( String ) entity.getProperty( "path" );
+ path = ( String ) entity.getProperty( PROPERTY_PATH );
- if ( path != null ) {
- path = path.toLowerCase();
- }
+ if ( path != null ) {
+ path = path.toLowerCase();
+ }
- try {
-- organizations.put( entity.getUuid(), path );
- } catch (IllegalArgumentException e) {
- logger.warn("Error adding " + entity.getUuid() + ":" + path + " to BiMap: " + e.getMessage() );
++ try {
++ organizations.put( entity.getUuid(), path );
++ } catch (IllegalArgumentException e) {
++ logger.warn("Error adding " + entity.getUuid() + ":" + path + " to BiMap: " + e.getMessage() );
++ }
}
- }
+ results = results.getNextPageResults();
- }while(results != null);
++
++ } while(results != null);
return organizations;
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/tools/pom.xml
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
----------------------------------------------------------------------
diff --cc stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
index fe2752f,8831b89..5bbad14
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ExportAdmins.java
@@@ -20,26 -17,26 +17,22 @@@
package org.apache.usergrid.tools;
--
--import java.util.List;
--import java.util.Map;
--import java.util.Set;
--import java.util.UUID;
-
- import org.codehaus.jackson.JsonGenerator;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
--
++import org.apache.usergrid.persistence.index.query.Query;
+ import com.google.common.collect.BiMap;
-import org.codehaus.jackson.JsonGenerator;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import org.apache.commons.cli.CommandLine;
--
++import org.apache.usergrid.corepersistence.util.CpNamingUtils;
import org.apache.usergrid.persistence.ConnectionRef;
import org.apache.usergrid.persistence.Entity;
import org.apache.usergrid.persistence.EntityManager;
--import org.apache.usergrid.persistence.Query;
import org.apache.usergrid.persistence.Results;
--import org.apache.usergrid.persistence.Results.Level;
--import org.apache.usergrid.persistence.cassandra.CassandraService;
- import org.apache.usergrid.utils.JsonUtils;
++import org.codehaus.jackson.JsonGenerator;
++import org.slf4j.Logger;
++import org.slf4j.LoggerFactory;
++
++import java.util.List;
++import java.util.Map;
++import java.util.Set;
++import java.util.UUID;
/**
@@@ -65,26 -64,25 +60,25 @@@ public class ExportAdmins extends Expor
}
- private void exportApplicationsForOrg( Map.Entry<UUID, String> organization ) throws Exception {
+ private void exportAdminUsers() throws Exception {
- EntityManager em = emf.getEntityManager( CassandraService.MANAGEMENT_APPLICATION_ID );
+ int count = 0;
- // Get the JSon serializer.
- JsonGenerator jg = getJsonGenerator( createOutputFile( "application", em.getApplication().getName() ) );
- EntityManager em = emf.getEntityManager( CassandraService.MANAGEMENT_APPLICATION_ID );
++ EntityManager em = emf.getEntityManager( CpNamingUtils.MANAGEMENT_APPLICATION_ID );
- jg.writeStartArray();
+ // write one JSON file for management application users
+
+ JsonGenerator usersFile =
+ getJsonGenerator( createOutputFile( ADMIN_USERS_PREFIX, em.getApplication().getName() ) );
+ usersFile.writeStartArray();
- // Create a GENERATOR for the application collections.
- JsonGenerator collectionsJg =
- getJsonGenerator( createOutputFile( "collections", em.getApplication().getName() ) );
- collectionsJg.writeStartObject();
+ // write one JSON file for metadata: collections, connections and dictionaries of those users
- Map<String, Object> metadata = em.getApplicationCollectionMetadata();
- echo( JsonUtils.mapToFormattedJsonString( metadata ) );
+ JsonGenerator metadataFile =
+ getJsonGenerator( createOutputFile( ADMIN_USER_METADATA_PREFIX, em.getApplication().getName() ) );
+ metadataFile.writeStartObject();
- // Loop through the collections. This is the only way to loop
- // through the entities in the application (former namespace).
- // for ( String collectionName : metadata.keySet() ) {
+ // query for and loop through all users in management application
Query query = new Query();
query.setLimit( MAX_ENTITY_FETCH );
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/tools/src/main/java/org/apache/usergrid/tools/ToolBase.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/d8fdc3a1/stack/tools/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --cc stack/tools/src/main/resources/log4j.properties
index b993313,73ade48..c288fec
--- a/stack/tools/src/main/resources/log4j.properties
+++ b/stack/tools/src/main/resources/log4j.properties
@@@ -26,28 -26,21 +26,47 @@@ log4j.appender.stdout=org.apache.log4j.
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) [%c] - %m%n
++<<<<<<< HEAD
+log4j.category.org.apache.usergrid.tools=TRACE
+log4j.category.org.apache.usergrid=ERROR
+
+log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.DaoUtils=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerImpl=WARN, stdout
+log4j.logger.org.apache.usergrid.persistence.cassandra.ConnectionRefImpl=WARN, stdout
+log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=WARN, stdout
+log4j.logger.org.apache.usergrid.rest.security.AllowAjaxFilter=WARN, stdout
+log4j.logger.me.prettyprint.hector.api.beans.AbstractComposite=ERROR, stdout
+#log4j.logger.org.apache.usergrid.locking.singlenode.SingleNodeLockManagerImpl=DEBUG, stdout
+#log4j.logger.org.apache.usergrid.persistence.hector.CountingMutator=INFO, stdout
++=======
+ log4j.logger.org.apache.usergrid.tools=DEBUG
+ log4j.logger.org.apache.usergrid.management.cassandra=DEBUB
+
+ log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN
+ log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN
+ log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerFactoryImpl=WARN
+ log4j.logger.org.apache.usergrid.persistence.cassandra.DaoUtils=WARN
+ log4j.logger.org.apache.usergrid.persistence.cassandra.EntityManagerImpl=WARN
+ log4j.logger.org.apache.usergrid.persistence.cassandra.ConnectionRefImpl=WARN
+ log4j.logger.me.prettyprint.cassandra.hector.TimingLogger=WARN
+ log4j.logger.org.apache.usergrid.rest.security.AllowAjaxFilter=WARN
+ log4j.logger.me.prettyprint.hector.api.beans.AbstractComposite=ERROR
+ #log4j.logger.org.apache.usergrid.locking.singlenode.SingleNodeLockManagerImpl=DEBUG, stdout
+
+ log4j.logger.org.apache.usergrid.persistence.hector.CountingMutator=INFO
+
++>>>>>>> master
#log4j.logger.org.apache.cassandra.service.StorageProxy=DEBUG, stdout
+#log4j.logger.org.apache.usergrid.corepersistence=INFO
+#log4j.logger.org.apache.usergrid.corepersistence.CpSetup=INFO
+log4j.logger.org.apache.usergrid.corepersistence.CpEntityManagerFactory=DEBUG
+#log4j.logger.org.apache.usergrid.corepersistence.CpEntityManager=DEBUG
+#log4j.logger.org.apache.usergrid.corepersistence.CpRelationManager=DEBUG
+
+#log4j.logger.org.apache.usergrid.persistence.collection=INFO
+#log4j.logger.org.apache.usergrid.persistence.index=DEBUG
+#log4j.logger.org.apache.usergrid.persistence.index.impl=DEBUG
[11/19] incubator-usergrid git commit: Updating CHANGELOG and
applying USERGRID-358 fixes to LICENSE and NOTICE.
Posted by gr...@apache.org.
Updating CHANGELOG and applying USERGRID-358 fixes to LICENSE and NOTICE.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/e661a647
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/e661a647
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/e661a647
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: e661a64792bd9c8b7cece2069bcb7e42cc80cd24
Parents: 04605d3
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 14:18:50 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 14:18:50 2015 -0400
----------------------------------------------------------------------
CHANGELOG | 25 +++++++++++++++++++++++--
LICENSE | 55 +++++++++++++++++++++++++++++++++++++++----------------
NOTICE | 13 ++-----------
3 files changed, 64 insertions(+), 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e661a647/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 66c17e1..47a080a 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,28 @@
-Usergrid 1.0.1
+
+Usergrid 1.0.2
--------------------------------------------------------------------------------
+Usergrid 1.0.2 is a minor release with bug fixes and small improvements.
+Here are the highlights:
+
+Bugs fixed
+
+* S3 upload fails on OpenJDK and Java 8 (fixed by JClouds upgrade)
+* Asset data deleted when connection to Asset deleted
+* Portal stores app password as clear-text
+
+Improvements
+
+* Cassandra key-space names are now configurable
+
+New features
+
+* ExportAdmins: a new tool to export Admin Users, credentials and organizations
+* ImportAdmins: a new tool to import Admin Users, credentials and organizations
+* Central SSO: Usergrid-Usergrid SSO via new /management/externaltoken end-point
+
+Here's the full list of JIRA issues resolved:
+https://issues.apache.org/jira/issues/?jql=project%3Dusergrid%20and%20fixVersion%3D1.0.2
Usergrid 1.0.1
--------------------------------------------------------------------------------
@@ -28,4 +50,3 @@ Here are the highlights:
* Stack - Build now works with latest versions of Maven.
* Stack - Build now supports property for configurable argline parameters.
* Stack - Build now sets java.awt.headless to prevent forkedbooter popups.
-
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e661a647/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index 64c7ebc..dd22519 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,6 @@
+Apache Usergrid itself is licensed under the terms of the Apache License:
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -201,6 +203,7 @@
See the License for the specific language governing permissions and
limitations under the License.
+------------------------------------------------------------------------------
USERGRID SUBCOMPONENTS
@@ -213,7 +216,7 @@ IOS SDK
-------
For the SBJson component:
- Copyright (C) 2009-2011 Stig Brautaset. All rights reserved.
+ Copyright (c) Stig Brautaset. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
@@ -240,10 +243,10 @@ For the SBJson component:
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
For the SSKeychain component:
+-----------------------------
- Copyright (c) 2010-2014 Sam Soffes, http://soff.es
+ Copyright (c) Sam Soffes, http://soff.es
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -264,8 +267,8 @@ For the SSKeychain component:
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-This product includes software developed at
-The Apache Software Foundation (http://www.apache.org/).
+Other components:
+-----------------
This product bundles SBJson, which is available under a "3-clause BSD" license.
For details, see sdks/ios/UGAPI/SBJson/ .
@@ -273,19 +276,39 @@ For details, see sdks/ios/UGAPI/SBJson/ .
This product bundles SSKeychain, which is available under a "MIT/X11" license.
For details, see sdks/ios/UGAPI/SSKeychain/.
-This product bundles angular-senario.js, part of jQuery JavaScript Library v1.10.2
-which Includes Sizzle.js Copyright 2005, 2013 jQuery Foundation, Inc. and
-other contributors. Released under the MIT license.
+This product bundles angular-scenario.js, part of jQuery JavaScript Library
+which Includes Sizzle.js Copyright (c) jQuery Foundation, Inc. and others.
+Released under the MIT license.
+
+This product bundles angular.js
+Copyright(c) Google, Inc. Released under the MIT license.
+
+This product bundles Bootstrap Copyright (c) Twitter, Inc
+Licensed under the MIT license.
+
+This product bundles jquery-ui
+Licensed under MIT license.
+
+This product bundles jquery
+Licensed under MIT license.
+
+This product bundles mocha.
+All rights reserved. Licensed under MIT.
+Copyright (c) TJ Holowaychuk <tj...@vision-media.ca>
+
+This product bundles SSToolkit.
+Copyright (c) Sam Soffes. All rights reserved.
+These files can be located within the /sdks/ios package.
+
+The product bundles Intro.js (MIT licensed)
+Copyright (c) usabli.ca - A weekend project by Afshin Mehrabani (@afshinmeh)
-This product bundles angular.js, specifically AngularJS v1.2.5 (c) 2010-2014
-Google, Inc. Released under the MIT license.
+This product bundles NPM MD5 (BSD-3 licensed)
+Copyright (c) Paul Vorbach and Copyright (C), Jeff Mott.
-This product bundles Bootstrap v2.3.2 Copyright 2012 Twitter, Inc
-Licensed under the Apache License v2.0
+This product bundles NewtonSoft.Json under MIT license
-This product bundles jquery-ui-1.8.9. Licensed under MIT license.
+This product bundles NSubsttute under BSD license
-This product bundles jquery-1.9.1 Licensed under MIT license.
+This product bundles Sphinx under BSD license
-This product bundles mocha. All rights reserved. Licensed under MIT.
-Copyright (c) 2011-2014 TJ Holowaychuk <tj...@vision-media.ca>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e661a647/NOTICE
----------------------------------------------------------------------
diff --git a/NOTICE b/NOTICE
index c1edc86..ef5af71 100644
--- a/NOTICE
+++ b/NOTICE
@@ -1,15 +1,6 @@
Apache Usergrid (incubating)
Copyright (c) The Apache Software Foundation.
-This product uses the following software:
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
-
-SSToolkit Copyright (c) 2009-2011 Sam Soffes. All rights reserved.
-These files can be located within the /sdks/ios package.
-
-Intro.js (MIT licensed)
-Copyright (C) 2013 usabli.ca - A weekend project by Afshin Mehrabani (@afshinmeh)
-
-NPM MD5 (BSD-3 licensed)
-Copyright (C) 2011-2012, Paul Vorbach and Copyright (C) 2009, Jeff Mott.
-
[17/19] incubator-usergrid git commit: [USERGRID-613] juryrigged a
way to test for lowercase and mixed case values.
Posted by gr...@apache.org.
[USERGRID-613] juryrigged a way to test for lowercase and mixed case values.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/7fd643cd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/7fd643cd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/7fd643cd
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 7fd643cdfd2d92dddcf0417bfbca565b4089efc0
Parents: e9ad00c
Author: GERey <gr...@apigee.com>
Authored: Tue Jun 9 15:36:06 2015 -0700
Committer: GERey <gr...@apigee.com>
Committed: Tue Jun 9 15:36:06 2015 -0700
----------------------------------------------------------------------
.../apache/usergrid/rest/IndexResourceIT.java | 92 ++++++++++++++------
.../rest/test/resource2point0/ClientSetup.java | 12 ++-
.../endpoints/SystemResource.java | 21 +++++
.../endpoints/mgmt/ApplicationResource.java | 6 +-
4 files changed, 100 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7fd643cd/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
index 77f443f..a310368 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/IndexResourceIT.java
@@ -32,6 +32,13 @@ import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
+import org.apache.usergrid.rest.test.resource2point0.AbstractRestIT;
+import org.apache.usergrid.rest.test.resource2point0.model.ApiResponse;
+import org.apache.usergrid.rest.test.resource2point0.model.Entity;
+import org.apache.usergrid.rest.test.resource2point0.model.QueryParameters;
+import org.apache.usergrid.rest.test.resource2point0.model.Token;
+
+import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
@@ -49,33 +56,66 @@ public class IndexResourceIT extends AbstractRestIT {
public IndexResourceIT(){
}
-
- @Ignore( "will finish when tests are working from rest" )
+//TODO: convert over and recheck intention of test.
+// @Ignore( "will finish when tests are working from rest" )
+// @Test
+// public void TestAddIndex() throws Exception{
+// String superToken = superAdminToken();
+//
+// Map<String, Object> data = new HashMap<String, Object>();
+// data.put( "replicas", 0 );
+// data.put( "shards", 1 );
+// data.put( "writeConsistency", "one" );
+//
+// UUID appId = this.context.getAppUuid();
+//
+// // change the password as admin. The old password isn't required
+// JsonNode node = null;
+// try {
+// node = mapper.readTree(resource().path("/system/index/" + appId)
+// .queryParam("access_token", superToken)
+// .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON_TYPE)
+// .post(String.class, data));
+// } catch (Exception e) {
+// LOG.error("failed", e);
+// fail(e.toString());
+// }
+// assertNull( getError( node ) );
+//
+// refreshIndex("test-organization", "test-app");
+//
+// }
@Test
- public void TestAddIndex() throws Exception{
- String superToken = superAdminToken();
-
- Map<String, Object> data = new HashMap<String, Object>();
- data.put( "replicas", 0 );
- data.put( "shards", 1 );
- data.put( "writeConsistency", "one" );
-
- UUID appId = this.context.getAppUuid();
-
- // change the password as admin. The old password isn't required
- JsonNode node = null;
- try {
- node = mapper.readTree(resource().path("/system/index/" + appId)
- .queryParam("access_token", superToken)
- .accept(MediaType.APPLICATION_JSON).type(MediaType.APPLICATION_JSON_TYPE)
- .post(String.class, data));
- } catch (Exception e) {
- LOG.error("failed", e);
- fail(e.toString());
- }
- assertNull( getError( node ) );
-
- refreshIndex("test-organization", "test-app");
+ public void testCaseReindexEndpoint() {
+
+ //Create Collection
+ Map payload = new HashMap<>( );
+ payload.put( "name","wazer wifle!!" );
+ Entity payloadEntity = new Entity( payload );
+ Entity collectionResponse = this.clientSetup.getRestClient().org( clientSetup.getOrganizationName() )
+ .app( clientSetup.getAppName())
+ .collection( "belp").post(payloadEntity);
+
+ assertNotNull( collectionResponse );
+
+ //try reindex endpoint with ALl mixed case characters
+ Token superUserToken = clientSetup.getRestClient().management().token().post(new Token( clientSetup.getSuperuserName(),clientSetup.getSuperuserPassword() )); //.get(new Token(clientSetup.getSuperuserName(),clientSetup.getSuperuserPassword()));
+
+ QueryParameters queryParameters = new QueryParameters();
+ queryParameters.addParam( "access_token",superUserToken.getAccessToken());
+ org.apache.usergrid.rest.test.resource2point0.model.ApiResponse result = this.clientSetup.getRestClient().system()
+ .addToPath( "index" ).addToPath( "rebuild" )
+ .addToPath( clientSetup.getAppUuid() ).addToPath( "bElp" ).put();
+
+ assertNotNull(result);
+
+ queryParameters = new QueryParameters();
+ queryParameters.addParam( "access_token",superUserToken.getAccessToken());
+ result = this.clientSetup.getRestClient().system()
+ .addToPath( "index" ).addToPath( "rebuild" )
+ .addToPath( clientSetup.getAppUuid() ).addToPath( "belp" ).put();
+
+ assertNotNull( result );
}
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7fd643cd/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
index e033c2d..82e7c70 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/ClientSetup.java
@@ -22,8 +22,11 @@ package org.apache.usergrid.rest.test.resource2point0;
import java.io.IOException;
+import java.util.LinkedHashMap;
+import java.util.UUID;
import org.apache.usergrid.rest.test.resource2point0.model.Application;
+import org.apache.usergrid.rest.test.resource2point0.model.Entity;
import org.apache.usergrid.rest.test.resource2point0.model.Token;
import org.junit.rules.TestRule;
import org.junit.runner.Description;
@@ -50,12 +53,13 @@ public class ClientSetup implements TestRule {
protected String password;
protected String orgName;
protected String appName;
+ protected String appUuid;
protected Token superuserToken;
protected String superuserName = "superuser";
protected String superuserPassword = "superpassword";
protected Organization organization;
- protected Application application;
+ protected Entity application;
public ClientSetup (String serverUrl) {
@@ -114,7 +118,9 @@ public class ClientSetup implements TestRule {
restClient.management().token().post(new Token(username,username));
- restClient.management().orgs().organization(organization.getName()).app().post(new Application(appName));
+ application = restClient.management().orgs().organization(organization.getName()).app().post(new Application(appName));
+ // application = restClient.management().orgs().organization(organization.getName()).app().get();
+ appUuid = (String)((LinkedHashMap)application.getDynamicProperties().get( "data" )).get( orgName+"/"+appName );
}
@@ -130,6 +136,8 @@ public class ClientSetup implements TestRule {
public String getAppName() {return appName;}
+ public String getAppUuid() {return appUuid;}
+
public Token getSuperuserToken() {
return superuserToken;
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7fd643cd/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java
index e2bff1f..ee70942 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/SystemResource.java
@@ -18,6 +18,10 @@
package org.apache.usergrid.rest.test.resource2point0.endpoints;
+import javax.ws.rs.core.MediaType;
+
+import org.apache.usergrid.rest.test.resource2point0.model.ApiResponse;
+import org.apache.usergrid.rest.test.resource2point0.model.Entity;
import org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
@@ -30,7 +34,24 @@ public class SystemResource extends NamedResource {
super( "system",context, parent );
}
+ //Dirty hack for path resource in new branch of two-dot-o
+ public SystemResource(final String name,final ClientContext context, final UrlResource parent ) {
+ super( name,context, parent );
+ }
+
+
public DatabaseResource database() {
return new DatabaseResource(context, this);
}
+
+ public SystemResource addToPath( String pathPart ) {
+ return new SystemResource( pathPart, context, this );
+ }
+
+ public ApiResponse put(){
+ ApiResponse
+ response = getResource(true).type( MediaType.APPLICATION_JSON_TYPE ).accept(MediaType.APPLICATION_JSON)
+ .put(ApiResponse.class);
+ return response;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/7fd643cd/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/mgmt/ApplicationResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/mgmt/ApplicationResource.java b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/mgmt/ApplicationResource.java
index 6b7742f..e9947e3 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/mgmt/ApplicationResource.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/mgmt/ApplicationResource.java
@@ -46,9 +46,9 @@ public class ApplicationResource extends NamedResource {
}
- public void post(Application application) {
- getResource(true).type(MediaType.APPLICATION_JSON_TYPE)
- .accept(MediaType.APPLICATION_JSON).post(application);
+ public Application post(Application application) {
+ return getResource(true).type(MediaType.APPLICATION_JSON_TYPE)
+ .accept(MediaType.APPLICATION_JSON).post(Application.class,application);
}
public Entity post(Entity payload){
[03/19] incubator-usergrid git commit: Add organization export to
ExportAdmins tool and organization import to ImportAdmins tool.
Posted by gr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterLexer.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterLexer.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterLexer.java
deleted file mode 100644
index 20cf4a1..0000000
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterLexer.java
+++ /dev/null
@@ -1,3123 +0,0 @@
-// $ANTLR 3.4 org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g 2014-08-25 10:56:14
-
-/*
- * 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.usergrid.persistence.index.query.tree;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.usergrid.persistence.index.exceptions.QueryTokenException;
-
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-@SuppressWarnings({"all", "warnings", "unchecked"})
-public class CpQueryFilterLexer extends Lexer {
- public static final int EOF=-1;
- public static final int T__31=31;
- public static final int T__32=32;
- public static final int T__33=33;
- public static final int T__34=34;
- public static final int T__35=35;
- public static final int T__36=36;
- public static final int T__37=37;
- public static final int T__38=38;
- public static final int T__39=39;
- public static final int T__40=40;
- public static final int AND=4;
- public static final int ASC=5;
- public static final int BOOLEAN=6;
- public static final int CONTAINS=7;
- public static final int DESC=8;
- public static final int EQ=9;
- public static final int ESC_SEQ=10;
- public static final int EXPONENT=11;
- public static final int FALSE=12;
- public static final int FLOAT=13;
- public static final int GT=14;
- public static final int GTE=15;
- public static final int HEX_DIGIT=16;
- public static final int ID=17;
- public static final int LONG=18;
- public static final int LT=19;
- public static final int LTE=20;
- public static final int NOT=21;
- public static final int OCTAL_ESC=22;
- public static final int OF=23;
- public static final int OR=24;
- public static final int STRING=25;
- public static final int TRUE=26;
- public static final int UNICODE_ESC=27;
- public static final int UUID=28;
- public static final int WITHIN=29;
- public static final int WS=30;
-
-
-
-
- private static final Logger logger = LoggerFactory
- .getLogger(CpQueryFilterLexer.class);
-
-
-
-
- @Override
- public void emitErrorMessage(String msg) {
- logger.info(msg);
- }
-
- @Override
- public void recover(RecognitionException e) {
- //We don't want to recover, we want to re-throw to the user since they passed us invalid input
- throw new QueryTokenException(e);
- }
-
-
-
-
- // delegates
- // delegators
- public Lexer[] getDelegates() {
- return new Lexer[] {};
- }
-
- public CpQueryFilterLexer() {}
- public CpQueryFilterLexer(CharStream input) {
- this(input, new RecognizerSharedState());
- }
- public CpQueryFilterLexer(CharStream input, RecognizerSharedState state) {
- super(input,state);
- }
- public String getGrammarFileName() { return "org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g"; }
-
- // $ANTLR start "T__31"
- public final void mT__31() throws RecognitionException {
- try {
- int _type = T__31;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:52:7: ( '(' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:52:9: '('
- {
- match('(');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__31"
-
- // $ANTLR start "T__32"
- public final void mT__32() throws RecognitionException {
- try {
- int _type = T__32;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:53:7: ( ')' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:53:9: ')'
- {
- match(')');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__32"
-
- // $ANTLR start "T__33"
- public final void mT__33() throws RecognitionException {
- try {
- int _type = T__33;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:54:7: ( '*' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:54:9: '*'
- {
- match('*');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__33"
-
- // $ANTLR start "T__34"
- public final void mT__34() throws RecognitionException {
- try {
- int _type = T__34;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:55:7: ( ',' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:55:9: ','
- {
- match(',');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__34"
-
- // $ANTLR start "T__35"
- public final void mT__35() throws RecognitionException {
- try {
- int _type = T__35;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:56:7: ( ':' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:56:9: ':'
- {
- match(':');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__35"
-
- // $ANTLR start "T__36"
- public final void mT__36() throws RecognitionException {
- try {
- int _type = T__36;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:57:7: ( 'order by' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:57:9: 'order by'
- {
- match("order by");
-
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__36"
-
- // $ANTLR start "T__37"
- public final void mT__37() throws RecognitionException {
- try {
- int _type = T__37;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:58:7: ( 'select' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:58:9: 'select'
- {
- match("select");
-
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__37"
-
- // $ANTLR start "T__38"
- public final void mT__38() throws RecognitionException {
- try {
- int _type = T__38;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:59:7: ( 'where' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:59:9: 'where'
- {
- match("where");
-
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__38"
-
- // $ANTLR start "T__39"
- public final void mT__39() throws RecognitionException {
- try {
- int _type = T__39;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:60:7: ( '{' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:60:9: '{'
- {
- match('{');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__39"
-
- // $ANTLR start "T__40"
- public final void mT__40() throws RecognitionException {
- try {
- int _type = T__40;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:61:7: ( '}' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:61:9: '}'
- {
- match('}');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "T__40"
-
- // $ANTLR start "LT"
- public final void mLT() throws RecognitionException {
- try {
- int _type = LT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:105:5: ( '<' | 'lt' )
- int alt1=2;
- switch ( input.LA(1) ) {
- case '<':
- {
- alt1=1;
- }
- break;
- case 'l':
- {
- alt1=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 1, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt1) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:105:7: '<'
- {
- match('<');
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:105:13: 'lt'
- {
- match("lt");
-
-
-
- }
- break;
-
- }
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "LT"
-
- // $ANTLR start "LTE"
- public final void mLTE() throws RecognitionException {
- try {
- int _type = LTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:107:5: ( '<=' | 'lte' )
- int alt2=2;
- switch ( input.LA(1) ) {
- case '<':
- {
- alt2=1;
- }
- break;
- case 'l':
- {
- alt2=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 2, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt2) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:107:7: '<='
- {
- match("<=");
-
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:107:15: 'lte'
- {
- match("lte");
-
-
-
- }
- break;
-
- }
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "LTE"
-
- // $ANTLR start "EQ"
- public final void mEQ() throws RecognitionException {
- try {
- int _type = EQ;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:109:5: ( '=' | 'eq' )
- int alt3=2;
- switch ( input.LA(1) ) {
- case '=':
- {
- alt3=1;
- }
- break;
- case 'e':
- {
- alt3=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 3, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt3) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:109:7: '='
- {
- match('=');
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:109:13: 'eq'
- {
- match("eq");
-
-
-
- }
- break;
-
- }
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "EQ"
-
- // $ANTLR start "GT"
- public final void mGT() throws RecognitionException {
- try {
- int _type = GT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:111:5: ( '>' | 'gt' )
- int alt4=2;
- switch ( input.LA(1) ) {
- case '>':
- {
- alt4=1;
- }
- break;
- case 'g':
- {
- alt4=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 4, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt4) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:111:7: '>'
- {
- match('>');
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:111:13: 'gt'
- {
- match("gt");
-
-
-
- }
- break;
-
- }
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "GT"
-
- // $ANTLR start "GTE"
- public final void mGTE() throws RecognitionException {
- try {
- int _type = GTE;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:113:5: ( '>=' | 'gte' )
- int alt5=2;
- switch ( input.LA(1) ) {
- case '>':
- {
- alt5=1;
- }
- break;
- case 'g':
- {
- alt5=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 5, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt5) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:113:7: '>='
- {
- match(">=");
-
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:113:15: 'gte'
- {
- match("gte");
-
-
-
- }
- break;
-
- }
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "GTE"
-
- // $ANTLR start "BOOLEAN"
- public final void mBOOLEAN() throws RecognitionException {
- try {
- int _type = BOOLEAN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:117:9: ( ( TRUE | FALSE ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:117:11: ( TRUE | FALSE )
- {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:117:11: ( TRUE | FALSE )
- int alt6=2;
- switch ( input.LA(1) ) {
- case 'T':
- case 't':
- {
- alt6=1;
- }
- break;
- case 'F':
- case 'f':
- {
- alt6=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 6, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt6) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:117:12: TRUE
- {
- mTRUE();
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:117:17: FALSE
- {
- mFALSE();
-
-
- }
- break;
-
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "BOOLEAN"
-
- // $ANTLR start "AND"
- public final void mAND() throws RecognitionException {
- try {
- int _type = AND;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:119:5: ( ( 'A' | 'a' ) ( 'N' | 'n' ) ( 'D' | 'd' ) | '&&' )
- int alt7=2;
- switch ( input.LA(1) ) {
- case 'A':
- case 'a':
- {
- alt7=1;
- }
- break;
- case '&':
- {
- alt7=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 7, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt7) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:119:7: ( 'A' | 'a' ) ( 'N' | 'n' ) ( 'D' | 'd' )
- {
- if ( input.LA(1)=='A'||input.LA(1)=='a' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='N'||input.LA(1)=='n' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='D'||input.LA(1)=='d' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:119:37: '&&'
- {
- match("&&");
-
-
-
- }
- break;
-
- }
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "AND"
-
- // $ANTLR start "OR"
- public final void mOR() throws RecognitionException {
- try {
- int _type = OR;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:121:5: ( ( 'O' | 'o' ) ( 'R' | 'r' ) | '||' )
- int alt8=2;
- switch ( input.LA(1) ) {
- case 'O':
- case 'o':
- {
- alt8=1;
- }
- break;
- case '|':
- {
- alt8=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 8, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt8) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:121:7: ( 'O' | 'o' ) ( 'R' | 'r' )
- {
- if ( input.LA(1)=='O'||input.LA(1)=='o' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='R'||input.LA(1)=='r' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:121:28: '||'
- {
- match("||");
-
-
-
- }
- break;
-
- }
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "OR"
-
- // $ANTLR start "NOT"
- public final void mNOT() throws RecognitionException {
- try {
- int _type = NOT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:123:5: ( ( 'N' | 'n' ) ( 'O' | 'o' ) ( 'T' | 't' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:123:7: ( 'N' | 'n' ) ( 'O' | 'o' ) ( 'T' | 't' )
- {
- if ( input.LA(1)=='N'||input.LA(1)=='n' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='O'||input.LA(1)=='o' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='T'||input.LA(1)=='t' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "NOT"
-
- // $ANTLR start "ASC"
- public final void mASC() throws RecognitionException {
- try {
- int _type = ASC;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:125:5: ( ( 'A' | 'a' ) ( 'S' | 's' ) ( 'C' | 'c' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:125:7: ( 'A' | 'a' ) ( 'S' | 's' ) ( 'C' | 'c' )
- {
- if ( input.LA(1)=='A'||input.LA(1)=='a' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='S'||input.LA(1)=='s' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='C'||input.LA(1)=='c' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "ASC"
-
- // $ANTLR start "DESC"
- public final void mDESC() throws RecognitionException {
- try {
- int _type = DESC;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:127:6: ( ( 'D' | 'd' ) ( 'E' | 'e' ) ( 'S' | 's' ) ( 'C' | 'c' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:127:8: ( 'D' | 'd' ) ( 'E' | 'e' ) ( 'S' | 's' ) ( 'C' | 'c' )
- {
- if ( input.LA(1)=='D'||input.LA(1)=='d' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='S'||input.LA(1)=='s' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='C'||input.LA(1)=='c' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "DESC"
-
- // $ANTLR start "CONTAINS"
- public final void mCONTAINS() throws RecognitionException {
- try {
- int _type = CONTAINS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:129:10: ( ( 'C' | 'c' ) ( 'O' | 'o' ) ( 'N' | 'n' ) ( 'T' | 't' ) ( 'A' | 'a' ) ( 'I' | 'i' ) ( 'N' | 'n' ) ( 'S' | 's' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:129:12: ( 'C' | 'c' ) ( 'O' | 'o' ) ( 'N' | 'n' ) ( 'T' | 't' ) ( 'A' | 'a' ) ( 'I' | 'i' ) ( 'N' | 'n' ) ( 'S' | 's' )
- {
- if ( input.LA(1)=='C'||input.LA(1)=='c' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='O'||input.LA(1)=='o' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='N'||input.LA(1)=='n' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='T'||input.LA(1)=='t' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='A'||input.LA(1)=='a' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='I'||input.LA(1)=='i' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='N'||input.LA(1)=='n' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='S'||input.LA(1)=='s' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "CONTAINS"
-
- // $ANTLR start "WITHIN"
- public final void mWITHIN() throws RecognitionException {
- try {
- int _type = WITHIN;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:131:8: ( ( 'W' | 'w' ) ( 'I' | 'i' ) ( 'T' | 't' ) ( 'H' | 'h' ) ( 'I' | 'i' ) ( 'N' | 'n' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:131:10: ( 'W' | 'w' ) ( 'I' | 'i' ) ( 'T' | 't' ) ( 'H' | 'h' ) ( 'I' | 'i' ) ( 'N' | 'n' )
- {
- if ( input.LA(1)=='W'||input.LA(1)=='w' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='I'||input.LA(1)=='i' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='T'||input.LA(1)=='t' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='H'||input.LA(1)=='h' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='I'||input.LA(1)=='i' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='N'||input.LA(1)=='n' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "WITHIN"
-
- // $ANTLR start "OF"
- public final void mOF() throws RecognitionException {
- try {
- int _type = OF;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:133:4: ( ( 'O' | 'o' ) ( 'F' | 'f' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:133:6: ( 'O' | 'o' ) ( 'F' | 'f' )
- {
- if ( input.LA(1)=='O'||input.LA(1)=='o' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='F'||input.LA(1)=='f' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "OF"
-
- // $ANTLR start "UUID"
- public final void mUUID() throws RecognitionException {
- try {
- int _type = UUID;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:135:6: ( HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:135:9: HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT '-' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
- {
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- match('-');
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- match('-');
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- match('-');
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- match('-');
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "UUID"
-
- // $ANTLR start "ID"
- public final void mID() throws RecognitionException {
- try {
- int _type = ID;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:146:5: ( ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '.' | '-' )* )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:146:7: ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '.' | '-' )*
- {
- if ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:146:31: ( 'a' .. 'z' | 'A' .. 'Z' | '0' .. '9' | '_' | '.' | '-' )*
- loop9:
- do {
- int alt9=2;
- switch ( input.LA(1) ) {
- case '-':
- case '.':
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- case 'A':
- case 'B':
- case 'C':
- case 'D':
- case 'E':
- case 'F':
- case 'G':
- case 'H':
- case 'I':
- case 'J':
- case 'K':
- case 'L':
- case 'M':
- case 'N':
- case 'O':
- case 'P':
- case 'Q':
- case 'R':
- case 'S':
- case 'T':
- case 'U':
- case 'V':
- case 'W':
- case 'X':
- case 'Y':
- case 'Z':
- case '_':
- case 'a':
- case 'b':
- case 'c':
- case 'd':
- case 'e':
- case 'f':
- case 'g':
- case 'h':
- case 'i':
- case 'j':
- case 'k':
- case 'l':
- case 'm':
- case 'n':
- case 'o':
- case 'p':
- case 'q':
- case 'r':
- case 's':
- case 't':
- case 'u':
- case 'v':
- case 'w':
- case 'x':
- case 'y':
- case 'z':
- {
- alt9=1;
- }
- break;
-
- }
-
- switch (alt9) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '-' && input.LA(1) <= '.')||(input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'Z')||input.LA(1)=='_'||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- break loop9;
- }
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "ID"
-
- // $ANTLR start "LONG"
- public final void mLONG() throws RecognitionException {
- try {
- int _type = LONG;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:149:6: ( ( '-' )? ( '0' .. '9' )+ )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:149:8: ( '-' )? ( '0' .. '9' )+
- {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:149:8: ( '-' )?
- int alt10=2;
- switch ( input.LA(1) ) {
- case '-':
- {
- alt10=1;
- }
- break;
- }
-
- switch (alt10) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:149:9: '-'
- {
- match('-');
-
- }
- break;
-
- }
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:149:15: ( '0' .. '9' )+
- int cnt11=0;
- loop11:
- do {
- int alt11=2;
- switch ( input.LA(1) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- alt11=1;
- }
- break;
-
- }
-
- switch (alt11) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- if ( cnt11 >= 1 ) break loop11;
- EarlyExitException eee =
- new EarlyExitException(11, input);
- throw eee;
- }
- cnt11++;
- } while (true);
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "LONG"
-
- // $ANTLR start "FLOAT"
- public final void mFLOAT() throws RecognitionException {
- try {
- int _type = FLOAT;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:5: ( ( '-' )? ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:8: ( '-' )? ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )
- {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:8: ( '-' )?
- int alt12=2;
- switch ( input.LA(1) ) {
- case '-':
- {
- alt12=1;
- }
- break;
- }
-
- switch (alt12) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:9: '-'
- {
- match('-');
-
- }
- break;
-
- }
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:15: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )
- int alt19=3;
- alt19 = dfa19.predict(input);
- switch (alt19) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:17: ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )?
- {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:17: ( '0' .. '9' )+
- int cnt13=0;
- loop13:
- do {
- int alt13=2;
- switch ( input.LA(1) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- alt13=1;
- }
- break;
-
- }
-
- switch (alt13) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- if ( cnt13 >= 1 ) break loop13;
- EarlyExitException eee =
- new EarlyExitException(13, input);
- throw eee;
- }
- cnt13++;
- } while (true);
-
-
- match('.');
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:33: ( '0' .. '9' )*
- loop14:
- do {
- int alt14=2;
- switch ( input.LA(1) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- alt14=1;
- }
- break;
-
- }
-
- switch (alt14) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- break loop14;
- }
- } while (true);
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:45: ( EXPONENT )?
- int alt15=2;
- switch ( input.LA(1) ) {
- case 'E':
- case 'e':
- {
- alt15=1;
- }
- break;
- }
-
- switch (alt15) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:153:45: EXPONENT
- {
- mEXPONENT();
-
-
- }
- break;
-
- }
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:154:9: '.' ( '0' .. '9' )+ ( EXPONENT )?
- {
- match('.');
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:154:13: ( '0' .. '9' )+
- int cnt16=0;
- loop16:
- do {
- int alt16=2;
- switch ( input.LA(1) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- alt16=1;
- }
- break;
-
- }
-
- switch (alt16) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- if ( cnt16 >= 1 ) break loop16;
- EarlyExitException eee =
- new EarlyExitException(16, input);
- throw eee;
- }
- cnt16++;
- } while (true);
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:154:25: ( EXPONENT )?
- int alt17=2;
- switch ( input.LA(1) ) {
- case 'E':
- case 'e':
- {
- alt17=1;
- }
- break;
- }
-
- switch (alt17) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:154:25: EXPONENT
- {
- mEXPONENT();
-
-
- }
- break;
-
- }
-
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:155:9: ( '0' .. '9' )+ EXPONENT
- {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:155:9: ( '0' .. '9' )+
- int cnt18=0;
- loop18:
- do {
- int alt18=2;
- switch ( input.LA(1) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- alt18=1;
- }
- break;
-
- }
-
- switch (alt18) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- if ( cnt18 >= 1 ) break loop18;
- EarlyExitException eee =
- new EarlyExitException(18, input);
- throw eee;
- }
- cnt18++;
- } while (true);
-
-
- mEXPONENT();
-
-
- }
- break;
-
- }
-
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "FLOAT"
-
- // $ANTLR start "STRING"
- public final void mSTRING() throws RecognitionException {
- try {
- int _type = STRING;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:159:5: ( '\\'' ( ESC_SEQ |~ ( '\\\\' | '\\'' ) )* '\\'' )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:159:8: '\\'' ( ESC_SEQ |~ ( '\\\\' | '\\'' ) )* '\\''
- {
- match('\'');
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:159:13: ( ESC_SEQ |~ ( '\\\\' | '\\'' ) )*
- loop20:
- do {
- int alt20=3;
- int LA20_0 = input.LA(1);
-
- if ( (LA20_0=='\\') ) {
- alt20=1;
- }
- else if ( ((LA20_0 >= '\u0000' && LA20_0 <= '&')||(LA20_0 >= '(' && LA20_0 <= '[')||(LA20_0 >= ']' && LA20_0 <= '\uFFFF')) ) {
- alt20=2;
- }
-
-
- switch (alt20) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:159:15: ESC_SEQ
- {
- mESC_SEQ();
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:159:25: ~ ( '\\\\' | '\\'' )
- {
- if ( (input.LA(1) >= '\u0000' && input.LA(1) <= '&')||(input.LA(1) >= '(' && input.LA(1) <= '[')||(input.LA(1) >= ']' && input.LA(1) <= '\uFFFF') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- break loop20;
- }
- } while (true);
-
-
- match('\'');
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "STRING"
-
- // $ANTLR start "WS"
- public final void mWS() throws RecognitionException {
- try {
- int _type = WS;
- int _channel = DEFAULT_TOKEN_CHANNEL;
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:164:4: ( ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+ )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:164:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+
- {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:164:6: ( ' ' | '\\t' | '\\n' | '\\r' | '\\f' )+
- int cnt21=0;
- loop21:
- do {
- int alt21=2;
- switch ( input.LA(1) ) {
- case '\t':
- case '\n':
- case '\f':
- case '\r':
- case ' ':
- {
- alt21=1;
- }
- break;
-
- }
-
- switch (alt21) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '\t' && input.LA(1) <= '\n')||(input.LA(1) >= '\f' && input.LA(1) <= '\r')||input.LA(1)==' ' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- if ( cnt21 >= 1 ) break loop21;
- EarlyExitException eee =
- new EarlyExitException(21, input);
- throw eee;
- }
- cnt21++;
- } while (true);
-
-
- _channel=HIDDEN;
-
- }
-
- state.type = _type;
- state.channel = _channel;
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "WS"
-
- // $ANTLR start "TRUE"
- public final void mTRUE() throws RecognitionException {
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:172:15: ( ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:172:17: ( 'T' | 't' ) ( 'R' | 'r' ) ( 'U' | 'u' ) ( 'E' | 'e' )
- {
- if ( input.LA(1)=='T'||input.LA(1)=='t' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='R'||input.LA(1)=='r' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='U'||input.LA(1)=='u' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
-
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "TRUE"
-
- // $ANTLR start "FALSE"
- public final void mFALSE() throws RecognitionException {
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:174:16: ( ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:174:18: ( 'F' | 'f' ) ( 'A' | 'a' ) ( 'L' | 'l' ) ( 'S' | 's' ) ( 'E' | 'e' )
- {
- if ( input.LA(1)=='F'||input.LA(1)=='f' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='A'||input.LA(1)=='a' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='L'||input.LA(1)=='l' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='S'||input.LA(1)=='s' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
-
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "FALSE"
-
- // $ANTLR start "EXPONENT"
- public final void mEXPONENT() throws RecognitionException {
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:179:10: ( ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:179:12: ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
- {
- if ( input.LA(1)=='E'||input.LA(1)=='e' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:179:22: ( '+' | '-' )?
- int alt22=2;
- switch ( input.LA(1) ) {
- case '+':
- case '-':
- {
- alt22=1;
- }
- break;
- }
-
- switch (alt22) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( input.LA(1)=='+'||input.LA(1)=='-' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- }
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:179:33: ( '0' .. '9' )+
- int cnt23=0;
- loop23:
- do {
- int alt23=2;
- switch ( input.LA(1) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- case '8':
- case '9':
- {
- alt23=1;
- }
- break;
-
- }
-
- switch (alt23) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '0' && input.LA(1) <= '9') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- default :
- if ( cnt23 >= 1 ) break loop23;
- EarlyExitException eee =
- new EarlyExitException(23, input);
- throw eee;
- }
- cnt23++;
- } while (true);
-
-
- }
-
-
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "EXPONENT"
-
- // $ANTLR start "HEX_DIGIT"
- public final void mHEX_DIGIT() throws RecognitionException {
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:182:11: ( ( '0' .. '9' | 'a' .. 'f' | 'A' .. 'F' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- if ( (input.LA(1) >= '0' && input.LA(1) <= '9')||(input.LA(1) >= 'A' && input.LA(1) <= 'F')||(input.LA(1) >= 'a' && input.LA(1) <= 'f') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
-
-
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "HEX_DIGIT"
-
- // $ANTLR start "ESC_SEQ"
- public final void mESC_SEQ() throws RecognitionException {
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:186:5: ( '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' ) | UNICODE_ESC | OCTAL_ESC )
- int alt24=3;
- switch ( input.LA(1) ) {
- case '\\':
- {
- switch ( input.LA(2) ) {
- case '\"':
- case '\'':
- case '\\':
- case 'b':
- case 'f':
- case 'n':
- case 'r':
- case 't':
- {
- alt24=1;
- }
- break;
- case 'u':
- {
- alt24=2;
- }
- break;
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- alt24=3;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 24, 1, input);
-
- throw nvae;
-
- }
-
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 24, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt24) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:186:9: '\\\\' ( 'b' | 't' | 'n' | 'f' | 'r' | '\\\"' | '\\'' | '\\\\' )
- {
- match('\\');
-
- if ( input.LA(1)=='\"'||input.LA(1)=='\''||input.LA(1)=='\\'||input.LA(1)=='b'||input.LA(1)=='f'||input.LA(1)=='n'||input.LA(1)=='r'||input.LA(1)=='t' ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:187:9: UNICODE_ESC
- {
- mUNICODE_ESC();
-
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:188:9: OCTAL_ESC
- {
- mOCTAL_ESC();
-
-
- }
- break;
-
- }
-
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "ESC_SEQ"
-
- // $ANTLR start "OCTAL_ESC"
- public final void mOCTAL_ESC() throws RecognitionException {
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:193:5: ( '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) ( '0' .. '7' ) | '\\\\' ( '0' .. '7' ) )
- int alt25=3;
- switch ( input.LA(1) ) {
- case '\\':
- {
- switch ( input.LA(2) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- {
- switch ( input.LA(3) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- switch ( input.LA(4) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- alt25=1;
- }
- break;
- default:
- alt25=2;
- }
-
- }
- break;
- default:
- alt25=3;
- }
-
- }
- break;
- case '4':
- case '5':
- case '6':
- case '7':
- {
- switch ( input.LA(3) ) {
- case '0':
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
- case '6':
- case '7':
- {
- alt25=2;
- }
- break;
- default:
- alt25=3;
- }
-
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 25, 1, input);
-
- throw nvae;
-
- }
-
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 25, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt25) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:193:9: '\\\\' ( '0' .. '3' ) ( '0' .. '7' ) ( '0' .. '7' )
- {
- match('\\');
-
- if ( (input.LA(1) >= '0' && input.LA(1) <= '3') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( (input.LA(1) >= '0' && input.LA(1) <= '7') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( (input.LA(1) >= '0' && input.LA(1) <= '7') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:194:9: '\\\\' ( '0' .. '7' ) ( '0' .. '7' )
- {
- match('\\');
-
- if ( (input.LA(1) >= '0' && input.LA(1) <= '7') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- if ( (input.LA(1) >= '0' && input.LA(1) <= '7') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:195:9: '\\\\' ( '0' .. '7' )
- {
- match('\\');
-
- if ( (input.LA(1) >= '0' && input.LA(1) <= '7') ) {
- input.consume();
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- recover(mse);
- throw mse;
- }
-
-
- }
- break;
-
- }
-
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "OCTAL_ESC"
-
- // $ANTLR start "UNICODE_ESC"
- public final void mUNICODE_ESC() throws RecognitionException {
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:200:5: ( '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:200:9: '\\\\' 'u' HEX_DIGIT HEX_DIGIT HEX_DIGIT HEX_DIGIT
- {
- match('\\');
-
- match('u');
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- mHEX_DIGIT();
-
-
- }
-
-
- }
- finally {
- // do for sure before leaving
- }
- }
- // $ANTLR end "UNICODE_ESC"
-
- public void mTokens() throws RecognitionException {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:8: ( T__31 | T__32 | T__33 | T__34 | T__35 | T__36 | T__37 | T__38 | T__39 | T__40 | LT | LTE | EQ | GT | GTE | BOOLEAN | AND | OR | NOT | ASC | DESC | CONTAINS | WITHIN | OF | UUID | ID | LONG | FLOAT | STRING | WS )
- int alt26=30;
- alt26 = dfa26.predict(input);
- switch (alt26) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:10: T__31
- {
- mT__31();
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:16: T__32
- {
- mT__32();
-
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:22: T__33
- {
- mT__33();
-
-
- }
- break;
- case 4 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:28: T__34
- {
- mT__34();
-
-
- }
- break;
- case 5 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:34: T__35
- {
- mT__35();
-
-
- }
- break;
- case 6 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:40: T__36
- {
- mT__36();
-
-
- }
- break;
- case 7 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:46: T__37
- {
- mT__37();
-
-
- }
- break;
- case 8 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:52: T__38
- {
- mT__38();
-
-
- }
- break;
- case 9 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:58: T__39
- {
- mT__39();
-
-
- }
- break;
- case 10 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:64: T__40
- {
- mT__40();
-
-
- }
- break;
- case 11 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:70: LT
- {
- mLT();
-
-
- }
- break;
- case 12 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:73: LTE
- {
- mLTE();
-
-
- }
- break;
- case 13 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:77: EQ
- {
- mEQ();
-
-
- }
- break;
- case 14 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:80: GT
- {
- mGT();
-
-
- }
- break;
- case 15 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:83: GTE
- {
- mGTE();
-
-
- }
- break;
- case 16 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:87: BOOLEAN
- {
- mBOOLEAN();
-
-
- }
- break;
- case 17 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:95: AND
- {
- mAND();
-
-
- }
- break;
- case 18 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:99: OR
- {
- mOR();
-
-
- }
- break;
- case 19 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:102: NOT
- {
- mNOT();
-
-
- }
- break;
- case 20 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:106: ASC
- {
- mASC();
-
-
- }
- break;
- case 21 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:110: DESC
- {
- mDESC();
-
-
- }
- break;
- case 22 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:115: CONTAINS
- {
- mCONTAINS();
-
-
- }
- break;
- case 23 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:124: WITHIN
- {
- mWITHIN();
-
-
- }
- break;
- case 24 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:131: OF
- {
- mOF();
-
-
- }
- break;
- case 25 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:134: UUID
- {
- mUUID();
-
-
- }
- break;
- case 26 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:139: ID
- {
- mID();
-
-
- }
- break;
- case 27 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:142: LONG
- {
- mLONG();
-
-
- }
- break;
- case 28 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:147: FLOAT
- {
- mFLOAT();
-
-
- }
- break;
- case 29 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:153: STRING
- {
- mSTRING();
-
-
- }
- break;
- case 30 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:1:160: WS
- {
- mWS();
-
-
- }
- break;
-
- }
-
- }
-
-
- protected DFA19 dfa19 = new DFA19(this);
- protected DFA26 dfa26 = new DFA26(this);
- static final String DFA19_eotS =
- "\5\uffff";
- static final String DFA19_eofS =
- "\5\uffff";
- static final String DFA19_minS =
- "\2\56\3\uffff";
- static final String DFA19_maxS =
- "\1\71\1\145\3\uffff";
- static final String DFA19_acceptS =
- "\2\uffff\1\2\1\1\1\3";
- static final String DFA19_specialS =
- "\5\uffff}>";
- static final String[] DFA19_transitionS = {
- "\1\2\1\uffff\12\1",
- "\1\3\1\uffff\12\1\13\uffff\1\4\37\uffff\1\4",
- "",
- "",
- ""
- };
-
- static final short[] DFA19_eot = DFA.unpackEncodedString(DFA19_eotS);
- static final short[] DFA19_eof = DFA.unpackEncodedString(DFA19_eofS);
- static final char[] DFA19_min = DFA.unpackEncodedStringToUnsignedChars(DFA19_minS);
- static final char[] DFA19_max = DFA.unpackEncodedStringToUnsignedChars(DFA19_maxS);
- static final short[] DFA19_accept = DFA.unpackEncodedString(DFA19_acceptS);
- static final short[] DFA19_special = DFA.unpackEncodedString(DFA19_specialS);
- static final short[][] DFA19_transition;
-
- static {
- int numStates = DFA19_transitionS.length;
- DFA19_transition = new short[numStates][];
- for (int i=0; i<numStates; i++) {
- DFA19_transition[i] = DFA.unpackEncodedString(DFA19_transitionS[i]);
- }
- }
-
- class DFA19 extends DFA {
-
- public DFA19(BaseRecognizer recognizer) {
- this.recognizer = recognizer;
- this.decisionNumber = 19;
- this.eot = DFA19_eot;
- this.eof = DFA19_eof;
- this.min = DFA19_min;
- this.max = DFA19_max;
- this.accept = DFA19_accept;
- this.special = DFA19_special;
- this.transition = DFA19_transition;
- }
- public String getDescription() {
- return "153:15: ( ( '0' .. '9' )+ '.' ( '0' .. '9' )* ( EXPONENT )? | '.' ( '0' .. '9' )+ ( EXPONENT )? | ( '0' .. '9' )+ EXPONENT )";
- }
- }
- static final String DFA26_eotS =
- "\6\uffff\3\35\2\uffff\1\51\1\35\1\uffff\1\35\1\56\4\35\1\uffff\1"+
- "\35\1\uffff\5\35\1\67\5\uffff\2\26\1\75\3\35\2\uffff\1\51\1\15\1"+
- "\35\2\uffff\1\56\7\35\1\uffff\1\67\2\uffff\1\67\1\35\1\uffff\3\35"+
- "\1\50\1\35\1\55\2\35\1\24\1\125\1\126\2\35\1\67\1\uffff\1\37\5\35"+
- "\1\141\1\35\2\uffff\1\143\1\35\1\67\1\uffff\1\37\2\35\1\152\2\35"+
- "\1\uffff\1\141\1\uffff\1\35\1\67\1\uffff\1\37\1\uffff\1\161\1\uffff"+
- "\1\162\2\35\1\67\1\uffff\1\37\2\uffff\2\35\1\67\1\uffff\1\37\1\35"+
- "\1\176\1\67\1\uffff\1\37\1\35\2\uffff\1\35\1\37\1\35\1\37\1\35\1"+
- "\37\1\35\1\37\26\35\1\72";
- static final String DFA26_eofS =
- "\u009f\uffff";
- static final String DFA26_minS =
- "\1\11\5\uffff\1\106\1\145\1\111\2\uffff\1\75\1\164\1\uffff\1\60"+
- "\1\75\1\164\1\122\2\60\1\uffff\1\106\1\uffff\1\117\2\60\1\111\1"+
- "\60\1\56\1\uffff\1\56\3\uffff\3\55\1\154\1\145\1\124\2\uffff\2\55"+
- "\1\60\2\uffff\1\55\1\125\1\60\1\104\1\103\1\124\1\60\1\116\1\uffff"+
- "\1\56\1\53\1\uffff\1\56\1\145\1\uffff\1\145\1\162\1\110\1\55\1\60"+
- "\1\55\1\105\1\123\3\55\1\103\1\124\1\56\1\53\1\60\1\162\1\143\1"+
- "\145\1\111\1\60\1\55\1\105\2\uffff\1\55\1\101\1\56\1\53\1\60\1\40"+
- "\1\164\1\55\1\116\1\60\1\uffff\1\55\1\uffff\1\111\1\56\1\53\1\60"+
- "\1\uffff\1\55\1\uffff\1\55\1\60\1\116\1\56\1\53\1\60\2\uffff\1\60"+
- "\1\123\1\56\1\53\1\60\3\55\1\53\1\55\1\60\1\uffff\7\60\2\55\4\60"+
- "\1\5
<TRUNCATED>
[04/19] incubator-usergrid git commit: Add organization export to
ExportAdmins tool and organization import to ImportAdmins tool.
Posted by gr...@apache.org.
Add organization export to ExportAdmins tool and organization import to ImportAdmins tool.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/c5187d22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/c5187d22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/c5187d22
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: c5187d22b8b2045204a8935e60d41250254b2fff
Parents: 49ae4ac
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Jun 3 15:10:45 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Jun 3 15:10:45 2015 -0400
----------------------------------------------------------------------
.../index/query/tree/CpQueryFilterLexer.java | 3123 ------------------
.../index/query/tree/CpQueryFilterParser.java | 2501 --------------
.../usergrid/management/ManagementService.java | 5 +-
.../cassandra/ManagementServiceImpl.java | 47 +-
stack/tools/pom.xml | 18 +-
.../org/apache/usergrid/tools/ExportAdmins.java | 128 +-
.../org/apache/usergrid/tools/ImportAdmins.java | 405 ++-
.../org/apache/usergrid/tools/ToolBase.java | 10 +-
stack/tools/src/main/resources/log4j.properties | 25 +-
.../usergrid/tools/ExportImportAdminsTest.java | 232 ++
...adata.usergrid-management.1433331614293.json | 85 +
...users.usergrid-management.1433331614293.json | 23 +
12 files changed, 680 insertions(+), 5922 deletions(-)
----------------------------------------------------------------------
[07/19] incubator-usergrid git commit: Small fixes to ImportAdmins
tool based on results of testing.
Posted by gr...@apache.org.
Small fixes to ImportAdmins tool based on results of testing.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/e8a5d47d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/e8a5d47d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/e8a5d47d
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: e8a5d47d0e84e0f387aac98c1f15503eeee9131d
Parents: 4ca6e2c
Author: Dave Johnson <dm...@apigee.com>
Authored: Fri Jun 5 16:04:17 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Fri Jun 5 16:04:17 2015 -0400
----------------------------------------------------------------------
.../cassandra/ManagementServiceImpl.java | 7 +++-
.../org/apache/usergrid/tools/ImportAdmins.java | 43 ++++++++++++--------
.../usergrid/tools/ExportImportAdminsTest.java | 12 +++---
3 files changed, 38 insertions(+), 24 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e8a5d47d/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 8561300..46739b4 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -1480,7 +1480,12 @@ public class ManagementServiceImpl implements ManagementService {
path = path.toLowerCase();
}
- organizations.put( entity.getUuid(), path );
+ try {
+ organizations.put( entity.getUuid(), path );
+ } catch (IllegalArgumentException e) {
+ logger.warn("Error adding " + entity.getUuid() + ":" + path + " to BiMap: " + e.getMessage() );
+ }
+
}
return organizations;
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e8a5d47d/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java b/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
index bf0a2e4..49757ee 100644
--- a/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
+++ b/stack/tools/src/main/java/org/apache/usergrid/tools/ImportAdmins.java
@@ -363,31 +363,38 @@ public class ImportAdmins extends ToolBase {
List<Object> organizationsList = (List<Object>) metadata.get( "organizations" );
if (organizationsList != null && !organizationsList.isEmpty()) {
- for ( Object orgObject : organizationsList ) {
+ User user = em.get( entityRef, User.class );
- Map<String, Object> orgMap = (Map<String, Object>)orgObject;
- UUID orgUuid = UUID.fromString( (String)orgMap.get("uuid") );
- String orgName = (String)orgMap.get("name");
+ if ( user == null ) {
+ logger.error("User with uuid={} not found, not adding to organizations");
+
+ } else {
- User user = em.get( entityRef, User.class );
final UserInfo userInfo = managementService.getAdminUserByEmail( user.getEmail() );
- // create org only if it does not exist
- OrganizationInfo orgInfo = managementService.getOrganizationByUuid( orgUuid );
- if ( orgInfo == null ) {
- try {
- managementService.createOrganization( orgUuid, orgName, userInfo, false );
- orgInfo = managementService.getOrganizationByUuid( orgUuid );
+ for (Object orgObject : organizationsList) {
+
+ Map<String, Object> orgMap = (Map<String, Object>) orgObject;
+ UUID orgUuid = UUID.fromString( (String) orgMap.get( "uuid" ) );
+ String orgName = (String) orgMap.get( "name" );
- logger.debug( "Created new org {} for user {}",
- new Object[]{orgInfo.getName(), user.getEmail()} );
+ // create org only if it does not exist
+ OrganizationInfo orgInfo = managementService.getOrganizationByUuid( orgUuid );
+ if (orgInfo == null) {
+ try {
+ managementService.createOrganization( orgUuid, orgName, userInfo, false );
+ orgInfo = managementService.getOrganizationByUuid( orgUuid );
- } catch (DuplicateUniquePropertyExistsException dpee ) {
- logger.error("Org {} already exists", orgName );
+ logger.debug( "Created new org {} for user {}",
+ new Object[]{orgInfo.getName(), user.getEmail()} );
+
+ } catch (DuplicateUniquePropertyExistsException dpee) {
+ logger.error( "Org {} already exists", orgName );
+ }
+ } else {
+ managementService.addAdminUserToOrganization( userInfo, orgInfo, false );
+ logger.debug( "Added user {} to org {}", new Object[]{user.getEmail(), orgName} );
}
- } else {
- managementService.addAdminUserToOrganization( userInfo, orgInfo, false );
- logger.debug( "Added user {} to org {}", new Object[]{user.getEmail(), orgName} );
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e8a5d47d/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java
----------------------------------------------------------------------
diff --git a/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java b/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java
index bab6150..898a97d 100644
--- a/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java
+++ b/stack/tools/src/test/java/org/apache/usergrid/tools/ExportImportAdminsTest.java
@@ -37,10 +37,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.FilenameFilter;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
import static junit.framework.TestCase.assertNotNull;
import static org.junit.Assert.assertEquals;
@@ -227,6 +224,11 @@ public class ExportImportAdminsTest {
List<UserInfo> org2_users = setup.getMgmtSvc().getAdminUsersForOrganization( org_uuid_2 );
assertEquals("org2 has two users", 2, org2_users.size() );
- }
+ UserInfo user1info = setup.getMgmtSvc().getAdminUserByUuid( user_uuid_1 );
+ Map<String, Object> user1_data = setup.getMgmtSvc().getAdminUserOrganizationData( user1info, false );
+ Map<String, Object> user1_data_orgs = (Map<String, Object>)user1_data.get("organizations");
+ assertEquals( 2, user1_data_orgs.size());
+
+ }
}
\ No newline at end of file
[05/19] incubator-usergrid git commit: Merge branch 'USERGRID-705'
Posted by gr...@apache.org.
Merge branch 'USERGRID-705'
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/4ca6e2c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/4ca6e2c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/4ca6e2c3
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 4ca6e2c34fbd2e070dafb05769229665e4d08859
Parents: 49ae4ac c5187d2
Author: Shawn Feldman <sf...@apache.org>
Authored: Thu Jun 4 08:45:07 2015 -0600
Committer: Shawn Feldman <sf...@apache.org>
Committed: Thu Jun 4 08:45:07 2015 -0600
----------------------------------------------------------------------
.../index/query/tree/CpQueryFilterLexer.java | 3123 ------------------
.../index/query/tree/CpQueryFilterParser.java | 2501 --------------
.../usergrid/management/ManagementService.java | 5 +-
.../cassandra/ManagementServiceImpl.java | 47 +-
stack/tools/pom.xml | 18 +-
.../org/apache/usergrid/tools/ExportAdmins.java | 128 +-
.../org/apache/usergrid/tools/ImportAdmins.java | 405 ++-
.../org/apache/usergrid/tools/ToolBase.java | 10 +-
stack/tools/src/main/resources/log4j.properties | 25 +-
.../usergrid/tools/ExportImportAdminsTest.java | 232 ++
...adata.usergrid-management.1433331614293.json | 85 +
...users.usergrid-management.1433331614293.json | 23 +
12 files changed, 680 insertions(+), 5922 deletions(-)
----------------------------------------------------------------------
[18/19] incubator-usergrid git commit: Merge branch 'two-dot-o' of
https://git-wip-us.apache.org/repos/asf/incubator-usergrid into two-dot-o
Posted by gr...@apache.org.
Merge branch 'two-dot-o' of https://git-wip-us.apache.org/repos/asf/incubator-usergrid into two-dot-o
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/31c1f21c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/31c1f21c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/31c1f21c
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 31c1f21c1319af25d1175104b24f4e2a1de2f1b1
Parents: d8fdc3a 7fd643c
Author: Dave Johnson <dm...@apigee.com>
Authored: Wed Jun 10 14:58:16 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Wed Jun 10 14:58:16 2015 -0400
----------------------------------------------------------------------
.../org/apache/usergrid/rest/IndexResource.java | 10 +--
.../apache/usergrid/rest/IndexResourceIT.java | 92 ++++++++++++++------
.../rest/test/resource2point0/ClientSetup.java | 12 ++-
.../endpoints/SystemResource.java | 21 +++++
.../endpoints/mgmt/ApplicationResource.java | 6 +-
5 files changed, 105 insertions(+), 36 deletions(-)
----------------------------------------------------------------------
[12/19] incubator-usergrid git commit: Set correct version for
creating RC1.
Posted by gr...@apache.org.
Set correct version for creating RC1.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/f938f38c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/f938f38c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/f938f38c
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: f938f38cbac4938b8bae39a84bd4ad8c9563afa4
Parents: e661a64
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 14:20:16 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 14:20:16 2015 -0400
----------------------------------------------------------------------
.usergridversion | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/f938f38c/.usergridversion
----------------------------------------------------------------------
diff --git a/.usergridversion b/.usergridversion
index 6d7de6e..276823b 100644
--- a/.usergridversion
+++ b/.usergridversion
@@ -1 +1 @@
-1.0.2
+1.0.2-SNAPSHOT
[09/19] incubator-usergrid git commit: Fix for StackOverflow
introduced when org support as added to Admin User import/export.
Posted by gr...@apache.org.
Fix for StackOverflow introduced when org support as added to Admin User import/export.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/4516ccf0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/4516ccf0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/4516ccf0
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 4516ccf0dcb1fb72d957ff63a646ad85051d9695
Parents: c21eb9e
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 10:19:49 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 10:19:49 2015 -0400
----------------------------------------------------------------------
.../usergrid/management/cassandra/ManagementServiceImpl.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/4516ccf0/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
index 46739b4..b3204a7 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/cassandra/ManagementServiceImpl.java
@@ -562,7 +562,7 @@ public class ManagementServiceImpl implements ManagementService {
@Override
public OrganizationInfo createOrganization(String organizationName, UserInfo user, boolean activated)
throws Exception {
- return createOrganization( organizationName, user, activated );
+ return createOrganization( null, organizationName, user, activated );
}
@Override
[13/19] incubator-usergrid git commit: Updating CHANGELOG for 1.0.2
release.
Posted by gr...@apache.org.
Updating CHANGELOG for 1.0.2 release.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/138a73fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/138a73fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/138a73fd
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 138a73fdc37f75d1d58887ea0652a2ead69093fb
Parents: f938f38
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 14:23:51 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 14:23:51 2015 -0400
----------------------------------------------------------------------
CHANGELOG | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/138a73fd/CHANGELOG
----------------------------------------------------------------------
diff --git a/CHANGELOG b/CHANGELOG
index 47a080a..70ea277 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Usergrid 1.0.2
+--------------------------------------------------------------------------------
+
Usergrid 1.0.2
--------------------------------------------------------------------------------
[06/19] incubator-usergrid git commit: [USERGRID-613] Added fix mixed
cases in two-dot-o.
Posted by gr...@apache.org.
[USERGRID-613] Added fix mixed cases in two-dot-o.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/e9ad00c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/e9ad00c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/e9ad00c7
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: e9ad00c7c7494ba08f1941b79ba28644f4eafdeb
Parents: a784016
Author: GERey <gr...@apigee.com>
Authored: Thu Jun 4 11:35:36 2015 -0700
Committer: GERey <gr...@apigee.com>
Committed: Thu Jun 4 11:35:36 2015 -0700
----------------------------------------------------------------------
.../main/java/org/apache/usergrid/rest/IndexResource.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/e9ad00c7/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
index 2ffc13f..f32824f 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/IndexResource.java
@@ -178,7 +178,7 @@ public class IndexResource extends AbstractContextResource {
public void run() {
- logger.info( "Started rebuilding application {} in collection {}", appId, collectionName );
+ logger.info( "Started rebuilding application {} in collection {}", appId, collectionName.toLowerCase() );
try {
rebuildCollection( appId, collectionName, reverse );
@@ -188,11 +188,11 @@ public class IndexResource extends AbstractContextResource {
throw new RuntimeException("Error rebuilding collection");
}
- logger.info( "Completed rebuilding application {} in collection {}", appId, collectionName );
+ logger.info( "Completed rebuilding application {} in collection {}", appId, collectionName.toLowerCase() );
}
};
- rebuild.setName( String.format( "Index rebuild for app %s and collection %s", appId, collectionName ) );
+ rebuild.setName( String.format( "Index rebuild for app %s and collection %s", appId, collectionName.toLowerCase() ) );
rebuild.setDaemon( true );
rebuild.start();
@@ -294,9 +294,9 @@ public class IndexResource extends AbstractContextResource {
};
- logger.info( "Reindexing for app id: {} and collection {}", applicationId, collectionName );
+ logger.info( "Reindexing for app id: {} and collection {}", applicationId, collectionName.toLowerCase() );
- emf.rebuildCollectionIndex(applicationId, collectionName, reverse, po);
+ emf.rebuildCollectionIndex(applicationId, collectionName.toLowerCase(), reverse, po);
emf.refreshIndex();
}
[02/19] incubator-usergrid git commit: Add organization export to
ExportAdmins tool and organization import to ImportAdmins tool.
Posted by gr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterParser.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterParser.java b/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterParser.java
deleted file mode 100644
index 4693754..0000000
--- a/stack/corepersistence/queryindex/src/main/java/org/apache/usergrid/persistence/index/query/tree/CpQueryFilterParser.java
+++ /dev/null
@@ -1,2501 +0,0 @@
-// $ANTLR 3.4 org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g 2014-08-25 10:56:14
-
-/*
- * 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.usergrid.persistence.index.query.tree;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.usergrid.persistence.index.query.Query;
-import org.apache.usergrid.persistence.index.query.Query.SortPredicate;
-
-
-
-import org.antlr.runtime.*;
-import java.util.Stack;
-import java.util.List;
-import java.util.ArrayList;
-
-import org.antlr.runtime.tree.*;
-
-
-@SuppressWarnings({"all", "warnings", "unchecked"})
-public class CpQueryFilterParser extends Parser {
- public static final String[] tokenNames = new String[] {
- "<invalid>", "<EOR>", "<DOWN>", "<UP>", "AND", "ASC", "BOOLEAN", "CONTAINS", "DESC", "EQ", "ESC_SEQ", "EXPONENT", "FALSE", "FLOAT", "GT", "GTE", "HEX_DIGIT", "ID", "LONG", "LT", "LTE", "NOT", "OCTAL_ESC", "OF", "OR", "STRING", "TRUE", "UNICODE_ESC", "UUID", "WITHIN", "WS", "'('", "')'", "'*'", "','", "':'", "'order by'", "'select'", "'where'", "'{'", "'}'"
- };
-
- public static final int EOF=-1;
- public static final int T__31=31;
- public static final int T__32=32;
- public static final int T__33=33;
- public static final int T__34=34;
- public static final int T__35=35;
- public static final int T__36=36;
- public static final int T__37=37;
- public static final int T__38=38;
- public static final int T__39=39;
- public static final int T__40=40;
- public static final int AND=4;
- public static final int ASC=5;
- public static final int BOOLEAN=6;
- public static final int CONTAINS=7;
- public static final int DESC=8;
- public static final int EQ=9;
- public static final int ESC_SEQ=10;
- public static final int EXPONENT=11;
- public static final int FALSE=12;
- public static final int FLOAT=13;
- public static final int GT=14;
- public static final int GTE=15;
- public static final int HEX_DIGIT=16;
- public static final int ID=17;
- public static final int LONG=18;
- public static final int LT=19;
- public static final int LTE=20;
- public static final int NOT=21;
- public static final int OCTAL_ESC=22;
- public static final int OF=23;
- public static final int OR=24;
- public static final int STRING=25;
- public static final int TRUE=26;
- public static final int UNICODE_ESC=27;
- public static final int UUID=28;
- public static final int WITHIN=29;
- public static final int WS=30;
-
- // delegates
- public Parser[] getDelegates() {
- return new Parser[] {};
- }
-
- // delegators
-
-
- public CpQueryFilterParser(TokenStream input) {
- this(input, new RecognizerSharedState());
- }
- public CpQueryFilterParser(TokenStream input, RecognizerSharedState state) {
- super(input, state);
- }
-
-protected TreeAdaptor adaptor = new CommonTreeAdaptor();
-
-public void setTreeAdaptor(TreeAdaptor adaptor) {
- this.adaptor = adaptor;
-}
-public TreeAdaptor getTreeAdaptor() {
- return adaptor;
-}
- public String[] getTokenNames() { return CpQueryFilterParser.tokenNames; }
- public String getGrammarFileName() { return "org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g"; }
-
-
- Query query = new Query();
-
- private static final Logger logger = LoggerFactory
- .getLogger(CpQueryFilterLexer.class);
-
- @Override
- public void emitErrorMessage(String msg) {
- logger.info(msg);
- }
-
-
- public static class property_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "property"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:209:1: property : ID ;
- public final CpQueryFilterParser.property_return property() throws RecognitionException {
- CpQueryFilterParser.property_return retval = new CpQueryFilterParser.property_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token ID1=null;
-
- Object ID1_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:209:10: ( ID )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:209:12: ID
- {
- root_0 = (Object)adaptor.nil();
-
-
- ID1=(Token)match(input,ID,FOLLOW_ID_in_property991);
- ID1_tree =
- new Property(ID1)
- ;
- adaptor.addChild(root_0, ID1_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "property"
-
-
- public static class containsproperty_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "containsproperty"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:211:1: containsproperty : ID ;
- public final CpQueryFilterParser.containsproperty_return containsproperty() throws RecognitionException {
- CpQueryFilterParser.containsproperty_return retval = new CpQueryFilterParser.containsproperty_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token ID2=null;
-
- Object ID2_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:211:18: ( ID )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:211:20: ID
- {
- root_0 = (Object)adaptor.nil();
-
-
- ID2=(Token)match(input,ID,FOLLOW_ID_in_containsproperty1002);
- ID2_tree =
- new ContainsProperty(ID2)
- ;
- adaptor.addChild(root_0, ID2_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "containsproperty"
-
-
- public static class withinproperty_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "withinproperty"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:213:1: withinproperty : ID ;
- public final CpQueryFilterParser.withinproperty_return withinproperty() throws RecognitionException {
- CpQueryFilterParser.withinproperty_return retval = new CpQueryFilterParser.withinproperty_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token ID3=null;
-
- Object ID3_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:213:16: ( ID )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:213:18: ID
- {
- root_0 = (Object)adaptor.nil();
-
-
- ID3=(Token)match(input,ID,FOLLOW_ID_in_withinproperty1013);
- ID3_tree =
- new WithinProperty(ID3)
- ;
- adaptor.addChild(root_0, ID3_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "withinproperty"
-
-
- public static class booleanliteral_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "booleanliteral"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:215:1: booleanliteral : BOOLEAN ;
- public final CpQueryFilterParser.booleanliteral_return booleanliteral() throws RecognitionException {
- CpQueryFilterParser.booleanliteral_return retval = new CpQueryFilterParser.booleanliteral_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token BOOLEAN4=null;
-
- Object BOOLEAN4_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:215:15: ( BOOLEAN )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:215:17: BOOLEAN
- {
- root_0 = (Object)adaptor.nil();
-
-
- BOOLEAN4=(Token)match(input,BOOLEAN,FOLLOW_BOOLEAN_in_booleanliteral1024);
- BOOLEAN4_tree =
- new BooleanLiteral(BOOLEAN4)
- ;
- adaptor.addChild(root_0, BOOLEAN4_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "booleanliteral"
-
-
- public static class longliteral_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "longliteral"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:218:1: longliteral : LONG ;
- public final CpQueryFilterParser.longliteral_return longliteral() throws RecognitionException {
- CpQueryFilterParser.longliteral_return retval = new CpQueryFilterParser.longliteral_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token LONG5=null;
-
- Object LONG5_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:218:13: ( LONG )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:219:3: LONG
- {
- root_0 = (Object)adaptor.nil();
-
-
- LONG5=(Token)match(input,LONG,FOLLOW_LONG_in_longliteral1038);
- LONG5_tree =
- new LongLiteral(LONG5)
- ;
- adaptor.addChild(root_0, LONG5_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "longliteral"
-
-
- public static class uuidliteral_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "uuidliteral"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:221:1: uuidliteral : UUID ;
- public final CpQueryFilterParser.uuidliteral_return uuidliteral() throws RecognitionException {
- CpQueryFilterParser.uuidliteral_return retval = new CpQueryFilterParser.uuidliteral_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token UUID6=null;
-
- Object UUID6_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:221:13: ( UUID )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:222:3: UUID
- {
- root_0 = (Object)adaptor.nil();
-
-
- UUID6=(Token)match(input,UUID,FOLLOW_UUID_in_uuidliteral1052);
- UUID6_tree =
- new UUIDLiteral(UUID6)
- ;
- adaptor.addChild(root_0, UUID6_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "uuidliteral"
-
-
- public static class stringliteral_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "stringliteral"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:224:1: stringliteral : STRING ;
- public final CpQueryFilterParser.stringliteral_return stringliteral() throws RecognitionException {
- CpQueryFilterParser.stringliteral_return retval = new CpQueryFilterParser.stringliteral_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token STRING7=null;
-
- Object STRING7_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:224:15: ( STRING )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:225:3: STRING
- {
- root_0 = (Object)adaptor.nil();
-
-
- STRING7=(Token)match(input,STRING,FOLLOW_STRING_in_stringliteral1065);
- STRING7_tree =
- new StringLiteral(STRING7)
- ;
- adaptor.addChild(root_0, STRING7_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "stringliteral"
-
-
- public static class floatliteral_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "floatliteral"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:227:1: floatliteral : FLOAT ;
- public final CpQueryFilterParser.floatliteral_return floatliteral() throws RecognitionException {
- CpQueryFilterParser.floatliteral_return retval = new CpQueryFilterParser.floatliteral_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token FLOAT8=null;
-
- Object FLOAT8_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:227:14: ( FLOAT )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:228:3: FLOAT
- {
- root_0 = (Object)adaptor.nil();
-
-
- FLOAT8=(Token)match(input,FLOAT,FOLLOW_FLOAT_in_floatliteral1080);
- FLOAT8_tree =
- new FloatLiteral(FLOAT8)
- ;
- adaptor.addChild(root_0, FLOAT8_tree);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "floatliteral"
-
-
- public static class value_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "value"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:231:1: value : ( booleanliteral | longliteral | uuidliteral | stringliteral | floatliteral );
- public final CpQueryFilterParser.value_return value() throws RecognitionException {
- CpQueryFilterParser.value_return retval = new CpQueryFilterParser.value_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- CpQueryFilterParser.booleanliteral_return booleanliteral9 =null;
-
- CpQueryFilterParser.longliteral_return longliteral10 =null;
-
- CpQueryFilterParser.uuidliteral_return uuidliteral11 =null;
-
- CpQueryFilterParser.stringliteral_return stringliteral12 =null;
-
- CpQueryFilterParser.floatliteral_return floatliteral13 =null;
-
-
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:231:7: ( booleanliteral | longliteral | uuidliteral | stringliteral | floatliteral )
- int alt1=5;
- switch ( input.LA(1) ) {
- case BOOLEAN:
- {
- alt1=1;
- }
- break;
- case LONG:
- {
- alt1=2;
- }
- break;
- case UUID:
- {
- alt1=3;
- }
- break;
- case STRING:
- {
- alt1=4;
- }
- break;
- case FLOAT:
- {
- alt1=5;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 1, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt1) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:232:3: booleanliteral
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_booleanliteral_in_value1096);
- booleanliteral9=booleanliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, booleanliteral9.getTree());
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:233:5: longliteral
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_longliteral_in_value1102);
- longliteral10=longliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, longliteral10.getTree());
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:234:5: uuidliteral
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_uuidliteral_in_value1108);
- uuidliteral11=uuidliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, uuidliteral11.getTree());
-
- }
- break;
- case 4 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:235:5: stringliteral
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_stringliteral_in_value1114);
- stringliteral12=stringliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, stringliteral12.getTree());
-
- }
- break;
- case 5 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:236:5: floatliteral
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_floatliteral_in_value1120);
- floatliteral13=floatliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, floatliteral13.getTree());
-
- }
- break;
-
- }
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "value"
-
-
- public static class equalityop_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "equalityop"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:247:1: equalityop : ( property LT ^ value | property LTE ^ value | property EQ ^ value | property GT ^ value | property GTE ^ value );
- public final CpQueryFilterParser.equalityop_return equalityop() throws RecognitionException {
- CpQueryFilterParser.equalityop_return retval = new CpQueryFilterParser.equalityop_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token LT15=null;
- Token LTE18=null;
- Token EQ21=null;
- Token GT24=null;
- Token GTE27=null;
- CpQueryFilterParser.property_return property14 =null;
-
- CpQueryFilterParser.value_return value16 =null;
-
- CpQueryFilterParser.property_return property17 =null;
-
- CpQueryFilterParser.value_return value19 =null;
-
- CpQueryFilterParser.property_return property20 =null;
-
- CpQueryFilterParser.value_return value22 =null;
-
- CpQueryFilterParser.property_return property23 =null;
-
- CpQueryFilterParser.value_return value25 =null;
-
- CpQueryFilterParser.property_return property26 =null;
-
- CpQueryFilterParser.value_return value28 =null;
-
-
- Object LT15_tree=null;
- Object LTE18_tree=null;
- Object EQ21_tree=null;
- Object GT24_tree=null;
- Object GTE27_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:247:12: ( property LT ^ value | property LTE ^ value | property EQ ^ value | property GT ^ value | property GTE ^ value )
- int alt2=5;
- switch ( input.LA(1) ) {
- case ID:
- {
- switch ( input.LA(2) ) {
- case LT:
- {
- alt2=1;
- }
- break;
- case LTE:
- {
- alt2=2;
- }
- break;
- case EQ:
- {
- alt2=3;
- }
- break;
- case GT:
- {
- alt2=4;
- }
- break;
- case GTE:
- {
- alt2=5;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 2, 1, input);
-
- throw nvae;
-
- }
-
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 2, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt2) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:248:3: property LT ^ value
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_property_in_equalityop1145);
- property14=property();
-
- state._fsp--;
-
- adaptor.addChild(root_0, property14.getTree());
-
- LT15=(Token)match(input,LT,FOLLOW_LT_in_equalityop1147);
- LT15_tree =
- new LessThan(LT15)
- ;
- root_0 = (Object)adaptor.becomeRoot(LT15_tree, root_0);
-
-
- pushFollow(FOLLOW_value_in_equalityop1153);
- value16=value();
-
- state._fsp--;
-
- adaptor.addChild(root_0, value16.getTree());
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:249:4: property LTE ^ value
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_property_in_equalityop1158);
- property17=property();
-
- state._fsp--;
-
- adaptor.addChild(root_0, property17.getTree());
-
- LTE18=(Token)match(input,LTE,FOLLOW_LTE_in_equalityop1160);
- LTE18_tree =
- new LessThanEqual(LTE18)
- ;
- root_0 = (Object)adaptor.becomeRoot(LTE18_tree, root_0);
-
-
- pushFollow(FOLLOW_value_in_equalityop1166);
- value19=value();
-
- state._fsp--;
-
- adaptor.addChild(root_0, value19.getTree());
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:250:4: property EQ ^ value
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_property_in_equalityop1171);
- property20=property();
-
- state._fsp--;
-
- adaptor.addChild(root_0, property20.getTree());
-
- EQ21=(Token)match(input,EQ,FOLLOW_EQ_in_equalityop1173);
- EQ21_tree =
- new Equal(EQ21)
- ;
- root_0 = (Object)adaptor.becomeRoot(EQ21_tree, root_0);
-
-
- pushFollow(FOLLOW_value_in_equalityop1179);
- value22=value();
-
- state._fsp--;
-
- adaptor.addChild(root_0, value22.getTree());
-
- }
- break;
- case 4 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:251:4: property GT ^ value
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_property_in_equalityop1184);
- property23=property();
-
- state._fsp--;
-
- adaptor.addChild(root_0, property23.getTree());
-
- GT24=(Token)match(input,GT,FOLLOW_GT_in_equalityop1186);
- GT24_tree =
- new GreaterThan(GT24)
- ;
- root_0 = (Object)adaptor.becomeRoot(GT24_tree, root_0);
-
-
- pushFollow(FOLLOW_value_in_equalityop1192);
- value25=value();
-
- state._fsp--;
-
- adaptor.addChild(root_0, value25.getTree());
-
- }
- break;
- case 5 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:252:4: property GTE ^ value
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_property_in_equalityop1197);
- property26=property();
-
- state._fsp--;
-
- adaptor.addChild(root_0, property26.getTree());
-
- GTE27=(Token)match(input,GTE,FOLLOW_GTE_in_equalityop1199);
- GTE27_tree =
- new GreaterThanEqual(GTE27)
- ;
- root_0 = (Object)adaptor.becomeRoot(GTE27_tree, root_0);
-
-
- pushFollow(FOLLOW_value_in_equalityop1205);
- value28=value();
-
- state._fsp--;
-
- adaptor.addChild(root_0, value28.getTree());
-
- }
- break;
-
- }
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "equalityop"
-
-
- public static class locationop_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "locationop"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:256:1: locationop : withinproperty WITHIN ^ ( floatliteral | longliteral ) OF ! ( floatliteral | longliteral ) ',' ! ( floatliteral | longliteral ) ;
- public final CpQueryFilterParser.locationop_return locationop() throws RecognitionException {
- CpQueryFilterParser.locationop_return retval = new CpQueryFilterParser.locationop_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token WITHIN30=null;
- Token OF33=null;
- Token char_literal36=null;
- CpQueryFilterParser.withinproperty_return withinproperty29 =null;
-
- CpQueryFilterParser.floatliteral_return floatliteral31 =null;
-
- CpQueryFilterParser.longliteral_return longliteral32 =null;
-
- CpQueryFilterParser.floatliteral_return floatliteral34 =null;
-
- CpQueryFilterParser.longliteral_return longliteral35 =null;
-
- CpQueryFilterParser.floatliteral_return floatliteral37 =null;
-
- CpQueryFilterParser.longliteral_return longliteral38 =null;
-
-
- Object WITHIN30_tree=null;
- Object OF33_tree=null;
- Object char_literal36_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:256:12: ( withinproperty WITHIN ^ ( floatliteral | longliteral ) OF ! ( floatliteral | longliteral ) ',' ! ( floatliteral | longliteral ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:3: withinproperty WITHIN ^ ( floatliteral | longliteral ) OF ! ( floatliteral | longliteral ) ',' ! ( floatliteral | longliteral )
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_withinproperty_in_locationop1220);
- withinproperty29=withinproperty();
-
- state._fsp--;
-
- adaptor.addChild(root_0, withinproperty29.getTree());
-
- WITHIN30=(Token)match(input,WITHIN,FOLLOW_WITHIN_in_locationop1222);
- WITHIN30_tree =
- new WithinOperand(WITHIN30)
- ;
- root_0 = (Object)adaptor.becomeRoot(WITHIN30_tree, root_0);
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:41: ( floatliteral | longliteral )
- int alt3=2;
- switch ( input.LA(1) ) {
- case FLOAT:
- {
- alt3=1;
- }
- break;
- case LONG:
- {
- alt3=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 3, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt3) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:42: floatliteral
- {
- pushFollow(FOLLOW_floatliteral_in_locationop1229);
- floatliteral31=floatliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, floatliteral31.getTree());
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:55: longliteral
- {
- pushFollow(FOLLOW_longliteral_in_locationop1231);
- longliteral32=longliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, longliteral32.getTree());
-
- }
- break;
-
- }
-
-
- OF33=(Token)match(input,OF,FOLLOW_OF_in_locationop1234);
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:72: ( floatliteral | longliteral )
- int alt4=2;
- switch ( input.LA(1) ) {
- case FLOAT:
- {
- alt4=1;
- }
- break;
- case LONG:
- {
- alt4=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 4, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt4) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:73: floatliteral
- {
- pushFollow(FOLLOW_floatliteral_in_locationop1238);
- floatliteral34=floatliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, floatliteral34.getTree());
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:86: longliteral
- {
- pushFollow(FOLLOW_longliteral_in_locationop1240);
- longliteral35=longliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, longliteral35.getTree());
-
- }
- break;
-
- }
-
-
- char_literal36=(Token)match(input,34,FOLLOW_34_in_locationop1243);
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:104: ( floatliteral | longliteral )
- int alt5=2;
- switch ( input.LA(1) ) {
- case FLOAT:
- {
- alt5=1;
- }
- break;
- case LONG:
- {
- alt5=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 5, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt5) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:105: floatliteral
- {
- pushFollow(FOLLOW_floatliteral_in_locationop1247);
- floatliteral37=floatliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, floatliteral37.getTree());
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:257:118: longliteral
- {
- pushFollow(FOLLOW_longliteral_in_locationop1249);
- longliteral38=longliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, longliteral38.getTree());
-
- }
- break;
-
- }
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "locationop"
-
-
- public static class containsop_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "containsop"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:260:1: containsop : containsproperty CONTAINS ^ stringliteral ;
- public final CpQueryFilterParser.containsop_return containsop() throws RecognitionException {
- CpQueryFilterParser.containsop_return retval = new CpQueryFilterParser.containsop_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token CONTAINS40=null;
- CpQueryFilterParser.containsproperty_return containsproperty39 =null;
-
- CpQueryFilterParser.stringliteral_return stringliteral41 =null;
-
-
- Object CONTAINS40_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:260:12: ( containsproperty CONTAINS ^ stringliteral )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:261:3: containsproperty CONTAINS ^ stringliteral
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_containsproperty_in_containsop1263);
- containsproperty39=containsproperty();
-
- state._fsp--;
-
- adaptor.addChild(root_0, containsproperty39.getTree());
-
- CONTAINS40=(Token)match(input,CONTAINS,FOLLOW_CONTAINS_in_containsop1265);
- CONTAINS40_tree =
- new ContainsOperand(CONTAINS40)
- ;
- root_0 = (Object)adaptor.becomeRoot(CONTAINS40_tree, root_0);
-
-
- pushFollow(FOLLOW_stringliteral_in_containsop1271);
- stringliteral41=stringliteral();
-
- state._fsp--;
-
- adaptor.addChild(root_0, stringliteral41.getTree());
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "containsop"
-
-
- public static class operation_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "operation"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:264:1: operation : ( '(' ! expression ')' !| equalityop | locationop | containsop );
- public final CpQueryFilterParser.operation_return operation() throws RecognitionException {
- CpQueryFilterParser.operation_return retval = new CpQueryFilterParser.operation_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token char_literal42=null;
- Token char_literal44=null;
- CpQueryFilterParser.expression_return expression43 =null;
-
- CpQueryFilterParser.equalityop_return equalityop45 =null;
-
- CpQueryFilterParser.locationop_return locationop46 =null;
-
- CpQueryFilterParser.containsop_return containsop47 =null;
-
-
- Object char_literal42_tree=null;
- Object char_literal44_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:264:11: ( '(' ! expression ')' !| equalityop | locationop | containsop )
- int alt6=4;
- switch ( input.LA(1) ) {
- case 31:
- {
- alt6=1;
- }
- break;
- case ID:
- {
- switch ( input.LA(2) ) {
- case EQ:
- case GT:
- case GTE:
- case LT:
- case LTE:
- {
- alt6=2;
- }
- break;
- case WITHIN:
- {
- alt6=3;
- }
- break;
- case CONTAINS:
- {
- alt6=4;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 6, 2, input);
-
- throw nvae;
-
- }
-
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 6, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt6) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:265:2: '(' ! expression ')' !
- {
- root_0 = (Object)adaptor.nil();
-
-
- char_literal42=(Token)match(input,31,FOLLOW_31_in_operation1281);
-
- pushFollow(FOLLOW_expression_in_operation1284);
- expression43=expression();
-
- state._fsp--;
-
- adaptor.addChild(root_0, expression43.getTree());
-
- char_literal44=(Token)match(input,32,FOLLOW_32_in_operation1286);
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:266:6: equalityop
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_equalityop_in_operation1294);
- equalityop45=equalityop();
-
- state._fsp--;
-
- adaptor.addChild(root_0, equalityop45.getTree());
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:267:6: locationop
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_locationop_in_operation1302);
- locationop46=locationop();
-
- state._fsp--;
-
- adaptor.addChild(root_0, locationop46.getTree());
-
- }
- break;
- case 4 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:268:6: containsop
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_containsop_in_operation1310);
- containsop47=containsop();
-
- state._fsp--;
-
- adaptor.addChild(root_0, containsop47.getTree());
-
- }
- break;
-
- }
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "operation"
-
-
- public static class notexp_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "notexp"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:272:1: notexp : ( NOT ^ operation | operation );
- public final CpQueryFilterParser.notexp_return notexp() throws RecognitionException {
- CpQueryFilterParser.notexp_return retval = new CpQueryFilterParser.notexp_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token NOT48=null;
- CpQueryFilterParser.operation_return operation49 =null;
-
- CpQueryFilterParser.operation_return operation50 =null;
-
-
- Object NOT48_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:272:8: ( NOT ^ operation | operation )
- int alt7=2;
- switch ( input.LA(1) ) {
- case NOT:
- {
- alt7=1;
- }
- break;
- case ID:
- case 31:
- {
- alt7=2;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 7, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt7) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:274:2: NOT ^ operation
- {
- root_0 = (Object)adaptor.nil();
-
-
- NOT48=(Token)match(input,NOT,FOLLOW_NOT_in_notexp1326);
- NOT48_tree =
- new NotOperand(NOT48)
- ;
- root_0 = (Object)adaptor.becomeRoot(NOT48_tree, root_0);
-
-
- pushFollow(FOLLOW_operation_in_notexp1332);
- operation49=operation();
-
- state._fsp--;
-
- adaptor.addChild(root_0, operation49.getTree());
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:275:3: operation
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_operation_in_notexp1338);
- operation50=operation();
-
- state._fsp--;
-
- adaptor.addChild(root_0, operation50.getTree());
-
- }
- break;
-
- }
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "notexp"
-
-
- public static class andexp_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "andexp"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:280:1: andexp : notexp ( AND ^ notexp )* ;
- public final CpQueryFilterParser.andexp_return andexp() throws RecognitionException {
- CpQueryFilterParser.andexp_return retval = new CpQueryFilterParser.andexp_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token AND52=null;
- CpQueryFilterParser.notexp_return notexp51 =null;
-
- CpQueryFilterParser.notexp_return notexp53 =null;
-
-
- Object AND52_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:280:8: ( notexp ( AND ^ notexp )* )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:281:2: notexp ( AND ^ notexp )*
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_notexp_in_andexp1352);
- notexp51=notexp();
-
- state._fsp--;
-
- adaptor.addChild(root_0, notexp51.getTree());
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:281:9: ( AND ^ notexp )*
- loop8:
- do {
- int alt8=2;
- switch ( input.LA(1) ) {
- case AND:
- {
- alt8=1;
- }
- break;
-
- }
-
- switch (alt8) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:281:10: AND ^ notexp
- {
- AND52=(Token)match(input,AND,FOLLOW_AND_in_andexp1355);
- AND52_tree =
- new AndOperand(AND52)
- ;
- root_0 = (Object)adaptor.becomeRoot(AND52_tree, root_0);
-
-
- pushFollow(FOLLOW_notexp_in_andexp1361);
- notexp53=notexp();
-
- state._fsp--;
-
- adaptor.addChild(root_0, notexp53.getTree());
-
- }
- break;
-
- default :
- break loop8;
- }
- } while (true);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "andexp"
-
-
- public static class expression_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "expression"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:286:1: expression : andexp ( OR ^ andexp )* ;
- public final CpQueryFilterParser.expression_return expression() throws RecognitionException {
- CpQueryFilterParser.expression_return retval = new CpQueryFilterParser.expression_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token OR55=null;
- CpQueryFilterParser.andexp_return andexp54 =null;
-
- CpQueryFilterParser.andexp_return andexp56 =null;
-
-
- Object OR55_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:286:12: ( andexp ( OR ^ andexp )* )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:287:2: andexp ( OR ^ andexp )*
- {
- root_0 = (Object)adaptor.nil();
-
-
- pushFollow(FOLLOW_andexp_in_expression1378);
- andexp54=andexp();
-
- state._fsp--;
-
- adaptor.addChild(root_0, andexp54.getTree());
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:287:9: ( OR ^ andexp )*
- loop9:
- do {
- int alt9=2;
- switch ( input.LA(1) ) {
- case OR:
- {
- alt9=1;
- }
- break;
-
- }
-
- switch (alt9) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:287:10: OR ^ andexp
- {
- OR55=(Token)match(input,OR,FOLLOW_OR_in_expression1381);
- OR55_tree =
- new OrOperand(OR55)
- ;
- root_0 = (Object)adaptor.becomeRoot(OR55_tree, root_0);
-
-
- pushFollow(FOLLOW_andexp_in_expression1387);
- andexp56=andexp();
-
- state._fsp--;
-
- adaptor.addChild(root_0, andexp56.getTree());
-
- }
- break;
-
- default :
- break loop9;
- }
- } while (true);
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "expression"
-
-
- public static class direction_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "direction"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:296:1: direction : ( ASC | DESC ) ;
- public final CpQueryFilterParser.direction_return direction() throws RecognitionException {
- CpQueryFilterParser.direction_return retval = new CpQueryFilterParser.direction_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token set57=null;
-
- Object set57_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:296:12: ( ( ASC | DESC ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:
- {
- root_0 = (Object)adaptor.nil();
-
-
- set57=(Token)input.LT(1);
-
- if ( input.LA(1)==ASC||input.LA(1)==DESC ) {
- input.consume();
- adaptor.addChild(root_0,
- (Object)adaptor.create(set57)
- );
- state.errorRecovery=false;
- }
- else {
- MismatchedSetException mse = new MismatchedSetException(null,input);
- throw mse;
- }
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "direction"
-
-
- public static class order_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "order"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:299:1: order : ( property ( direction )? ) ;
- public final CpQueryFilterParser.order_return order() throws RecognitionException {
- CpQueryFilterParser.order_return retval = new CpQueryFilterParser.order_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- CpQueryFilterParser.property_return property58 =null;
-
- CpQueryFilterParser.direction_return direction59 =null;
-
-
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:300:3: ( ( property ( direction )? ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:300:5: ( property ( direction )? )
- {
- root_0 = (Object)adaptor.nil();
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:300:5: ( property ( direction )? )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:300:6: property ( direction )?
- {
- pushFollow(FOLLOW_property_in_order1424);
- property58=property();
-
- state._fsp--;
-
- adaptor.addChild(root_0, property58.getTree());
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:300:15: ( direction )?
- int alt10=2;
- switch ( input.LA(1) ) {
- case ASC:
- case DESC:
- {
- alt10=1;
- }
- break;
- }
-
- switch (alt10) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:300:15: direction
- {
- pushFollow(FOLLOW_direction_in_order1426);
- direction59=direction();
-
- state._fsp--;
-
- adaptor.addChild(root_0, direction59.getTree());
-
- }
- break;
-
- }
-
-
- }
-
-
-
- String property = (property58!=null?input.toString(property58.start,property58.stop):null);
- String direction = (direction59!=null?input.toString(direction59.start,direction59.stop):null);
- query.addSort(new SortPredicate(property, direction));
-
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "order"
-
-
- public static class select_subject_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "select_subject"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:311:1: select_subject : ID ;
- public final CpQueryFilterParser.select_subject_return select_subject() throws RecognitionException {
- CpQueryFilterParser.select_subject_return retval = new CpQueryFilterParser.select_subject_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token ID60=null;
-
- Object ID60_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:312:3: ( ID )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:312:5: ID
- {
- root_0 = (Object)adaptor.nil();
-
-
- ID60=(Token)match(input,ID,FOLLOW_ID_in_select_subject1445);
- ID60_tree =
- (Object)adaptor.create(ID60)
- ;
- adaptor.addChild(root_0, ID60_tree);
-
-
-
-
- query.addSelect((ID60!=null?ID60.getText():null));
-
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "select_subject"
-
-
- public static class select_assign_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "select_assign"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:320:1: select_assign : target= ID ':' source= ID ;
- public final CpQueryFilterParser.select_assign_return select_assign() throws RecognitionException {
- CpQueryFilterParser.select_assign_return retval = new CpQueryFilterParser.select_assign_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token target=null;
- Token source=null;
- Token char_literal61=null;
-
- Object target_tree=null;
- Object source_tree=null;
- Object char_literal61_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:321:3: (target= ID ':' source= ID )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:321:5: target= ID ':' source= ID
- {
- root_0 = (Object)adaptor.nil();
-
-
- target=(Token)match(input,ID,FOLLOW_ID_in_select_assign1462);
- target_tree =
- (Object)adaptor.create(target)
- ;
- adaptor.addChild(root_0, target_tree);
-
-
- char_literal61=(Token)match(input,35,FOLLOW_35_in_select_assign1464);
- char_literal61_tree =
- (Object)adaptor.create(char_literal61)
- ;
- adaptor.addChild(root_0, char_literal61_tree);
-
-
- source=(Token)match(input,ID,FOLLOW_ID_in_select_assign1468);
- source_tree =
- (Object)adaptor.create(source)
- ;
- adaptor.addChild(root_0, source_tree);
-
-
-
-
- query.addSelect((target!=null?target.getText():null), (source!=null?source.getText():null));
-
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "select_assign"
-
-
- public static class select_expr_return extends ParserRuleReturnScope {
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "select_expr"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:327:1: select_expr : ( '*' | select_subject ( ',' select_subject )* | '{' select_assign ( ',' select_assign )* '}' ) ;
- public final CpQueryFilterParser.select_expr_return select_expr() throws RecognitionException {
- CpQueryFilterParser.select_expr_return retval = new CpQueryFilterParser.select_expr_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token char_literal62=null;
- Token char_literal64=null;
- Token char_literal66=null;
- Token char_literal68=null;
- Token char_literal70=null;
- CpQueryFilterParser.select_subject_return select_subject63 =null;
-
- CpQueryFilterParser.select_subject_return select_subject65 =null;
-
- CpQueryFilterParser.select_assign_return select_assign67 =null;
-
- CpQueryFilterParser.select_assign_return select_assign69 =null;
-
-
- Object char_literal62_tree=null;
- Object char_literal64_tree=null;
- Object char_literal66_tree=null;
- Object char_literal68_tree=null;
- Object char_literal70_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:3: ( ( '*' | select_subject ( ',' select_subject )* | '{' select_assign ( ',' select_assign )* '}' ) )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:5: ( '*' | select_subject ( ',' select_subject )* | '{' select_assign ( ',' select_assign )* '}' )
- {
- root_0 = (Object)adaptor.nil();
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:5: ( '*' | select_subject ( ',' select_subject )* | '{' select_assign ( ',' select_assign )* '}' )
- int alt13=3;
- switch ( input.LA(1) ) {
- case 33:
- {
- alt13=1;
- }
- break;
- case ID:
- {
- alt13=2;
- }
- break;
- case 39:
- {
- alt13=3;
- }
- break;
- default:
- NoViableAltException nvae =
- new NoViableAltException("", 13, 0, input);
-
- throw nvae;
-
- }
-
- switch (alt13) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:6: '*'
- {
- char_literal62=(Token)match(input,33,FOLLOW_33_in_select_expr1482);
- char_literal62_tree =
- (Object)adaptor.create(char_literal62)
- ;
- adaptor.addChild(root_0, char_literal62_tree);
-
-
- }
- break;
- case 2 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:12: select_subject ( ',' select_subject )*
- {
- pushFollow(FOLLOW_select_subject_in_select_expr1486);
- select_subject63=select_subject();
-
- state._fsp--;
-
- adaptor.addChild(root_0, select_subject63.getTree());
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:27: ( ',' select_subject )*
- loop11:
- do {
- int alt11=2;
- switch ( input.LA(1) ) {
- case 34:
- {
- alt11=1;
- }
- break;
-
- }
-
- switch (alt11) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:28: ',' select_subject
- {
- char_literal64=(Token)match(input,34,FOLLOW_34_in_select_expr1489);
- char_literal64_tree =
- (Object)adaptor.create(char_literal64)
- ;
- adaptor.addChild(root_0, char_literal64_tree);
-
-
- pushFollow(FOLLOW_select_subject_in_select_expr1491);
- select_subject65=select_subject();
-
- state._fsp--;
-
- adaptor.addChild(root_0, select_subject65.getTree());
-
- }
- break;
-
- default :
- break loop11;
- }
- } while (true);
-
-
- }
- break;
- case 3 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:52: '{' select_assign ( ',' select_assign )* '}'
- {
- char_literal66=(Token)match(input,39,FOLLOW_39_in_select_expr1498);
- char_literal66_tree =
- (Object)adaptor.create(char_literal66)
- ;
- adaptor.addChild(root_0, char_literal66_tree);
-
-
- pushFollow(FOLLOW_select_assign_in_select_expr1500);
- select_assign67=select_assign();
-
- state._fsp--;
-
- adaptor.addChild(root_0, select_assign67.getTree());
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:70: ( ',' select_assign )*
- loop12:
- do {
- int alt12=2;
- switch ( input.LA(1) ) {
- case 34:
- {
- alt12=1;
- }
- break;
-
- }
-
- switch (alt12) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:328:71: ',' select_assign
- {
- char_literal68=(Token)match(input,34,FOLLOW_34_in_select_expr1503);
- char_literal68_tree =
- (Object)adaptor.create(char_literal68)
- ;
- adaptor.addChild(root_0, char_literal68_tree);
-
-
- pushFollow(FOLLOW_select_assign_in_select_expr1505);
- select_assign69=select_assign();
-
- state._fsp--;
-
- adaptor.addChild(root_0, select_assign69.getTree());
-
- }
- break;
-
- default :
- break loop12;
- }
- } while (true);
-
-
- char_literal70=(Token)match(input,40,FOLLOW_40_in_select_expr1510);
- char_literal70_tree =
- (Object)adaptor.create(char_literal70)
- ;
- adaptor.addChild(root_0, char_literal70_tree);
-
-
- }
- break;
-
- }
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "select_expr"
-
-
- public static class ql_return extends ParserRuleReturnScope {
- public Query query;
- Object tree;
- public Object getTree() { return tree; }
- };
-
-
- // $ANTLR start "ql"
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:332:1: ql returns [Query query] : ( 'select' ! select_expr !)? ( ( 'where' !)? expression )? ( 'order by' ! order ! ( ',' ! order !)* )? ;
- public final CpQueryFilterParser.ql_return ql() throws RecognitionException {
- CpQueryFilterParser.ql_return retval = new CpQueryFilterParser.ql_return();
- retval.start = input.LT(1);
-
-
- Object root_0 = null;
-
- Token string_literal71=null;
- Token string_literal73=null;
- Token string_literal75=null;
- Token char_literal77=null;
- CpQueryFilterParser.select_expr_return select_expr72 =null;
-
- CpQueryFilterParser.expression_return expression74 =null;
-
- CpQueryFilterParser.order_return order76 =null;
-
- CpQueryFilterParser.order_return order78 =null;
-
-
- Object string_literal71_tree=null;
- Object string_literal73_tree=null;
- Object string_literal75_tree=null;
- Object char_literal77_tree=null;
-
- try {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:3: ( ( 'select' ! select_expr !)? ( ( 'where' !)? expression )? ( 'order by' ! order ! ( ',' ! order !)* )? )
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:5: ( 'select' ! select_expr !)? ( ( 'where' !)? expression )? ( 'order by' ! order ! ( ',' ! order !)* )?
- {
- root_0 = (Object)adaptor.nil();
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:5: ( 'select' ! select_expr !)?
- int alt14=2;
- switch ( input.LA(1) ) {
- case 37:
- {
- alt14=1;
- }
- break;
- }
-
- switch (alt14) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:6: 'select' ! select_expr !
- {
- string_literal71=(Token)match(input,37,FOLLOW_37_in_ql1533);
-
- pushFollow(FOLLOW_select_expr_in_ql1536);
- select_expr72=select_expr();
-
- state._fsp--;
-
-
- }
- break;
-
- }
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:31: ( ( 'where' !)? expression )?
- int alt16=2;
- switch ( input.LA(1) ) {
- case ID:
- case NOT:
- case 31:
- case 38:
- {
- alt16=1;
- }
- break;
- }
-
- switch (alt16) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:32: ( 'where' !)? expression
- {
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:39: ( 'where' !)?
- int alt15=2;
- switch ( input.LA(1) ) {
- case 38:
- {
- alt15=1;
- }
- break;
- }
-
- switch (alt15) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:39: 'where' !
- {
- string_literal73=(Token)match(input,38,FOLLOW_38_in_ql1542);
-
- }
- break;
-
- }
-
-
- pushFollow(FOLLOW_expression_in_ql1546);
- expression74=expression();
-
- state._fsp--;
-
- adaptor.addChild(root_0, expression74.getTree());
-
- }
- break;
-
- }
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:55: ( 'order by' ! order ! ( ',' ! order !)* )?
- int alt18=2;
- switch ( input.LA(1) ) {
- case 36:
- {
- alt18=1;
- }
- break;
- }
-
- switch (alt18) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:56: 'order by' ! order ! ( ',' ! order !)*
- {
- string_literal75=(Token)match(input,36,FOLLOW_36_in_ql1551);
-
- pushFollow(FOLLOW_order_in_ql1554);
- order76=order();
-
- state._fsp--;
-
-
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:75: ( ',' ! order !)*
- loop17:
- do {
- int alt17=2;
- switch ( input.LA(1) ) {
- case 34:
- {
- alt17=1;
- }
- break;
-
- }
-
- switch (alt17) {
- case 1 :
- // org/apache/usergrid/persistence/index/query/tree/CpQueryFilter.g:333:76: ',' ! order !
- {
- char_literal77=(Token)match(input,34,FOLLOW_34_in_ql1558);
-
- pushFollow(FOLLOW_order_in_ql1561);
- order78=order();
-
- state._fsp--;
-
-
- }
- break;
-
- default :
- break loop17;
- }
- } while (true);
-
-
- }
- break;
-
- }
-
-
-
-
- if((expression74!=null?((Object)expression74.tree):null) instanceof Operand){
- query.setRootOperand((Operand)(expression74!=null?((Object)expression74.tree):null));
- }
-
- retval.query = query;
-
-
-
-
- }
-
- retval.stop = input.LT(-1);
-
-
- retval.tree = (Object)adaptor.rulePostProcessing(root_0);
- adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);
-
- }
-
- finally {
- // do for sure before leaving
- }
- return retval;
- }
- // $ANTLR end "ql"
-
- // Delegated rules
-
-
-
-
- public static final BitSet FOLLOW_ID_in_property991 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_containsproperty1002 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_withinproperty1013 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_BOOLEAN_in_booleanliteral1024 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_LONG_in_longliteral1038 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_UUID_in_uuidliteral1052 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_STRING_in_stringliteral1065 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_FLOAT_in_floatliteral1080 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_booleanliteral_in_value1096 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_longliteral_in_value1102 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_uuidliteral_in_value1108 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_stringliteral_in_value1114 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_floatliteral_in_value1120 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_property_in_equalityop1145 = new BitSet(new long[]{0x0000000000080000L});
- public static final BitSet FOLLOW_LT_in_equalityop1147 = new BitSet(new long[]{0x0000000012042040L});
- public static final BitSet FOLLOW_value_in_equalityop1153 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_property_in_equalityop1158 = new BitSet(new long[]{0x0000000000100000L});
- public static final BitSet FOLLOW_LTE_in_equalityop1160 = new BitSet(new long[]{0x0000000012042040L});
- public static final BitSet FOLLOW_value_in_equalityop1166 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_property_in_equalityop1171 = new BitSet(new long[]{0x0000000000000200L});
- public static final BitSet FOLLOW_EQ_in_equalityop1173 = new BitSet(new long[]{0x0000000012042040L});
- public static final BitSet FOLLOW_value_in_equalityop1179 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_property_in_equalityop1184 = new BitSet(new long[]{0x0000000000004000L});
- public static final BitSet FOLLOW_GT_in_equalityop1186 = new BitSet(new long[]{0x0000000012042040L});
- public static final BitSet FOLLOW_value_in_equalityop1192 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_property_in_equalityop1197 = new BitSet(new long[]{0x0000000000008000L});
- public static final BitSet FOLLOW_GTE_in_equalityop1199 = new BitSet(new long[]{0x0000000012042040L});
- public static final BitSet FOLLOW_value_in_equalityop1205 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_withinproperty_in_locationop1220 = new BitSet(new long[]{0x0000000020000000L});
- public static final BitSet FOLLOW_WITHIN_in_locationop1222 = new BitSet(new long[]{0x0000000000042000L});
- public static final BitSet FOLLOW_floatliteral_in_locationop1229 = new BitSet(new long[]{0x0000000000800000L});
- public static final BitSet FOLLOW_longliteral_in_locationop1231 = new BitSet(new long[]{0x0000000000800000L});
- public static final BitSet FOLLOW_OF_in_locationop1234 = new BitSet(new long[]{0x0000000000042000L});
- public static final BitSet FOLLOW_floatliteral_in_locationop1238 = new BitSet(new long[]{0x0000000400000000L});
- public static final BitSet FOLLOW_longliteral_in_locationop1240 = new BitSet(new long[]{0x0000000400000000L});
- public static final BitSet FOLLOW_34_in_locationop1243 = new BitSet(new long[]{0x0000000000042000L});
- public static final BitSet FOLLOW_floatliteral_in_locationop1247 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_longliteral_in_locationop1249 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_containsproperty_in_containsop1263 = new BitSet(new long[]{0x0000000000000080L});
- public static final BitSet FOLLOW_CONTAINS_in_containsop1265 = new BitSet(new long[]{0x0000000002000000L});
- public static final BitSet FOLLOW_stringliteral_in_containsop1271 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_31_in_operation1281 = new BitSet(new long[]{0x0000000080220000L});
- public static final BitSet FOLLOW_expression_in_operation1284 = new BitSet(new long[]{0x0000000100000000L});
- public static final BitSet FOLLOW_32_in_operation1286 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_equalityop_in_operation1294 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_locationop_in_operation1302 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_containsop_in_operation1310 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_NOT_in_notexp1326 = new BitSet(new long[]{0x0000000080020000L});
- public static final BitSet FOLLOW_operation_in_notexp1332 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_operation_in_notexp1338 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_notexp_in_andexp1352 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_AND_in_andexp1355 = new BitSet(new long[]{0x0000000080220000L});
- public static final BitSet FOLLOW_notexp_in_andexp1361 = new BitSet(new long[]{0x0000000000000012L});
- public static final BitSet FOLLOW_andexp_in_expression1378 = new BitSet(new long[]{0x0000000001000002L});
- public static final BitSet FOLLOW_OR_in_expression1381 = new BitSet(new long[]{0x0000000080220000L});
- public static final BitSet FOLLOW_andexp_in_expression1387 = new BitSet(new long[]{0x0000000001000002L});
- public static final BitSet FOLLOW_property_in_order1424 = new BitSet(new long[]{0x0000000000000122L});
- public static final BitSet FOLLOW_direction_in_order1426 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_select_subject1445 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_ID_in_select_assign1462 = new BitSet(new long[]{0x0000000800000000L});
- public static final BitSet FOLLOW_35_in_select_assign1464 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_ID_in_select_assign1468 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_33_in_select_expr1482 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_select_subject_in_select_expr1486 = new BitSet(new long[]{0x0000000400000002L});
- public static final BitSet FOLLOW_34_in_select_expr1489 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_select_subject_in_select_expr1491 = new BitSet(new long[]{0x0000000400000002L});
- public static final BitSet FOLLOW_39_in_select_expr1498 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_select_assign_in_select_expr1500 = new BitSet(new long[]{0x0000010400000000L});
- public static final BitSet FOLLOW_34_in_select_expr1503 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_select_assign_in_select_expr1505 = new BitSet(new long[]{0x0000010400000000L});
- public static final BitSet FOLLOW_40_in_select_expr1510 = new BitSet(new long[]{0x0000000000000002L});
- public static final BitSet FOLLOW_37_in_ql1533 = new BitSet(new long[]{0x0000008200020000L});
- public static final BitSet FOLLOW_select_expr_in_ql1536 = new BitSet(new long[]{0x0000005080220002L});
- public static final BitSet FOLLOW_38_in_ql1542 = new BitSet(new long[]{0x0000000080220000L});
- public static final BitSet FOLLOW_expression_in_ql1546 = new BitSet(new long[]{0x0000001000000002L});
- public static final BitSet FOLLOW_36_in_ql1551 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_order_in_ql1554 = new BitSet(new long[]{0x0000000400000002L});
- public static final BitSet FOLLOW_34_in_ql1558 = new BitSet(new long[]{0x0000000000020000L});
- public static final BitSet FOLLOW_order_in_ql1561 = new BitSet(new long[]{0x0000000400000002L});
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c5187d22/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
index 56343d4..708e823 100644
--- a/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
+++ b/stack/services/src/main/java/org/apache/usergrid/management/ManagementService.java
@@ -73,7 +73,10 @@ public interface ManagementService {
public ApplicationInfo createApplication( UUID organizationId, String applicationName,
Map<String, Object> properties ) throws Exception;
- public OrganizationInfo createOrganization( String organizationName, UserInfo user, boolean activated )
+ public OrganizationInfo createOrganization(String organizationName, UserInfo user, boolean activated)
+ throws Exception;
+
+ public OrganizationInfo createOrganization(UUID orgUuid, String organizationName, UserInfo user, boolean activated)
throws Exception;
public OrganizationOwnerInfo createOwnerAndOrganization( String organizationName, String username, String name,
[15/19] incubator-usergrid git commit: POM should be set to 1.0.2 not
1.0.2-SNAPSHOT
Posted by gr...@apache.org.
POM should be set to 1.0.2 not 1.0.2-SNAPSHOT
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/5fbe31f2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/5fbe31f2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/5fbe31f2
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 5fbe31f241ddececef9255af6790ffd927ce754a
Parents: 15dbf8a
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 16:23:20 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 16:23:20 2015 -0400
----------------------------------------------------------------------
stack/build-tools/pom.xml | 2 +-
stack/config/pom.xml | 2 +-
stack/core/pom.xml | 2 +-
stack/java-sdk-old/pom.xml | 2 +-
stack/launcher/pom.xml | 2 +-
stack/mongo-emulator/pom.xml | 2 +-
stack/pom.xml | 2 +-
stack/rest/pom.xml | 2 +-
stack/services/pom.xml | 2 +-
stack/test-utils/pom.xml | 2 +-
stack/tools/pom.xml | 2 +-
stack/websocket/pom.xml | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/build-tools/pom.xml b/stack/build-tools/pom.xml
index d26a522..e0d4b93 100644
--- a/stack/build-tools/pom.xml
+++ b/stack/build-tools/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/config/pom.xml
----------------------------------------------------------------------
diff --git a/stack/config/pom.xml b/stack/config/pom.xml
index f3ac76b..c8d6748 100644
--- a/stack/config/pom.xml
+++ b/stack/config/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/core/pom.xml
----------------------------------------------------------------------
diff --git a/stack/core/pom.xml b/stack/core/pom.xml
index cc63582..47fa840 100644
--- a/stack/core/pom.xml
+++ b/stack/core/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/java-sdk-old/pom.xml
----------------------------------------------------------------------
diff --git a/stack/java-sdk-old/pom.xml b/stack/java-sdk-old/pom.xml
index 079eb2d..c0b5ad0 100644
--- a/stack/java-sdk-old/pom.xml
+++ b/stack/java-sdk-old/pom.xml
@@ -32,7 +32,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/launcher/pom.xml
----------------------------------------------------------------------
diff --git a/stack/launcher/pom.xml b/stack/launcher/pom.xml
index 12be3cf..2c32ba3 100644
--- a/stack/launcher/pom.xml
+++ b/stack/launcher/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/mongo-emulator/pom.xml
----------------------------------------------------------------------
diff --git a/stack/mongo-emulator/pom.xml b/stack/mongo-emulator/pom.xml
index 6dc1828..4f42812 100644
--- a/stack/mongo-emulator/pom.xml
+++ b/stack/mongo-emulator/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index 7dcde7d..bdc3549 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -27,7 +27,7 @@
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<name>Usergrid Parent</name>
<description>Parent module for the Apache Usergrid Project</description>
<packaging>pom</packaging>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 88963e7..6d404cf 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/services/pom.xml
----------------------------------------------------------------------
diff --git a/stack/services/pom.xml b/stack/services/pom.xml
index 5d69116..75fe4c3 100644
--- a/stack/services/pom.xml
+++ b/stack/services/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/test-utils/pom.xml
----------------------------------------------------------------------
diff --git a/stack/test-utils/pom.xml b/stack/test-utils/pom.xml
index 251454a..4c34f39 100644
--- a/stack/test-utils/pom.xml
+++ b/stack/test-utils/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/tools/pom.xml b/stack/tools/pom.xml
index 2c18c7a..4be3232 100644
--- a/stack/tools/pom.xml
+++ b/stack/tools/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/5fbe31f2/stack/websocket/pom.xml
----------------------------------------------------------------------
diff --git a/stack/websocket/pom.xml b/stack/websocket/pom.xml
index 8168c89..4861a37 100644
--- a/stack/websocket/pom.xml
+++ b/stack/websocket/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.2-SNAPSHOT</version>
+ <version>1.0.2</version>
<relativePath>../</relativePath>
</parent>
[10/19] incubator-usergrid git commit: Merge fix to assets test,
fix to LocalFileBinaryStore and more sensible logging in REST tests.
Posted by gr...@apache.org.
Merge fix to assets test, fix to LocalFileBinaryStore and more sensible logging in REST tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/04605d33
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/04605d33
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/04605d33
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 04605d33c29ba5fbfaed43915d5a364125de7f2c
Parents: 4516ccf
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 13:46:22 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 13:46:22 2015 -0400
----------------------------------------------------------------------
.../applications/assets/AssetResourceIT.java | 2 +-
stack/rest/src/test/resources/log4j.properties | 2 +
.../assets/data/LocalFileBinaryStore.java | 51 ++++++++++++++++++++
3 files changed, 54 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/04605d33/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
index c3cab63..10e9703 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/assets/AssetResourceIT.java
@@ -373,7 +373,7 @@ public class AssetResourceIT extends AbstractRestIT {
Map<String, String> payload = hashMap("name", "cassandra_eye.jpg");
- JsonNode node = resource().path("/test-organization/test-app/bars")
+ JsonNode node = resource().path("/test-organization/test-app/foos")
.queryParam("access_token", access_token)
.accept(MediaType.APPLICATION_JSON)
.type(MediaType.APPLICATION_JSON_TYPE)
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/04605d33/stack/rest/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/resources/log4j.properties b/stack/rest/src/test/resources/log4j.properties
index 3a9f9bb..3ae1591 100644
--- a/stack/rest/src/test/resources/log4j.properties
+++ b/stack/rest/src/test/resources/log4j.properties
@@ -27,6 +27,8 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p (%t) [%c] - %m%n
log4j.category.org.apache=ERROR, stdout
+log4j.category.org.apache.usergrid=WARN, stdout
+log4j.category.org.apache.usergrid.rest=INFO, stdout
log4j.logger.org.apache.usergrid.persistence.cassandra.DB=WARN, stdout
log4j.logger.org.apache.usergrid.persistence.cassandra.BATCH=WARN, stdout
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/04605d33/stack/services/src/main/java/org/apache/usergrid/services/assets/data/LocalFileBinaryStore.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/services/assets/data/LocalFileBinaryStore.java b/stack/services/src/main/java/org/apache/usergrid/services/assets/data/LocalFileBinaryStore.java
index 633f452..486c500 100644
--- a/stack/services/src/main/java/org/apache/usergrid/services/assets/data/LocalFileBinaryStore.java
+++ b/stack/services/src/main/java/org/apache/usergrid/services/assets/data/LocalFileBinaryStore.java
@@ -22,18 +22,36 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.Map;
+import java.util.Properties;
import java.util.UUID;
+import org.apache.commons.lang.RandomStringUtils;
import org.apache.usergrid.persistence.Entity;
import org.apache.commons.io.FileUtils;
+import org.apache.usergrid.persistence.EntityManager;
+import org.apache.usergrid.persistence.EntityManagerFactory;
+import org.apache.usergrid.utils.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
/** A binary store implementation using the local file system */
public class LocalFileBinaryStore implements BinaryStore {
+ private Logger LOG = LoggerFactory.getLogger( LocalFileBinaryStore.class );
+
private String reposLocation = FileUtils.getTempDirectoryPath();
+ private static final long FIVE_MB = ( FileUtils.ONE_MB * 5 );
+
+ @Autowired
+ private Properties properties;
+
+ @Autowired
+ private EntityManagerFactory emf;
+
/** Control where to store the file repository. In the system's temp dir by default. */
public void setReposLocation( String reposLocation ) {
@@ -64,9 +82,42 @@ public class LocalFileBinaryStore implements BinaryStore {
long size = FileUtils.sizeOf( file );
+ // determine max size file allowed, default to 50mb
+ long maxSizeBytes = 50 * FileUtils.ONE_MB;
+ String maxSizeMbString = properties.getProperty( "usergrid.binary.max-size-mb", "50" );
+ if (StringUtils.isNumeric( maxSizeMbString )) {
+ maxSizeBytes = Long.parseLong( maxSizeMbString ) * FileUtils.ONE_MB;
+ }
+
+ // always allow files up to 5mb
+ if (maxSizeBytes < 5 * FileUtils.ONE_MB ) {
+ maxSizeBytes = 5 * FileUtils.ONE_MB;
+ }
+
+ EntityManager em = emf.getEntityManager( appId );
Map<String, Object> fileMetadata = AssetUtils.getFileMetadata( entity );
+
+ if ( size > maxSizeBytes ) {
+ try {
+ fileMetadata.put( "error", "Asset size " + size
+ + " is larger than max size of " + maxSizeBytes );
+ em.update( entity );
+
+ } catch ( Exception e ) {
+ LOG.error( "Error updating entity with error message", e);
+ }
+ return;
+ }
+
fileMetadata.put( AssetUtils.CONTENT_LENGTH, size );
fileMetadata.put( AssetUtils.LAST_MODIFIED, System.currentTimeMillis() );
+ fileMetadata.put( AssetUtils.E_TAG, RandomStringUtils.randomAlphanumeric( 10 ) );
+
+ try {
+ em.update( entity );
+ } catch (Exception e) {
+ throw new IOException("Unable to update entity filedata", e);
+ }
// if we were successful, write the mime type
if ( file.exists() ) {
[08/19] incubator-usergrid git commit: Preparing for 1.0.2 RC 1.
Posted by gr...@apache.org.
Preparing for 1.0.2 RC 1.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/c21eb9e9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/c21eb9e9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/c21eb9e9
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: c21eb9e9ee82578fa9d731835a36d0818d2b8646
Parents: e8a5d47
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 10:00:24 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 10:00:24 2015 -0400
----------------------------------------------------------------------
.usergridversion | 2 +-
stack/build-tools/pom.xml | 2 +-
stack/config/pom.xml | 2 +-
stack/core/pom.xml | 2 +-
stack/java-sdk-old/pom.xml | 2 +-
stack/launcher/pom.xml | 2 +-
stack/mongo-emulator/pom.xml | 2 +-
stack/pom.xml | 2 +-
stack/rest/pom.xml | 2 +-
stack/services/pom.xml | 2 +-
stack/test-utils/pom.xml | 2 +-
stack/tools/pom.xml | 2 +-
stack/websocket/pom.xml | 2 +-
13 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/.usergridversion
----------------------------------------------------------------------
diff --git a/.usergridversion b/.usergridversion
index 7dea76e..6d7de6e 100644
--- a/.usergridversion
+++ b/.usergridversion
@@ -1 +1 @@
-1.0.1
+1.0.2
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/build-tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/build-tools/pom.xml b/stack/build-tools/pom.xml
index 07bfc76..d26a522 100644
--- a/stack/build-tools/pom.xml
+++ b/stack/build-tools/pom.xml
@@ -22,7 +22,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/config/pom.xml
----------------------------------------------------------------------
diff --git a/stack/config/pom.xml b/stack/config/pom.xml
index 7c7105f..f3ac76b 100644
--- a/stack/config/pom.xml
+++ b/stack/config/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/core/pom.xml
----------------------------------------------------------------------
diff --git a/stack/core/pom.xml b/stack/core/pom.xml
index d3e3e4e..cc63582 100644
--- a/stack/core/pom.xml
+++ b/stack/core/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/java-sdk-old/pom.xml
----------------------------------------------------------------------
diff --git a/stack/java-sdk-old/pom.xml b/stack/java-sdk-old/pom.xml
index faa4b88..079eb2d 100644
--- a/stack/java-sdk-old/pom.xml
+++ b/stack/java-sdk-old/pom.xml
@@ -32,7 +32,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/launcher/pom.xml
----------------------------------------------------------------------
diff --git a/stack/launcher/pom.xml b/stack/launcher/pom.xml
index b3b3949..12be3cf 100644
--- a/stack/launcher/pom.xml
+++ b/stack/launcher/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/mongo-emulator/pom.xml
----------------------------------------------------------------------
diff --git a/stack/mongo-emulator/pom.xml b/stack/mongo-emulator/pom.xml
index 7f03b61..6dc1828 100644
--- a/stack/mongo-emulator/pom.xml
+++ b/stack/mongo-emulator/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/pom.xml
----------------------------------------------------------------------
diff --git a/stack/pom.xml b/stack/pom.xml
index 5c3d4fe..7dcde7d 100644
--- a/stack/pom.xml
+++ b/stack/pom.xml
@@ -27,7 +27,7 @@
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<name>Usergrid Parent</name>
<description>Parent module for the Apache Usergrid Project</description>
<packaging>pom</packaging>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/rest/pom.xml
----------------------------------------------------------------------
diff --git a/stack/rest/pom.xml b/stack/rest/pom.xml
index 6a2c87f..88963e7 100644
--- a/stack/rest/pom.xml
+++ b/stack/rest/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/services/pom.xml
----------------------------------------------------------------------
diff --git a/stack/services/pom.xml b/stack/services/pom.xml
index 7ea6b16..5d69116 100644
--- a/stack/services/pom.xml
+++ b/stack/services/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/test-utils/pom.xml
----------------------------------------------------------------------
diff --git a/stack/test-utils/pom.xml b/stack/test-utils/pom.xml
index daa9f98..251454a 100644
--- a/stack/test-utils/pom.xml
+++ b/stack/test-utils/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/tools/pom.xml
----------------------------------------------------------------------
diff --git a/stack/tools/pom.xml b/stack/tools/pom.xml
index 77fcee4..2c18c7a 100644
--- a/stack/tools/pom.xml
+++ b/stack/tools/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/c21eb9e9/stack/websocket/pom.xml
----------------------------------------------------------------------
diff --git a/stack/websocket/pom.xml b/stack/websocket/pom.xml
index 64f4515..8168c89 100644
--- a/stack/websocket/pom.xml
+++ b/stack/websocket/pom.xml
@@ -21,7 +21,7 @@
<parent>
<groupId>org.apache.usergrid</groupId>
<artifactId>usergrid</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.2-SNAPSHOT</version>
<relativePath>../</relativePath>
</parent>
[14/19] incubator-usergrid git commit: Incrementing snapshot version
to 1.0.3-SNAPSHOT.
Posted by gr...@apache.org.
Incrementing snapshot version to 1.0.3-SNAPSHOT.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/15dbf8af
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/15dbf8af
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/15dbf8af
Branch: refs/heads/USERGRID-670-two-dot-o
Commit: 15dbf8af2fd93092de8cfa8c603c007de2e7cd84
Parents: 138a73f
Author: Dave Johnson <dm...@apigee.com>
Authored: Mon Jun 8 14:23:51 2015 -0400
Committer: Dave Johnson <dm...@apigee.com>
Committed: Mon Jun 8 14:23:51 2015 -0400
----------------------------------------------------------------------
.usergridversion | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/15dbf8af/.usergridversion
----------------------------------------------------------------------
diff --git a/.usergridversion b/.usergridversion
index 276823b..99eda91 100644
--- a/.usergridversion
+++ b/.usergridversion
@@ -1 +1 @@
-1.0.2-SNAPSHOT
+1.0.3-SNAPSHOT