Bug 819262 - Remove packageExists and assetExists methods from REST interface
Remove packageExists and assetExists methods from REST interface
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
urgent Severity urgent
: ER7
: BRMS 5.3.0.GA
Assigned To: Geoffrey De Smet
Lukáš Petrovický
Depends On:
  Show dependency treegraph
Reported: 2012-05-05 22:55 EDT by Jervis Liu
Modified: 2013-11-07 17:11 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jervis Liu 2012-05-05 22:55:47 EDT
Description of problem:

The  {packageName}/exists and {assetName}/exists we currently have in REST interface are not a very "RESTful", as the URL path "{packageName}/exists" does not represent a resource object. To determine whether or not a package/asset exist is better to be achieve by using HTTP 404 status like below: 

URL url2 = new URL(baseURL, "rest/packages/testRenamePackageFromAtom");
HttpURLConnection conn2 = (HttpURLConnection)url2.openConnection();
conn2.setRequestProperty("Authorization",   "Basic " + new Base64().encodeToString(("admin:admin".getBytes() )));
conn2.setRequestProperty("Accept", MediaType.APPLICATION_ATOM_XML);
assertEquals (404, conn2.getResponseCode());

Those two methods will removed from master and 5.4 branch, we need to do same thing on 5.3 branch as well, so that the REST interface are compatible on 5.3 and master branch.  NOTE, packageExists and assetExists were introduced after Guvnor 5.3 release, removing them wont cause any backward compatibility problem. 

How reproducible:

Steps to Reproduce:
Actual results:

Expected results:

Additional info:
Comment 1 Jervis Liu 2012-05-10 05:37:08 EDT
Fixed on 5.4.x
Comment 2 Geoffrey De Smet 2012-05-10 06:12:53 EDT
Resetting to assigned. We need to fix this on 5.3.x too and I got local changes for it too. Collaborating with Jervis :)
Comment 3 Geoffrey De Smet 2012-05-10 08:00:00 EDT
Fixed on master and 5.4.x, merged in Jervis's changes:
Backporting to 5.3.x now.
Comment 4 Geoffrey De Smet 2012-05-10 08:36:51 EDT
Fixed on 5.3.x too.
Comment 5 Tihomir Surdilovic 2012-05-10 11:43:49 EDT
Both jbpm Designer and jBPM Console depend on the Guvnor REST api. These types of changes can have big impact on them. I would like to suggest to _not_ remove Guvnor Rest methods in-between release, however mark them as deprecated and allow the client apps to actually be able to react to them properly and not be affected w/o knowing.
Comment 6 Geoffrey De Smet 2012-05-10 14:54:17 EDT
@tsurdilo You should be notified of REST api changes like this, yes. Sorry, that we didn't notify you.
The REST API is currently considered to be backwards compatible between Final releases (obvious bugfixes not withstanding), so since these methods weren't in a Final release yet, we still had full liberty to change them.
Comment 7 Ryan Zhang 2012-05-14 04:16:49 EDT
The fixed for this issue should be included in ER7. Please do verification on it.
Comment 8 Lukáš Petrovický 2012-05-17 09:34:57 EDT

Note You need to log in before you can comment on or make changes to this bug.