Github user GERey commented on a diff in the pull request:
https://github.com/apache/incubator-usergrid/pull/232#discussion_r28733735
--- Diff:
stack/rest/src/test/java/org/apache/usergrid/rest/test/resource2point0/endpoints/NamedResource.java
---
@@ -17,32 +17,35 @@
package org.apache.usergrid.rest.test.resource2point0.endpoints;
+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 org.apache.usergrid.rest.test.resource2point0.state.ClientContext;
import com.sun.jersey.api.client.WebResource;
-import java.util.HashMap;
+import javax.ws.rs.core.MediaType;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.UUID;
/**
* Base class that is extended by named endpoints.
* The NamedResource stores the parent of the class, the context in which
the class operates and then Name of this resource
*/
-public abstract class NamedResource implements UrlResource {
+public abstract class NamedResource<T extends NamedResource<T>> implements
UrlResource {
- protected final String name;
- protected final ClientContext context;
+ protected String name;
+ protected ClientContext context;
/* Stores the path of the parent that called it.
i.e If we had a ApplicationResource ( an instance of a namedResource )
this would contain the OrganizationResource.
*/
- protected final UrlResource parent;
+ protected UrlResource parent;
+ protected abstract T getThis();
--- End diff --
I guess the comment on clarity should probably go here explaining the
purpose of the method.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---