[JBoss JIRA] (FORGE-1911) @PUT method should return a HTTP 409 for ID mismatch
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1911?page=com.atlassian.jira.plugin... ]
Vineet Reynolds commented on FORGE-1911:
----------------------------------------
For some background on a peer-reviewed example, see JDF-703.
> @PUT method should return a HTTP 409 for ID mismatch
> ----------------------------------------------------
>
> Key: FORGE-1911
> URL: https://issues.jboss.org/browse/FORGE-1911
> Project: Forge
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Java EE
> Affects Versions: 2.6.0.Final
> Reporter: Vineet Reynolds
>
> The @Path value for @PUT method should match the supplied Id field (not necessarily named id, but whatever is the named of the primary key) in the supplied HTTP request body.
> A mismatch here would indicate an attempt was made to update the Id, which is incorrect as per the JPA spec. A HTTP 409 (conflict) is a valid response code in such a case.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1911) @PUT method should return a HTTP 409 for ID mismatch
by Vineet Reynolds (JIRA)
Vineet Reynolds created FORGE-1911:
--------------------------------------
Summary: @PUT method should return a HTTP 409 for ID mismatch
Key: FORGE-1911
URL: https://issues.jboss.org/browse/FORGE-1911
Project: Forge
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Java EE
Affects Versions: 2.6.0.Final
Reporter: Vineet Reynolds
The @Path value for @PUT method should match the supplied Id field (not necessarily named id, but whatever is the named of the primary key) in the supplied HTTP request body.
A mismatch here would indicate an attempt was made to update the Id, which is incorrect as per the JPA spec. A HTTP 409 (conflict) is a valid response code in such a case.
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1275) @PUT method shouldn't have a @Path
by Vineet Reynolds (JIRA)
[ https://issues.jboss.org/browse/FORGE-1275?page=com.atlassian.jira.plugin... ]
Vineet Reynolds updated FORGE-1275:
-----------------------------------
Status: Resolved (was: Pull Request Sent)
Fix Version/s: (was: 2.x Future)
Resolution: Rejected
I'm going to have to reject this issue. The {{@Path}} is very much required since it is used to identified a specific resource to be updated.
If we consider {{/rest/users}} to represent a collection resource, then an update of an individual user must be done via {{PUT /rest/members/X}} where X identifies the individual resource (located in the collection) to update. Note {{/rest/users}} is a collection here, and the HTTP semantics apply to this URL as well. A {{PUT /rest/users}} would represent an entire collection update (replacing everything in it with a single element), must like a {{POST /rest/users}} represents adding a new member to the collection resource. So, the Path annotation is very much necessary.
What is necessary is here, is validation to verify the Path value equality with the id inside the PUT body.
> @PUT method shouldn't have a @Path
> ----------------------------------
>
> Key: FORGE-1275
> URL: https://issues.jboss.org/browse/FORGE-1275
> Project: Forge
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Scaffold
> Affects Versions: 1.4.2.Final
> Reporter: Antonio Goncalves
>
> Hi,
> In the REST scaffolding, the generate {{update}} method looks like this :
> {code}
> @PUT
> @Path("/{id:[0-9][0-9]*}")
> @Consumes("application/xml")
> public Response update(Book entity) {
> em.merge(entity);
> return Response.noContent().build();
> }
> {code}
> The method has a {{@Path}} annotation with an id and therefore cannot be invoked (without the id that is not used in the method). So it should simply be :
> {code}
> @PUT
> @Consumes("application/xml")
> public Response update(Book entity) {
> em.merge(entity);
> return Response.noContent().build();
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1448) Cannot cd an Entity with TAB completion
by Lincoln Baxter III (JIRA)
[ https://issues.jboss.org/browse/FORGE-1448?page=com.atlassian.jira.plugin... ]
Lincoln Baxter III updated FORGE-1448:
--------------------------------------
Assignee: George Gastaldi (was: Lincoln Baxter III)
> Cannot cd an Entity with TAB completion
> ---------------------------------------
>
> Key: FORGE-1448
> URL: https://issues.jboss.org/browse/FORGE-1448
> Project: Forge
> Issue Type: Sub-task
> Security Level: Public(Everyone can see)
> Components: UI - Shell
> Affects Versions: 2.0.0.CR2, 2.4.1.Final
> Reporter: Antonio Goncalves
> Assignee: George Gastaldi
> Fix For: 2.x Future
>
>
> When I create 2 entities, I can {{cd}} from on to another if I specify the class, but it doesn't work with TAB completion :
> {code}
> [Speaker.java]$ cd ../Talk.java
> [Talk.java]$ cd ../Speaker.java
> [Speaker.java]$ cd ../T TAB
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1622) It would be good if Aesh had access to export variables
by Daniel Cunha (JIRA)
[ https://issues.jboss.org/browse/FORGE-1622?page=com.atlassian.jira.plugin... ]
Daniel Cunha updated FORGE-1622:
--------------------------------
Status: Pull Request Sent (was: Open)
Git Pull Request: https://github.com/forge/core/pull/476 (was: https://github.com/forge/core/pull/467)
> It would be good if Aesh had access to export variables
> -------------------------------------------------------
>
> Key: FORGE-1622
> URL: https://issues.jboss.org/browse/FORGE-1622
> Project: Forge
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: UI - Shell
> Affects Versions: 2.1.1.Final
> Reporter: Antonio Goncalves
> Assignee: Daniel Cunha
> Priority: Minor
> Fix For: 2.x Future
>
>
> This would be a "nice to have" feature from the shell command line.
> I'm under OS X and I have a set of variables that I've exported. As an example, all my code is under {{$CODE_HOME}}. It would be good if I code {{cd $CODE_HOME}} when I'm in Aesh :
> {code}
> ~$ cd $CODE_HOME // Under OS X
> ~/Documents/Code$ forge // Entering Forge
> _____
> | ___|__ _ __ __ _ ___
> | |_ / _ \| `__/ _` |/ _ \ \\
> | _| (_) | | | (_| | __/ //
> |_| \___/|_| \__, |\___|
> |___/
> JBoss Forge, version [ 2.1.1.Final ] - JBoss, by Red Hat, Inc.
> [Code]$ cd ~
> [antoniombp]$ cd $CODE_HOME // Good if it goes to the right directory
> [antoniombp]$ echo $CODE_HOME // Doesn't have access to the exported variable
> [antoniombp]$
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months
[JBoss JIRA] (FORGE-1909) Refactor Resource API
by Shane Bryzak (JIRA)
Shane Bryzak created FORGE-1909:
-----------------------------------
Summary: Refactor Resource API
Key: FORGE-1909
URL: https://issues.jboss.org/browse/FORGE-1909
Project: Forge
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Resources
Reporter: Shane Bryzak
Refactor the resource API for Forge 3.0, removing the existing File and Directory-based resources and replacing with Path resources
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 5 months