@Test public void testBuildEntity_stringInvalid() throws IOException, URISyntaxException { String json = "{invalid-json}"; try { GenericCMSEntity.buildEntity(json); Assert.fail(); } catch (CMSEntityException cme) { } }
public static List<GenericCMSEntity> buildEntity(String jsonString) { JsonNode rootNode = null; try { rootNode = OBJECT_MAPPER.readTree(jsonString); } catch (Exception e) { String msg = MessageFormat.format("Parse entity json failed, json string is {0}", jsonString); logger.error(msg); throw new CMSEntityException(msg); } return buildEntity(rootNode); }
GenericCMSEntity extends AbstractCMSEntity { public static List<GenericCMSEntity> buildEntity(String jsonString) { JsonNode rootNode = null; try { rootNode = OBJECT_MAPPER.readTree(jsonString); } catch (Exception e) { String msg = MessageFormat.format("Parse entity json failed, json string is {0}", jsonString); logger.error(msg); throw new CMSEntityException(msg); } return buildEntity(rootNode); } }
GenericCMSEntity extends AbstractCMSEntity { public static List<GenericCMSEntity> buildEntity(String jsonString) { JsonNode rootNode = null; try { rootNode = OBJECT_MAPPER.readTree(jsonString); } catch (Exception e) { String msg = MessageFormat.format("Parse entity json failed, json string is {0}", jsonString); logger.error(msg); throw new CMSEntityException(msg); } return buildEntity(rootNode); } GenericCMSEntity();  GenericCMSEntity(String oid, String type); }
GenericCMSEntity extends AbstractCMSEntity { public static List<GenericCMSEntity> buildEntity(String jsonString) { JsonNode rootNode = null; try { rootNode = OBJECT_MAPPER.readTree(jsonString); } catch (Exception e) { String msg = MessageFormat.format("Parse entity json failed, json string is {0}", jsonString); logger.error(msg); throw new CMSEntityException(msg); } return buildEntity(rootNode); } GenericCMSEntity();  GenericCMSEntity(String oid, String type); boolean hasField(String fieldName); Object getFieldValue(String fieldName); Collection<String> getFieldNames(); void addFieldValue(String fieldName, Object fieldValue); void setFieldValue(String fieldName, Object fieldValue); @Override void removeFieldValue(String fieldName); void traverse(ICMSEntityVisitor visitor); @Override Date getDateField(String field); @Override void setDateField(String fieldName, Date d); @Override void excludeFields(String... fieldNames); @Override void includeFields(String... fieldNames); void clearDirtyBits(); void enableDirtyCheck(); void disableDirtyCheck(); @Override String get_metaclass(); @Override void set_metaclass(String metaClass); @Override String toString(); JsonNode toJson(); static List<GenericCMSEntity> buildEntity(String jsonString); static List<GenericCMSEntity> buildEntity(JsonNode rootNode); @Override boolean isDirty(String fieldName); @Override boolean isDirtyCheckEnabled(); @Override Set<String> getDirtyFields(); @Override void setDirtyFields(Set<String> fields); }
GenericCMSEntity extends AbstractCMSEntity { public static List<GenericCMSEntity> buildEntity(String jsonString) { JsonNode rootNode = null; try { rootNode = OBJECT_MAPPER.readTree(jsonString); } catch (Exception e) { String msg = MessageFormat.format("Parse entity json failed, json string is {0}", jsonString); logger.error(msg); throw new CMSEntityException(msg); } return buildEntity(rootNode); } GenericCMSEntity();  GenericCMSEntity(String oid, String type); boolean hasField(String fieldName); Object getFieldValue(String fieldName); Collection<String> getFieldNames(); void addFieldValue(String fieldName, Object fieldValue); void setFieldValue(String fieldName, Object fieldValue); @Override void removeFieldValue(String fieldName); void traverse(ICMSEntityVisitor visitor); @Override Date getDateField(String field); @Override void setDateField(String fieldName, Date d); @Override void excludeFields(String... fieldNames); @Override void includeFields(String... fieldNames); void clearDirtyBits(); void enableDirtyCheck(); void disableDirtyCheck(); @Override String get_metaclass(); @Override void set_metaclass(String metaClass); @Override String toString(); JsonNode toJson(); static List<GenericCMSEntity> buildEntity(String jsonString); static List<GenericCMSEntity> buildEntity(JsonNode rootNode); @Override boolean isDirty(String fieldName); @Override boolean isDirtyCheckEnabled(); @Override Set<String> getDirtyFields(); @Override void setDirtyFields(Set<String> fields);  }