[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-12-05 Thread Dan Haywood (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14235980#comment-14235980
 ] 

Dan Haywood commented on ISIS-917:
--

Just wanting to progress/close off this thread.

Although you've posted your custom representation service, the error you're
raising is really in the validation of the arguments, all of which happens
before RO delegates off your service,

I've been able to reproduce the behaviour you've described, but I don't
think it's an error.  Here's what I did:

In the SimpleObjects service (part of simpleapp example/archetype), I added:

@Bookmarkable
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = 1)
public ListSimpleObject list(final @Named(name) String name) {
return Lists.newArrayList(Iterables.filter(
listAll(),
new PredicateSimpleObject() {
@Override
public boolean apply(final SimpleObject input) {
return input.getName().contains(name);
}
}));
}


With the default fixture data, this will match 1 element if called with an
'F', and 2 elements if called with a 'B':

http://localhost:8080/restful/services/SimpleObjects/actions/list/invoke?name=F

or

http://localhost:8080/restful/services/SimpleObjects/actions/list/invoke?name=B

As you report though, calling this with a number fails:

http://localhost:8080/restful/services/SimpleObjects/actions/list/invoke?name=1

will give:

{
  name: {
value: 1,
invalidReason: is not a string
  },
  x-ro-invalidReason: 'name' is mandatory
}

However, you can add quotes and it'll work:

http://localhost:8080/restful/services/SimpleObjects/actions/list/invoke?name=
1

URL encoded this is:

http://localhost:8080/restful/services/SimpleObjects/actions/list/invoke?name=%221%22


~~~
All that said, do be aware that invoking actions on the command line is
only provided as a convenience for @ActionSemantics(Of.SAFE) queries, to
be easily invoked by a human.  But there is also the limitation that any
arguments must be simple scalars; it isn't possible to invoke an action
that has a reference to another object (ie as an href) using this
mechanism.  And it doesn't support PUT (idempotent) or POST
(non-idempotent) actions.

However, the RO spec does define a fully general purpose way of invoking
actions that (a) do allow arguments that are references to other objects,
and (b) can be PUT or POST... the contents is in the body, not the query
string.  Basically, the general form is a URL encoded JSON object, as
provided in the action prompt resource.

So, for the example above, the arguments map is:

name: {
  value: null
}

which by following the describedby link (
http://localhost:8080/restful/domain-types/dom.simple.SimpleObjects/actions/list)
one can discover that name is of type string.

Anyway... the general purpose way to invoke this action (ie as I intend
that a computer program would invoke it) is to URL encode this string and
pass as either the query string or the body.  Thus:

name: {
  value: B
}

encodes to:

%7B%22name%22%3A%7B%22value%22%3A%22B%22%7D%7D

which can then be invoked using:

http://localhost:8080/restful/services/SimpleObjects/actions/list/invoke?%7B%22name%22%3A%7B%22value%22%3A%22B%22%7D%7D

This will produce the same results as:

http://localhost:8080/restful/services/SimpleObjects/actions/list/invoke?name=
F

~~~
So, all that said, I don't think there's an issue.  The short answer is to
use quotes around anything that might be interpreted as an int; the long
answer is that a computer program should be using the URL encoded JSON map.

HTH
Dan





On 28 October 2014 at 10:55, Vladimir Nisevic (JIRA) j...@apache.org



 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
 Fix For: core-1.7.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-28 Thread Vladimir Nisevic (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14186689#comment-14186689
 ] 

Vladimir Nisevic commented on ISIS-917:
---

Hi Dan, using the feature I've found next strange behaviour.

Given my custom representation class
{code}
package webapp;

import java.io.IOException;
import java.util.Arrays;

import javax.ws.rs.core.Response;

import a1.ase.esb.AsePublicService;
import a1.ase.viewmodel.Address;

import org.codehaus.jackson.map.ObjectMapper;

import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.applib.annotation.ActionSemantics;
import org.apache.isis.applib.annotation.ActionSemantics.Of;
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.Named;
import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
import 
org.apache.isis.viewer.restfulobjects.rendering.domainobjects.ActionResultReprRenderer;
import 
org.apache.isis.viewer.restfulobjects.rendering.domainobjects.ObjectAndActionInvocation;
import 
org.apache.isis.viewer.restfulobjects.rendering.service.RepresentationServiceForRestfulObjects;

@DomainService
public class AseRestCustomRepresentation extends 
RepresentationServiceForRestfulObjects {

@Override
public Response actionResult(Context rendererContext, 
ObjectAndActionInvocation objectAndActionInvocation, 
ActionResultReprRenderer.SelfLink selfLink) {

String[] actionIds = { retreiveAddressForLkmsId };

if 
(Arrays.asList(actionIds).contains(objectAndActionInvocation.getAction().getId()))
 {
ObjectMapper objectMapper = new ObjectMapper();
try {
ObjectAdapter returnedAdapter = 
objectAndActionInvocation.getReturnedAdapter();
if (returnedAdapter != null) {
String writeValueAsString = 
objectMapper.writeValueAsString(returnedAdapter.getObject());
return buildResponse(Response.ok(writeValueAsString));
}
return buildResponse(Response.ok());
} catch (IOException e) {
e.printStackTrace();
}
return buildResponse(Response.serverError());
}

return super.actionResult(rendererContext, objectAndActionInvocation, 
selfLink);
}

// region  injected services
@javax.inject.Inject
private DomainObjectContainer container;

@javax.inject.Inject
private AsePublicService asePublicService;

// endregion

@ActionSemantics(Of.SAFE)
public Address retreiveAddressForLkmsId(final @Named(lkmsid) String 
lkmsId) {
return asePublicService.retrieveAddressForLkmsId(lkmsId, false);
}
}

{code}

When calling the method retreiveAddressForLkmsId with GET Request 
http://localhost:8080/restful/services/AseRestCustomRepresentation/actions/retreiveAddressForLkmsId/invoke?lkmsid=123
 

Then the RO viewer shows error
{code}
{
-lkmsid: {
value: 123,
invalidReason: is not a string
},
x-ro-invalidReason: 'lkmsid' is mandatory
}
{code}


When I call the method retreiveAddressForLkmsId with GET Request 
http://localhost:8080/restful/services/AseRestCustomRepresentation/actions/retreiveAddressForLkmsId/invoke?lkmsid=aa

Then the RO viewer accepts aa as String parameter 'lkmsid'



 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
 Fix For: core-1.7.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-13 Thread Vladimir Nisevic (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14169879#comment-14169879
 ] 

Vladimir Nisevic commented on ISIS-917:
---

Hi Dan, once again thank you for this feature. Here my first experience.

I've subclassed the RepresentationServiceForRestfulObjects as advised, but 
instead of overriding buildResponse I had to override e.g. actionResult method. 
In method buildResponse seems to be to late for my requirements?

Then I use Jackson to serialize my entity into JSON. 

Here my code, if you want you could commit it into Todo-App, since it is more 
concrete example...

{code}
/*
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  License); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 *
 *http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */
package webapp;

import dom.todo.ToDoItem;
import dom.todo.ToDoItems;
import org.apache.isis.applib.DomainObjectContainer;
import org.apache.isis.applib.annotation.*;
import org.apache.isis.applib.annotation.ActionSemantics.Of;
import org.apache.isis.applib.services.clock.ClockService;
import 
org.apache.isis.viewer.restfulobjects.rendering.domainobjects.ActionResultReprRenderer;
import 
org.apache.isis.viewer.restfulobjects.rendering.domainobjects.ObjectAndActionInvocation;
import 
org.apache.isis.viewer.restfulobjects.rendering.service.RepresentationServiceForRestfulObjects;
import org.codehaus.jackson.map.ObjectMapper;
import org.joda.time.LocalDate;

import javax.ws.rs.core.Response;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;

@DomainService
public class ToDoItemsCustomRepresentation extends 
RepresentationServiceForRestfulObjects {

@Override
public Response actionResult(Context rendererContext, 
ObjectAndActionInvocation objectAndActionInvocation,
 ActionResultReprRenderer.SelfLink selfLink) {

if (objectAndActionInvocation.getAction().getId() == allToDos) {
ObjectMapper objectMapper = new ObjectMapper();
try {
String writeValueAsString = 
objectMapper.writeValueAsString(objectAndActionInvocation.getReturnedAdapter().getObject());
return buildResponse(Response.ok(writeValueAsString));
} catch (IOException e) {
e.printStackTrace();
}
return buildResponse(Response.serverError());
}

return super.actionResult(rendererContext, objectAndActionInvocation, 
selfLink);
}

//region  injected services
@javax.inject.Inject
private DomainObjectContainer container;

@javax.inject.Inject
private ToDoItems toDoItems;

//endregion

//region  helpers
@javax.inject.Inject
private ClockService clockService;

//endregion

@Prototype
@ActionSemantics(Of.SAFE)
@MemberOrder(sequence = 50)
public ListToDoItem allToDos() {
return toDoItems.allToDos();
}

public ToDoItem newToDo(
final @RegEx(validation = \\w[@:\\-\\,\\.\\+ \\w]*) 
@Named(Description) String description,
final @Named(Category) ToDoItem.Category category,
final @Optional @Named(Subcategory) ToDoItem.Subcategory 
subcategory,
final @Optional @Named(Due by) LocalDate dueBy,
final @Optional @Named(Cost) BigDecimal cost) {
return toDoItems.newToDo(description, category, subcategory, dueBy, 
cost);
}
}

{code]

and calling the action allToDos I get now next response. e.g.
{code}
STATUS 200 OK
TIME 3431 ms
Pretty Raw PreviewJSON Copy
[
-{
description: bb1
-dueBy: [
2014
10
27
]
category: Professional
subcategory: OpenSource
ownedBy: sven
complete: false
cost: 3
notes: null
attachment: null
doc: null
dependencies: [ ]
versionSequence: 1
due: true
}
-{
description: bb1 - Copy
-dueBy: [
2014
10
27
]
category: Professional
subcategory: OpenSource
ownedBy: sven
complete: false
cost: null
notes: null
attachment: null
doc: null
-dependencies: [
-{
description: bb1
-dueBy: [
2014
10
27
]
category: Professional
subcategory: OpenSource
ownedBy: sven
complete: false
cost: 3
notes: null
attachment: null
doc: null
dependencies: [ ]
versionSequence: 1
due: true
}
]
versionSequence: 2
due: true
}
]
{code}

Still have some 

[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-13 Thread Dan Haywood (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14170177#comment-14170177
 ] 

Dan Haywood commented on ISIS-917:
--

Hi Vladimir,
glad you've had a chance to play with this and you've made some progress.

With respect to the buildResponse() method, you've done the right thing by 
ignoring; I added it mostly just so I could easily test the pluggability by 
adding in an additional X- http header.  But my expectation was that in 
reality the entire methods would need to be overridden, exactly as you've done.

With respect to the processing of the inbound requests, we could certainly 
provide a separate pluggable service for that too, (eg a 
RequestHandlerService); I did think that there'd be some sort of need.  Then 
again a final solution will also need to tie together these different 
representation generators and request handlers and also to make them switchable 
on the Accept header/Content-Type.

Ideally, it'd be nice to provide an implementation for some of the common media 
types out there, eg HAL, Collection+JSON or Siren.  And use Accept header to 
switch between any of these plus also the native RO representation.

If you have any further ideas, do please say; keen to iterate here.

Cheers
Dan

 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.7.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14168233#comment-14168233
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit b1983f60fe09858d63bc275dc3ae5acbf1b03631 in isis's branch 
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=b1983f6 ]

ISIS-917: reinstating method that had been removed from RendererContext API, 
causing unnecessary breakage in isisaddons' isis-module-publishing.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.7.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-10 Thread Vladimir Nisevic (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14166987#comment-14166987
 ] 

Vladimir Nisevic commented on ISIS-917:
---

Hi Dan, I see you have implemented my feature request which is great. Looking 
in todowebapp I see the CustomService but don't know how I could use it?

Any hints where to look?

Thanks, Vladimir

 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.7.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-10 Thread Vladimir Nisevic (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14166998#comment-14166998
 ] 

Vladimir Nisevic commented on ISIS-917:
---

Hi once again. I haven't registered hints you already made, let me try that 
first. 
Sorry for noise.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.7.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165008#comment-14165008
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit 9af78330bf092df7736997b92f8a1fb576174d4e in isis's branch 
refs/heads/ISIS-917 from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=9af7833 ]

ISIS-917: fixing TCK tests for RO viewer post-refactoring.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165009#comment-14165009
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit 6907534b421daa083cd5b96b9a0a476e64c2e8e9 in isis's branch 
refs/heads/ISIS-917 from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=6907534 ]

ISIS-917: further refactorings to simplify the API of the (newly rechristened) 
RepresentationService.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165007#comment-14165007
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit 064c42e921a3fafbc5d83960b4e31e3715d0aa3c in isis's branch 
refs/heads/ISIS-917 from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=064c42e ]

ISIS-917: first cut at a pluggable representations service for RO.

Fix for NPE when app runs (previous commit lied), tests still failing.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165015#comment-14165015
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit 9af78330bf092df7736997b92f8a1fb576174d4e in isis's branch 
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=9af7833 ]

ISIS-917: fixing TCK tests for RO viewer post-refactoring.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165013#comment-14165013
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit bfece661b326a070f5d25cc814a539dbd11d97a8 in isis's branch 
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=bfece66 ]

ISIS-917: first cut at a pluggable representations service for RO.

The app runs fine, but tests are failing.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165014#comment-14165014
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit 064c42e921a3fafbc5d83960b4e31e3715d0aa3c in isis's branch 
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=064c42e ]

ISIS-917: first cut at a pluggable representations service for RO.

Fix for NPE when app runs (previous commit lied), tests still failing.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-09 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14165016#comment-14165016
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit 6907534b421daa083cd5b96b9a0a476e64c2e8e9 in isis's branch 
refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=6907534 ]

ISIS-917: further refactorings to simplify the API of the (newly rechristened) 
RepresentationService.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-08 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14163193#comment-14163193
 ] 

ASF subversion and git services commented on ISIS-917:
--

Commit bfece661b326a070f5d25cc814a539dbd11d97a8 in isis's branch 
refs/heads/ISIS-917 from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=bfece66 ]

ISIS-917: first cut at a pluggable representations service for RO.

The app runs fine, but tests are failing.


 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (ISIS-917) Support pluggable representations for the RO viewer (object and list representations)

2014-10-06 Thread Vladimir Nisevic (JIRA)

[ 
https://issues.apache.org/jira/browse/ISIS-917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14160136#comment-14160136
 ] 

Vladimir Nisevic commented on ISIS-917:
---

Hi, Dan, since I would pretty soon need first version of this feature, would be 
possible a solution where: 

1. create sample REST service with standard JAX-RS implementeations e.g. 

1a: jersey archetype 
(https://jersey.java.net/documentation/latest/user-guide.html#new-from-archetype)
 or 
1b. jboss resteasy examples 
(https://github.com/resteasy/Resteasy/tree/3.0.9.Final/jaxrs/examples) 

2. integrate my Isis application into such example so I have access to my Isis 
domain services

I tried with 1a. and copy it from webapp settings, but some startup help as 
hints would be great...

Regs,Vladimir

 Support pluggable representations for the RO viewer (object and list 
 representations)
 -

 Key: ISIS-917
 URL: https://issues.apache.org/jira/browse/ISIS-917
 Project: Isis
  Issue Type: New Feature
  Components: Core: Viewer: RestfulObjects
Affects Versions: core-1.6.0
Reporter: Dan Haywood
Assignee: Dan Haywood
 Fix For: core-1.8.0


 This ticket is to factor out the logic in the RO viewer that builds the JSON 
 representation and put it behind a @DomainService.  
 As a first cut, I think it's only the object representation and list 
 representations that need to be pluggable.  
 Ultimately I would like to get to a point where the representation used 
 honours the Accept header (Content-Type), but will probably iterate to get 
 there.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)