[JBoss JIRA] (FORGE-2734) Result should allow an entity POJO to be added
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2734?page=com.atlassian.jira.plugin... ]
George Gastaldi closed FORGE-2734.
----------------------------------
Fix Version/s: 3.6.0.Final
Assignee: George Gastaldi
Resolution: Done
> Result should allow an entity POJO to be added
> ----------------------------------------------
>
> Key: FORGE-2734
> URL: https://issues.jboss.org/browse/FORGE-2734
> Project: Forge
> Issue Type: Enhancement
> Reporter: James Strachan
> Assignee: George Gastaldi
> Fix For: 3.6.0.Final
>
>
> when using an IDE or a REST API it can be handy to have a command that returns some result object that can be a blob of data that can be parsed/used by a program rather than textual console output.
> e.g. return a blob of JSON from a REST GET/POST on a forge command.
> We have a message a String which is great for textual status messages. But it might be nice to add an optional _entity_ property which folks could access from an IDE or REST API
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months
[JBoss JIRA] (FORGE-2734) Result should allow an entity POJO to be added
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/FORGE-2734?page=com.atlassian.jira.plugin... ]
James Strachan edited comment on FORGE-2734 at 3/2/17 12:22 PM:
----------------------------------------------------------------
good point!
I wonder if we could define a constant, say, `org.jboss.forge.ui.Results.ENTITY` or something - and make that constant be that same thing as a String. e.g.
{code}
context.getAttributeMap().put("org.jboss.forge.ui.Results.ENTITY", results);
{code}
So for now we could adopt using the same String value for now until the new forge release is out when we can all switch to the official constant expression?
was (Author: jastrachan):
good point!
I wonder if we could define a constant, say, `org.jboss.forge.ui.Results.ENTITY` or something - and make that constant be that same thing as a String. So for now we could adopt using the same String value for now until the new forge release is out when we can all switch to the official constant expression?
> Result should allow an entity POJO to be added
> ----------------------------------------------
>
> Key: FORGE-2734
> URL: https://issues.jboss.org/browse/FORGE-2734
> Project: Forge
> Issue Type: Enhancement
> Reporter: James Strachan
>
> when using an IDE or a REST API it can be handy to have a command that returns some result object that can be a blob of data that can be parsed/used by a program rather than textual console output.
> e.g. return a blob of JSON from a REST GET/POST on a forge command.
> We have a message a String which is great for textual status messages. But it might be nice to add an optional _entity_ property which folks could access from an IDE or REST API
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months
[JBoss JIRA] (FORGE-2734) Result should allow an entity POJO to be added
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/FORGE-2734?page=com.atlassian.jira.plugin... ]
James Strachan commented on FORGE-2734:
---------------------------------------
good point!
I wonder if we could define a constant, say, `org.jboss.forge.ui.Results.ENTITY` or something - and make that constant be that same thing as a String. So for now we could adopt using the same String value for now until the new forge release is out when we can all switch to the official constant expression?
> Result should allow an entity POJO to be added
> ----------------------------------------------
>
> Key: FORGE-2734
> URL: https://issues.jboss.org/browse/FORGE-2734
> Project: Forge
> Issue Type: Enhancement
> Reporter: James Strachan
>
> when using an IDE or a REST API it can be handy to have a command that returns some result object that can be a blob of data that can be parsed/used by a program rather than textual console output.
> e.g. return a blob of JSON from a REST GET/POST on a forge command.
> We have a message a String which is great for textual status messages. But it might be nice to add an optional _entity_ property which folks could access from an IDE or REST API
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months
[JBoss JIRA] (FORGE-2734) Result should allow an entity POJO to be added
by George Gastaldi (JIRA)
[ https://issues.jboss.org/browse/FORGE-2734?page=com.atlassian.jira.plugin... ]
George Gastaldi commented on FORGE-2734:
----------------------------------------
Attribute map could use {{org.jboss.forge.ui.RESULT_ENTITY}}. Not sure about the media type, as I believe that could be inferred from the caller Accept header
> Result should allow an entity POJO to be added
> ----------------------------------------------
>
> Key: FORGE-2734
> URL: https://issues.jboss.org/browse/FORGE-2734
> Project: Forge
> Issue Type: Enhancement
> Reporter: James Strachan
>
> when using an IDE or a REST API it can be handy to have a command that returns some result object that can be a blob of data that can be parsed/used by a program rather than textual console output.
> e.g. return a blob of JSON from a REST GET/POST on a forge command.
> We have a message a String which is great for textual status messages. But it might be nice to add an optional _entity_ property which folks could access from an IDE or REST API
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months
[JBoss JIRA] (FORGE-2734) Result should allow an entity POJO to be added
by James Strachan (JIRA)
[ https://issues.jboss.org/browse/FORGE-2734?page=com.atlassian.jira.plugin... ]
James Strachan commented on FORGE-2734:
---------------------------------------
until we change the API we could use a canonical key in the attributeMap to return the entity?
Also we maybe wanna add an optional media type maybe? e.g. "application/json"
> Result should allow an entity POJO to be added
> ----------------------------------------------
>
> Key: FORGE-2734
> URL: https://issues.jboss.org/browse/FORGE-2734
> Project: Forge
> Issue Type: Enhancement
> Reporter: James Strachan
>
> when using an IDE or a REST API it can be handy to have a command that returns some result object that can be a blob of data that can be parsed/used by a program rather than textual console output.
> e.g. return a blob of JSON from a REST GET/POST on a forge command.
> We have a message a String which is great for textual status messages. But it might be nice to add an optional _entity_ property which folks could access from an IDE or REST API
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months
[JBoss JIRA] (FORGE-2734) Result should allow an entity POJO to be added
by James Strachan (JIRA)
James Strachan created FORGE-2734:
-------------------------------------
Summary: Result should allow an entity POJO to be added
Key: FORGE-2734
URL: https://issues.jboss.org/browse/FORGE-2734
Project: Forge
Issue Type: Enhancement
Reporter: James Strachan
when using an IDE or a REST API it can be handy to have a command that returns some result object that can be a blob of data that can be parsed/used by a program rather than textual console output.
e.g. return a blob of JSON from a REST GET/POST on a forge command.
We have a message a String which is great for textual status messages. But it might be nice to add an optional _entity_ property which folks could access from an IDE or REST API
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months