rhq-project/rhq — pull request #104 by lzoubek (2014-08-05 12:24:02+00:00)
Title: Bug 1122444 - Server responds with 204 even if it fails to find the sche...

...dule

upon POST /metric/data/raw request

As POST /metric/data/raw accepts data points for various schedule IDs
rejecting all data, just because several have invalid scheduleId may not be
a good idea. Current fix does:
* return 204 (No content) in case all scheduleIds are valid and all data
were accepted
* returns 201 (rejected data) in case some data points were rejected and
some accepted
* returns 403 (rejected data) in case all data points were rejected

This commit also fixes endpoint POST /metric/data/raw/{resourceId} which now
returns 403 in case there is at least 1 non-existing metric for given
resource ID (this case was previously failing on NPE)