/** * Convenience method to get the guids of the created entities from * the EntityResult. */ public List<String> getCreatedEntities() { if(entityResult == null) { return Collections.emptyList(); } return getEntityResult().getCreatedEntities(); }
/** * Convenience method to get the guids of the created entities from * the EntityResult. */ public List<String> getCreatedEntities() { if(entityResult == null) { return Collections.emptyList(); } return getEntityResult().getCreatedEntities(); }
/** * Convenience method to get the guids of the created entities from * the EntityResult. */ public List<String> getCreatedEntities() { if(entityResult == null) { return Collections.emptyList(); } return getEntityResult().getCreatedEntities(); }
/** * Create the given entity * @param entities entity(type instance) as json * @return json array of guids * @throws AtlasServiceException */ protected List<String> createEntity(JSONArray entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); JSONObject response = callAPIWithBody(API.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEntities(); LOG.debug("Create entities returned results: {}", results); return results; }
/** * Create the given entity * @param entities entity(type instance) as json * @return json array of guids * @throws AtlasServiceException */ protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEntities(); LOG.debug("Create entities returned results: {}", results); return results; }
/** * Create the given entity * @param entities entity(type instance) as json * @return json array of guids * @throws AtlasServiceException */ protected List<String> createEntity(ArrayNode entities) throws AtlasServiceException { LOG.debug("Creating entities: {}", entities); ObjectNode response = callAPIWithBody(API_V1.CREATE_ENTITY, entities.toString()); List<String> results = extractEntityResult(response).getCreatedEntities(); LOG.debug("Create entities returned results: {}", results); return results; }
private String getSample(EntityResult entityResult) { String sample = getSample(entityResult.getCreatedEntities()); if (sample == null) { sample = getSample(entityResult.getUpdateEntities()); } return sample; }