You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2015/12/20 23:18:20 UTC
[2/3] usergrid git commit: Remove org name unique index cleanup from
the rest api as this should be moved into a tool instead.
Remove org name unique index cleanup from the rest api as this should be moved into a tool instead.
Project: http://git-wip-us.apache.org/repos/asf/usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/usergrid/commit/1ac26265
Tree: http://git-wip-us.apache.org/repos/asf/usergrid/tree/1ac26265
Diff: http://git-wip-us.apache.org/repos/asf/usergrid/diff/1ac26265
Branch: refs/heads/1.x
Commit: 1ac262653e222d260be12da88a04732f5f45778f
Parents: c66ea5d
Author: Michael Russo <mi...@gmail.com>
Authored: Fri Dec 18 18:18:39 2015 -0800
Committer: Michael Russo <mi...@gmail.com>
Committed: Fri Dec 18 18:18:39 2015 -0800
----------------------------------------------------------------------
.../organizations/OrganizationResource.java | 31 --------------------
1 file changed, 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/usergrid/blob/1ac26265/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
index 9d223f9..eda2031 100644
--- a/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
+++ b/stack/rest/src/main/java/org/apache/usergrid/rest/management/organizations/OrganizationResource.java
@@ -35,7 +35,6 @@ import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
-import org.apache.usergrid.utils.UUIDUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -277,36 +276,6 @@ public class OrganizationResource extends AbstractContextResource {
return new JSONWithPadding( response, callback );
}
- @RequireOrganizationAccess
- @Consumes(MediaType.APPLICATION_JSON)
- @PUT
- @Path("index")
- public JSONWithPadding executePutOverride( @Context UriInfo ui, Map<String, Object> json,
- @QueryParam("callback") @DefaultValue("callback") String callback )
- throws Exception {
-
- logger.debug( "update organization unique index" );
-
- String oldUuidString = json.get( "oldUUID" ).toString();
- String newUuidString = json.get( "oldUUID" ).toString();
- if( oldUuidString.isEmpty() || newUuidString.isEmpty() ){
- throw new IllegalArgumentException("Property oldUUID and newUUID are both required.");
- }
-
- UUID oldUUID = UUID.fromString( oldUuidString );
- UUID newUUID = UUID.fromString( newUuidString );
-
- if( !newUUID.equals(organization.getUuid()) ){
- throw new IllegalArgumentException("Property newUUID must match the org name or UUID in the uri path.");
- }
-
- ApiResponse response = createApiResponse();
- response.setAction( "update organization unique index" );
- management.updateOrganizationUniqueIndex( organization, oldUUID );
-
-
- return new JSONWithPadding( response, callback );
- }
@POST
@Path("export")