Commit 95083cb0 by Sarath Subramanian Committed by Madhan Neethiraj

ATLAS-1242: update TypesResource API implementation to use new v2 TypesREST API

parent 710c17f5
...@@ -54,6 +54,7 @@ public enum AtlasErrorCode { ...@@ -54,6 +54,7 @@ public enum AtlasErrorCode {
TYPE_ALREADY_EXISTS(409, "ATLAS4091E", "Given type {0} already exists"), TYPE_ALREADY_EXISTS(409, "ATLAS4091E", "Given type {0} already exists"),
TYPE_HAS_REFERENCES(409, "ATLAS4092E", "Given type {0} has references"), TYPE_HAS_REFERENCES(409, "ATLAS4092E", "Given type {0} has references"),
TYPE_MATCH_FAILED(409, "ATLAS4093E", "Given type {0} doesn't match {1}"), TYPE_MATCH_FAILED(409, "ATLAS4093E", "Given type {0} doesn't match {1}"),
INVALID_TYPE_DEFINITION(409, "ATLAS4094E", "Invalid type definition {0}"),
INTERNAL_ERROR(500, "ATLAS5001E", "Internal server error {0}"), INTERNAL_ERROR(500, "ATLAS5001E", "Internal server error {0}"),
INDEX_CREATION_FAILED(500, "ATLAS5002E", "Index creation failed for {0}"), INDEX_CREATION_FAILED(500, "ATLAS5002E", "Index creation failed for {0}"),
......
...@@ -41,7 +41,7 @@ import javax.xml.bind.annotation.XmlRootElement; ...@@ -41,7 +41,7 @@ import javax.xml.bind.annotation.XmlRootElement;
public class SearchFilter { public class SearchFilter {
public static final String PARAM_TYPE = "type"; public static final String PARAM_TYPE = "type";
public static final String PARAM_SUPERTYPE = "supertype"; public static final String PARAM_SUPERTYPE = "supertype";
public static final String PARAM_NOT_SUPERTYPE = "notSupertype"; public static final String PARAM_NOT_SUPERTYPE = "notsupertype";
/** /**
* to specify whether the result should be sorted? If yes, whether asc or desc. * to specify whether the result should be sorted? If yes, whether asc or desc.
......
...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al ...@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai) ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES: ALL CHANGES:
ATLAS-1242 update TypesResource API implementation to use new v2 TypesREST API
ATLAS-1306 bootstrap type-load ignores model file contents if a type in the file already exists ATLAS-1306 bootstrap type-load ignores model file contents if a type in the file already exists
ATLAS-1299 The project org.apache.atlas:atlas-hbase-client-shaded - build error (shwethags) ATLAS-1299 The project org.apache.atlas:atlas-hbase-client-shaded - build error (shwethags)
ATLAS-1246 Upgrade versions of dependencies (shwethags) ATLAS-1246 Upgrade versions of dependencies (shwethags)
......
...@@ -82,7 +82,7 @@ public class TypesUtil { ...@@ -82,7 +82,7 @@ public class TypesUtil {
public static HierarchicalTypeDefinition<TraitType> createTraitTypeDef(String name, String description, String version, public static HierarchicalTypeDefinition<TraitType> createTraitTypeDef(String name, String description, String version,
ImmutableSet<String> superTypes, AttributeDefinition... attrDefs) { ImmutableSet<String> superTypes, AttributeDefinition... attrDefs) {
return new HierarchicalTypeDefinition<>(TraitType.class, name, description, superTypes, attrDefs); return new HierarchicalTypeDefinition<>(TraitType.class, name, description, version, superTypes, attrDefs);
} }
public static StructTypeDefinition createStructTypeDef(String name, AttributeDefinition... attrDefs) { public static StructTypeDefinition createStructTypeDef(String name, AttributeDefinition... attrDefs) {
......
...@@ -78,7 +78,7 @@ public class TypesJerseyResourceIT extends BaseResourceIT { ...@@ -78,7 +78,7 @@ public class TypesJerseyResourceIT extends BaseResourceIT {
@Test @Test
public void testSubmit() throws Exception { public void testSubmit() throws Exception {
for (HierarchicalTypeDefinition typeDefinition : typeDefinitions) { for (HierarchicalTypeDefinition typeDefinition : typeDefinitions) {
String typesAsJSON = TypesSerialization.toJson(typeDefinition); String typesAsJSON = TypesSerialization.toJson(typeDefinition, false);
System.out.println("typesAsJSON = " + typesAsJSON); System.out.println("typesAsJSON = " + typesAsJSON);
WebResource resource = service.path("api/atlas/types"); WebResource resource = service.path("api/atlas/types");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment