@Test @TestTarget(ServerVersion.ALM11) public void testUpdateEntity_MayaLink_failure() { handler.addRequest(false, "PUT", "/qcbin/rest/domains/domain/projects/project/defects/86/defect-links/2763", 500) .responseBody("Failed"); Entity link = new Entity("defect-link", 2763); link.setProperty("first-endpoint-id", "86"); Entity updated = entityService.updateEntity(link, Collections.singleton("comment"), false, false, false); Assert.assertNull(updated); checkError("Failed"); }
public Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent) { return updateEntity(entity, fieldsToUpdate, silent, false, true); }
EntityService { public Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent) { return updateEntity(entity, fieldsToUpdate, silent, false, true); } }
EntityService { public Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent) { return updateEntity(entity, fieldsToUpdate, silent, false, true); } EntityService(Project project, RestService restService, MetadataService metadataService, ErrorService errorService); }
EntityService { public Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent) { return updateEntity(entity, fieldsToUpdate, silent, false, true); } EntityService(Project project, RestService restService, MetadataService metadataService, ErrorService errorService); void addEntityListener(EntityListener listener); void removeEntityListener(EntityListener listener); void refreshEntity(EntityRef ref); void getEntityAsync(EntityRef ref, EntityListener callback); Entity getEntity(EntityRef ref); EntityList query(EntityQuery query); InputStream queryForStream(EntityQuery query); Entity getDefectLink(int defectId, int linkId); Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent); Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent, boolean reloadOnFailure); Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent, boolean reloadOnFailure, boolean fireUpdate); Entity createEntity(Entity entity, boolean silent); Entity lockEntity(Entity entity, boolean silent); boolean deleteEntity(Entity entity); void unlockEntity(Entity entity); void fireEntityLoaded(final Entity entity, final EntityListener.Event event); void fireEntityNotFound(final EntityRef ref, final boolean removed); void requestCachedEntity(final EntityRef ref, final List<String> properties, final EntityListener callback); }
EntityService { public Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent) { return updateEntity(entity, fieldsToUpdate, silent, false, true); } EntityService(Project project, RestService restService, MetadataService metadataService, ErrorService errorService); void addEntityListener(EntityListener listener); void removeEntityListener(EntityListener listener); void refreshEntity(EntityRef ref); void getEntityAsync(EntityRef ref, EntityListener callback); Entity getEntity(EntityRef ref); EntityList query(EntityQuery query); InputStream queryForStream(EntityQuery query); Entity getDefectLink(int defectId, int linkId); Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent); Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent, boolean reloadOnFailure); Entity updateEntity(Entity entity, Set<String> fieldsToUpdate, boolean silent, boolean reloadOnFailure, boolean fireUpdate); Entity createEntity(Entity entity, boolean silent); Entity lockEntity(Entity entity, boolean silent); boolean deleteEntity(Entity entity); void unlockEntity(Entity entity); void fireEntityLoaded(final Entity entity, final EntityListener.Event event); void fireEntityNotFound(final EntityRef ref, final boolean removed); void requestCachedEntity(final EntityRef ref, final List<String> properties, final EntityListener callback);  }