You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/02/08 14:16:19 UTC

[16/24] ISIS-323: lots more refactoring of RO

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/DomainServiceResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/DomainServiceResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/DomainServiceResource.java
new file mode 100644
index 0000000..853d431
--- /dev/null
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/DomainServiceResource.java
@@ -0,0 +1,97 @@
+/*
+ *  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 org.apache.isis.viewer.restfulobjects.applib.domainobjects;
+
+import java.io.InputStream;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.jboss.resteasy.annotations.ClientResponseType;
+
+@Path("/services")
+public interface DomainServiceResource {
+
+    @GET
+    @Path("/")
+    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_LIST, RestfulMediaType.APPLICATION_JSON_ERROR })
+    @ClientResponseType(entityType = String.class)
+    public Response services();
+
+    // //////////////////////////////////////////////////////////
+    // domain service
+    // //////////////////////////////////////////////////////////
+
+    @GET
+    @Path("/{serviceId}")
+    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_DOMAIN_OBJECT, RestfulMediaType.APPLICATION_JSON_ERROR })
+    @ClientResponseType(entityType = String.class)
+    public Response service(@PathParam("serviceId") final String serviceId);
+
+    // //////////////////////////////////////////////////////////
+    // domain service property
+    // //////////////////////////////////////////////////////////
+
+    @GET
+    @Path("/{serviceId}/properties/{propertyId}")
+    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_PROPERTY, RestfulMediaType.APPLICATION_JSON_ERROR })
+    public Response propertyDetails(@PathParam("serviceId") final String serviceId, @PathParam("propertyId") final String propertyId);
+
+    // //////////////////////////////////////////////////////////
+    // domain service action
+    // //////////////////////////////////////////////////////////
+
+    @GET
+    @Path("/{serviceId}/actions/{actionId}")
+    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_ACTION, RestfulMediaType.APPLICATION_JSON_ERROR })
+    @ClientResponseType(entityType = String.class)
+    public Response actionPrompt(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId);
+
+    // //////////////////////////////////////////////////////////
+    // domain service action invoke
+    // //////////////////////////////////////////////////////////
+
+    @GET
+    @Path("/{serviceId}/actions/{actionId}/invoke")
+    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
+    @ClientResponseType(entityType = String.class)
+    public Response invokeActionQueryOnly(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId);
+
+    @PUT
+    @Path("/{serviceId}/actions/{actionId}/invoke")
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
+    @ClientResponseType(entityType = String.class)
+    public Response invokeActionIdempotent(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId, final InputStream arguments);
+
+    @POST
+    @Path("/{serviceId}/actions/{actionId}/invoke")
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
+    @ClientResponseType(entityType = String.class)
+    public Response invokeAction(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId, final InputStream arguments);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ListRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ListRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ListRepresentation.java
new file mode 100644
index 0000000..51d4ef1
--- /dev/null
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ListRepresentation.java
@@ -0,0 +1,34 @@
+/*
+ *  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 org.apache.isis.viewer.restfulobjects.applib.domainobjects;
+
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.codehaus.jackson.JsonNode;
+
+public class ListRepresentation extends DomainRepresentation {
+
+    public ListRepresentation(final JsonNode jsonNode) {
+        super(jsonNode);
+    }
+
+    public JsonRepresentation getValues() {
+        return getArray("value").ensureArray();
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectActionRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectActionRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectActionRepresentation.java
new file mode 100644
index 0000000..a76f0b5
--- /dev/null
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectActionRepresentation.java
@@ -0,0 +1,34 @@
+/*
+ *  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 org.apache.isis.viewer.restfulobjects.applib.domainobjects;
+
+import org.apache.isis.viewer.restfulobjects.applib.links.LinkRepresentation;
+import org.codehaus.jackson.JsonNode;
+
+public class ObjectActionRepresentation extends AbstractObjectMemberRepresentation {
+
+    public ObjectActionRepresentation(final JsonNode jsonNode) {
+        super(jsonNode);
+    }
+
+    public LinkRepresentation getInvoke() {
+        return getLinkWithRel("invoke");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectCollectionRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectCollectionRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectCollectionRepresentation.java
new file mode 100644
index 0000000..819c4b6
--- /dev/null
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectCollectionRepresentation.java
@@ -0,0 +1,29 @@
+/*
+ *  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 org.apache.isis.viewer.restfulobjects.applib.domainobjects;
+
+import org.codehaus.jackson.JsonNode;
+
+public class ObjectCollectionRepresentation extends AbstractObjectMemberRepresentation {
+
+    public ObjectCollectionRepresentation(final JsonNode jsonNode) {
+        super(jsonNode);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectPropertyRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectPropertyRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectPropertyRepresentation.java
new file mode 100644
index 0000000..3662302
--- /dev/null
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ObjectPropertyRepresentation.java
@@ -0,0 +1,29 @@
+/*
+ *  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 org.apache.isis.viewer.restfulobjects.applib.domainobjects;
+
+import org.codehaus.jackson.JsonNode;
+
+public class ObjectPropertyRepresentation extends AbstractObjectMemberRepresentation {
+
+    public ObjectPropertyRepresentation(final JsonNode jsonNode) {
+        super(jsonNode);
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ScalarValueRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ScalarValueRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ScalarValueRepresentation.java
new file mode 100644
index 0000000..5b88ff1
--- /dev/null
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/ScalarValueRepresentation.java
@@ -0,0 +1,34 @@
+/*
+ *  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 org.apache.isis.viewer.restfulobjects.applib.domainobjects;
+
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.codehaus.jackson.JsonNode;
+
+public class ScalarValueRepresentation extends DomainRepresentation {
+
+    public ScalarValueRepresentation(final JsonNode jsonNode) {
+        super(jsonNode);
+    }
+
+    public JsonRepresentation getValue() {
+        return getRepresentation("value");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/TransientDomainObjectRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/TransientDomainObjectRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/TransientDomainObjectRepresentation.java
new file mode 100644
index 0000000..4c60ba0
--- /dev/null
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domainobjects/TransientDomainObjectRepresentation.java
@@ -0,0 +1,34 @@
+/*
+ *  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 org.apache.isis.viewer.restfulobjects.applib.domainobjects;
+
+import org.apache.isis.viewer.restfulobjects.applib.links.LinkRepresentation;
+import org.codehaus.jackson.JsonNode;
+
+public class TransientDomainObjectRepresentation extends AbstractDomainObjectRepresentation {
+
+    public TransientDomainObjectRepresentation(final JsonNode jsonNode) {
+        super(jsonNode);
+    }
+
+    public LinkRepresentation getPersistLink() {
+        return getLink("links[rel=persist]");
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/AbstractTypeMemberRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/AbstractTypeMemberRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/AbstractTypeMemberRepresentation.java
index 98ab95f..6a9312b 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/AbstractTypeMemberRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/AbstractTypeMemberRepresentation.java
@@ -18,10 +18,9 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.domaintypes;
 
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
 import org.codehaus.jackson.JsonNode;
 
-import org.apache.isis.viewer.restfulobjects.domainobjects.DomainRepresentation;
-
 public abstract class AbstractTypeMemberRepresentation extends DomainRepresentation {
 
     public AbstractTypeMemberRepresentation(final JsonNode jsonNode) {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeRepresentation.java
index 0730f0e..8c40e17 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeRepresentation.java
@@ -18,10 +18,9 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.domaintypes;
 
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
 import org.codehaus.jackson.JsonNode;
 
-import org.apache.isis.viewer.restfulobjects.domainobjects.DomainRepresentation;
-
 public class DomainTypeRepresentation extends DomainRepresentation {
 
     public DomainTypeRepresentation(final JsonNode jsonNode) {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeResource.java
index 3b35d61..fd1956d 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeResource.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/DomainTypeResource.java
@@ -26,9 +26,8 @@ import javax.ws.rs.QueryParam;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
-import org.jboss.resteasy.annotations.ClientResponseType;
-
 import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.jboss.resteasy.annotations.ClientResponseType;
 
 @Path("/domainTypes")
 public interface DomainTypeResource {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeActionResultRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeActionResultRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeActionResultRepresentation.java
index cd879b4..896d2dd 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeActionResultRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeActionResultRepresentation.java
@@ -18,10 +18,9 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.domaintypes;
 
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
 import org.codehaus.jackson.JsonNode;
 
-import org.apache.isis.viewer.restfulobjects.domainobjects.DomainRepresentation;
-
 public class TypeActionResultRepresentation extends DomainRepresentation {
 
     public TypeActionResultRepresentation(final JsonNode jsonNode) {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeListRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeListRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeListRepresentation.java
index 1e28232..c9572b1 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeListRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/domaintypes/TypeListRepresentation.java
@@ -18,10 +18,9 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.domaintypes;
 
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
 import org.codehaus.jackson.JsonNode;
 
-import org.apache.isis.viewer.restfulobjects.domainobjects.DomainRepresentation;
-
 public class TypeListRepresentation extends DomainRepresentation {
 
     public TypeListRepresentation(final JsonNode jsonNode) {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/errors/ErrorRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/errors/ErrorRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/errors/ErrorRepresentation.java
index 66f7f74..7b5448c 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/errors/ErrorRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/errors/ErrorRepresentation.java
@@ -18,9 +18,8 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.errors;
 
-import org.codehaus.jackson.JsonNode;
-
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.codehaus.jackson.JsonNode;
 
 public class ErrorRepresentation extends JsonRepresentation {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageRepresentation.java
index 55cc77a..77e5110 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageRepresentation.java
@@ -18,10 +18,9 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.homepage;
 
-import org.codehaus.jackson.JsonNode;
-
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
 import org.apache.isis.viewer.restfulobjects.applib.links.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.domainobjects.DomainRepresentation;
+import org.codehaus.jackson.JsonNode;
 
 public class HomePageRepresentation extends DomainRepresentation {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageResource.java
index e69af19..b5ba7ae 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageResource.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/homepage/HomePageResource.java
@@ -24,9 +24,8 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
-import org.jboss.resteasy.annotations.ClientResponseType;
-
 import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.jboss.resteasy.annotations.ClientResponseType;
 
 @Path("/")
 public interface HomePageResource {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/LinkRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/LinkRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/LinkRepresentation.java
index a7c62bf..ae75279 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/LinkRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/LinkRepresentation.java
@@ -20,22 +20,21 @@ package org.apache.isis.viewer.restfulobjects.applib.links;
 
 import javax.ws.rs.core.MediaType;
 
-import org.codehaus.jackson.JsonNode;
-import org.codehaus.jackson.node.JsonNodeFactory;
-import org.codehaus.jackson.node.ObjectNode;
-import org.jboss.resteasy.client.ClientExecutor;
-
 import org.apache.isis.viewer.restfulobjects.applib.ClientRequestConfigurer;
-import org.apache.isis.viewer.restfulobjects.applib.HttpMethod;
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
 import org.apache.isis.viewer.restfulobjects.applib.RestfulRequest;
 import org.apache.isis.viewer.restfulobjects.applib.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.RoHttpMethod;
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.node.JsonNodeFactory;
+import org.codehaus.jackson.node.ObjectNode;
+import org.jboss.resteasy.client.ClientExecutor;
 
 public final class LinkRepresentation extends JsonRepresentation {
 
     public LinkRepresentation() {
         this(new ObjectNode(JsonNodeFactory.instance));
-        withMethod(HttpMethod.GET);
+        withMethod(RoHttpMethod.GET);
     }
 
     public LinkRepresentation(final JsonNode jsonNode) {
@@ -73,9 +72,9 @@ public final class LinkRepresentation extends JsonRepresentation {
         return this;
     }
 
-    public HttpMethod getHttpMethod() {
+    public RoHttpMethod getHttpMethod() {
         final String methodStr = asObjectNode().path("method").getTextValue();
-        return HttpMethod.valueOf(methodStr);
+        return RoHttpMethod.valueOf(methodStr);
     }
 
     public MediaType getType() {
@@ -86,7 +85,7 @@ public final class LinkRepresentation extends JsonRepresentation {
         return MediaType.valueOf(typeStr);
     }
 
-    public LinkRepresentation withMethod(final HttpMethod httpMethod) {
+    public LinkRepresentation withMethod(final RoHttpMethod httpMethod) {
         asObjectNode().put("method", httpMethod.name());
         return this;
     }

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/Rel.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/Rel.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/Rel.java
index d44632d..9d70f03 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/Rel.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/links/Rel.java
@@ -19,15 +19,43 @@
 package org.apache.isis.viewer.restfulobjects.applib.links;
 
 public enum Rel {
+    
     // IANA registered
-    SELF("self"), DESCRIBEDBY("describedby"), UP("up"), HELP("help"), ICON("icon"),
+    SELF("self"), 
+    DESCRIBEDBY("describedby"), 
+    UP("up"), 
+    HELP("help"), 
+    ICON("icon"),
 
     // Restful Objects namespace
-    ICON16("icon16"), ICON32("icon32"), OBJECT("object"), SERVICE("service"), CHOICE("choice"), DEFAULT("default"), DETAILS("details"), MODIFY("modify"), CLEAR("clear"), ADD_TO("addto"), REMOVE_FROM("removefrom"), INVOKE("invoke"), PERSIST("persist"), PROPERTY("property"), COLLECTION("collection"), ACTION(
-            "action"), TYPE_ACTION("typeaction"), ACTION_PARAM("actionparam"), RETURN_TYPE("returntype"), ELEMENT_TYPE("elementtype"), VERSION("version"), USER("user"), SERVICES("services"), TYPES("types"), DOMAIN_TYPE("domaintype"),
+    ICON16(Spec.REL_PREFIX + "icon16"), 
+    ICON32(Spec.REL_PREFIX + "icon32"), 
+    OBJECT(Spec.REL_PREFIX + "object"), 
+    SERVICE(Spec.REL_PREFIX + "service"), 
+    CHOICE(Spec.REL_PREFIX + "choice"), 
+    DEFAULT(Spec.REL_PREFIX + "default"), 
+    DETAILS(Spec.REL_PREFIX + "details"), 
+    MODIFY(Spec.REL_PREFIX + "modify"), 
+    CLEAR(Spec.REL_PREFIX + "clear"), 
+    ADD_TO(Spec.REL_PREFIX + "addto"), 
+    REMOVE_FROM(Spec.REL_PREFIX + "removefrom"), 
+    INVOKE(Spec.REL_PREFIX + "invoke"), 
+    PERSIST(Spec.REL_PREFIX + "persist"), 
+    PROPERTY(Spec.REL_PREFIX + "property"), 
+    COLLECTION(Spec.REL_PREFIX + "collection"), 
+    ACTION(Spec.REL_PREFIX + "action"), 
+    TYPE_ACTION(Spec.REL_PREFIX + "typeaction"), 
+    ACTION_PARAM(Spec.REL_PREFIX + "actionparam"), 
+    RETURN_TYPE(Spec.REL_PREFIX + "returntype"), 
+    ELEMENT_TYPE(Spec.REL_PREFIX + "elementtype"), 
+    VERSION(Spec.REL_PREFIX + "version"), 
+    USER(Spec.REL_PREFIX + "user"), 
+    SERVICES(Spec.REL_PREFIX + "services"), 
+    TYPES(Spec.REL_PREFIX + "types"), 
+    DOMAIN_TYPE(Spec.REL_PREFIX + "domaintype"),
 
     // implementation specific
-    CONTRIBUTED_BY("contributedby");
+    CONTRIBUTED_BY(Impl.REL_PREFIX + "contributedby");
 
     private final String name;
 
@@ -38,4 +66,13 @@ public enum Rel {
     public String getName() {
         return name;
     }
-}
\ No newline at end of file
+
+    private static class Spec {
+        final static String REL_PREFIX = "urn:org.restfulobjects:rels/";
+    }
+
+    private static class Impl {
+        final static String REL_PREFIX = "urn:org.apache.isis.restfulobjects:rels/";
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserRepresentation.java
index 9e8cb30..67d3faa 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserRepresentation.java
@@ -18,10 +18,9 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.user;
 
-import org.codehaus.jackson.JsonNode;
-
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.domainobjects.DomainRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
+import org.codehaus.jackson.JsonNode;
 
 public class UserRepresentation extends DomainRepresentation {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserResource.java
index 7b2f17a..6fd5601 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserResource.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/user/UserResource.java
@@ -24,9 +24,8 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
-import org.jboss.resteasy.annotations.ClientResponseType;
-
 import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.jboss.resteasy.annotations.ClientResponseType;
 
 @Path("/user")
 public interface UserResource {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonMapper.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonMapper.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonMapper.java
index d75b019..ee03862 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonMapper.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonMapper.java
@@ -27,6 +27,7 @@ import java.util.Map;
 
 import javax.ws.rs.core.Response;
 
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
 import org.codehaus.jackson.JsonGenerationException;
 import org.codehaus.jackson.JsonGenerator;
 import org.codehaus.jackson.JsonNode;
@@ -51,8 +52,6 @@ import org.codehaus.jackson.map.module.SimpleModule;
 import org.codehaus.jackson.type.JavaType;
 import org.jboss.resteasy.client.ClientResponse;
 
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
 public final class JsonMapper {
 
     /**

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonNodeUtils.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonNodeUtils.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonNodeUtils.java
index 6610ee3..446bc3d 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonNodeUtils.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/JsonNodeUtils.java
@@ -22,12 +22,12 @@ import java.io.ByteArrayInputStream;
 import java.io.InputStream;
 import java.util.List;
 
-import com.google.common.base.Charsets;
-
 import org.codehaus.jackson.JsonNode;
 import org.codehaus.jackson.node.JsonNodeFactory;
 import org.codehaus.jackson.node.ObjectNode;
 
+import com.google.common.base.Charsets;
+
 public class JsonNodeUtils {
 
     private JsonNodeUtils() {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/Parser.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/Parser.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/Parser.java
index 93ca6c7..08f8b80 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/Parser.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/Parser.java
@@ -28,14 +28,14 @@ import java.util.List;
 import javax.ws.rs.core.CacheControl;
 import javax.ws.rs.core.MediaType;
 
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+
 import com.google.common.base.Function;
 import com.google.common.base.Joiner;
 import com.google.common.base.Splitter;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
 public abstract class Parser<T> {
     public T valueOf(final List<String> str) {
         if (str == null) {
@@ -131,7 +131,7 @@ public abstract class Parser<T> {
         };
     }
 
-    public static Parser<MediaType> forMediaType() {
+    public static Parser<MediaType> forJaxRsMediaType() {
         return new Parser<MediaType>() {
             @Override
             public MediaType valueOf(final String str) {
@@ -149,6 +149,24 @@ public abstract class Parser<T> {
         };
     }
 
+    public static Parser<com.google.common.net.MediaType> forGuavaMediaType() {
+        return new Parser<com.google.common.net.MediaType>() {
+            @Override
+            public com.google.common.net.MediaType valueOf(final String str) {
+                if (str == null) {
+                    return null;
+                }
+                return com.google.common.net.MediaType.parse(str);
+            }
+
+            @Override
+            public String asString(final com.google.common.net.MediaType t) {
+                return t.toString();
+            }
+
+        };
+    }
+
     public static Parser<Boolean> forBoolean() {
         return new Parser<Boolean>() {
             @Override
@@ -328,7 +346,7 @@ public abstract class Parser<T> {
         };
     }
 
-    public static Parser<List<MediaType>> forListOfMediaTypes() {
+    public static Parser<List<MediaType>> forListOfJaxRsMediaTypes() {
         return new Parser<List<MediaType>>() {
 
             @Override
@@ -359,4 +377,35 @@ public abstract class Parser<T> {
         };
     }
 
+    public static Parser<List<com.google.common.net.MediaType>> forListOfGuavaMediaTypes() {
+        return new Parser<List<com.google.common.net.MediaType>>() {
+
+            @Override
+            public List<com.google.common.net.MediaType> valueOf(final String str) {
+                if (str == null) {
+                    return Collections.emptyList();
+                }
+                final List<String> strings = Lists.newArrayList(Splitter.on(",").split(str));
+                return Lists.transform(strings, new Function<String, com.google.common.net.MediaType>() {
+
+                    @Override
+                    public com.google.common.net.MediaType apply(final String input) {
+                        return com.google.common.net.MediaType.parse(input);
+                    }
+                });
+            }
+
+            @Override
+            public String asString(final List<com.google.common.net.MediaType> listOfMediaTypes) {
+                final List<String> strings = Lists.transform(listOfMediaTypes, new Function<com.google.common.net.MediaType, String>() {
+                    @Override
+                    public String apply(final com.google.common.net.MediaType input) {
+                        return input.toString();
+                    }
+                });
+                return Joiner.on(",").join(strings);
+            }
+        };
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/PathNode.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/PathNode.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/PathNode.java
index 225c583..a37da71 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/PathNode.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/PathNode.java
@@ -23,12 +23,12 @@ import java.util.Map;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+
 import com.google.common.base.Objects;
 import com.google.common.base.Splitter;
 import com.google.common.collect.Maps;
 
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
 public class PathNode {
     private static final Pattern NODE = Pattern.compile("^([^\\[]*)(\\[(.+)\\])?$");
     private static final Pattern WHITESPACE = Pattern.compile("\\s+");

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/UrlEncodingUtils.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/UrlEncodingUtils.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/UrlEncodingUtils.java
index d97a758..c21fb2a 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/UrlEncodingUtils.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/util/UrlEncodingUtils.java
@@ -24,12 +24,12 @@ import java.net.URLEncoder;
 import java.util.Arrays;
 import java.util.List;
 
+import org.codehaus.jackson.JsonNode;
+
 import com.google.common.base.Charsets;
 import com.google.common.base.Function;
 import com.google.common.collect.Lists;
 
-import org.codehaus.jackson.JsonNode;
-
 public final class UrlEncodingUtils {
 
     public final static Function<String, String> FUNCTION = new Function<String, String>() {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionRepresentation.java
index b4d9725..350abf3 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionRepresentation.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionRepresentation.java
@@ -18,10 +18,9 @@
  */
 package org.apache.isis.viewer.restfulobjects.applib.version;
 
-import org.codehaus.jackson.JsonNode;
-
 import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.domainobjects.DomainRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
+import org.codehaus.jackson.JsonNode;
 
 public class VersionRepresentation extends DomainRepresentation {
 

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionResource.java
index 5983d30..e643b3c 100644
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionResource.java
+++ b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionResource.java
@@ -24,9 +24,8 @@ import javax.ws.rs.Produces;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
-import org.jboss.resteasy.annotations.ClientResponseType;
-
 import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.jboss.resteasy.annotations.ClientResponseType;
 
 @Path("/version")
 public interface VersionResource {

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/boot/BootstrapResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/boot/BootstrapResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/boot/BootstrapResource.java
deleted file mode 100644
index 14dad66..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/boot/BootstrapResource.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.boot;
-
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-
-@Path("/boot")
-public interface BootstrapResource {
-
-    @GET
-    @Produces({ MediaType.TEXT_HTML })
-    public String bootstrap();
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractDomainObjectRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractDomainObjectRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractDomainObjectRepresentation.java
deleted file mode 100644
index 6dce50f..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractDomainObjectRepresentation.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
-public abstract class AbstractDomainObjectRepresentation extends DomainRepresentation {
-
-    public AbstractDomainObjectRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    public String getTitle() {
-        return getString("title");
-    }
-
-    public JsonRepresentation getMembers() {
-        return getRepresentation("members").ensureArray();
-    }
-
-    public JsonRepresentation getProperty(final String id) {
-        return getRepresentation("members[memberType=property id=%s]", id);
-    }
-
-    public JsonRepresentation getProperties() {
-        return getRepresentation("members[memberType=property]").ensureArray();
-    }
-
-    public JsonRepresentation getCollection(final String id) {
-        return getRepresentation("members[memberType=collection id=%s]", id);
-    }
-
-    public JsonRepresentation getCollections() {
-        return getRepresentation("members[memberType=collection]").ensureArray();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractObjectMemberRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractObjectMemberRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractObjectMemberRepresentation.java
deleted file mode 100644
index 50dbb65..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/AbstractObjectMemberRepresentation.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.links.LinkRepresentation;
-
-public abstract class AbstractObjectMemberRepresentation extends DomainRepresentation {
-
-    public AbstractObjectMemberRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    public String getId() {
-        return getString("id");
-    }
-
-    public String getMemberType() {
-        return getString("memberType");
-    }
-
-    public String getDisabledReason() {
-        return getString("disabledReason");
-    }
-
-    public LinkRepresentation getDetails() {
-        return getLinkWithRel("details");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ActionResultRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ActionResultRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ActionResultRepresentation.java
deleted file mode 100644
index fdc9e1f..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ActionResultRepresentation.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
-public class ActionResultRepresentation extends AbstractObjectMemberRepresentation {
-
-    public enum ResultType {
-        DOMAIN_OBJECT("domainobject"), LIST("list"), SCALAR_VALUE("scalarvalue"), VOID("void");
-
-        private final String value;
-
-        private ResultType(final String value) {
-            this.value = value;
-        }
-
-        public String getValue() {
-            return value;
-        }
-
-        public static ResultType lookup(final String value) {
-            for (final ResultType resultType : values()) {
-                if (resultType.value.equals(value)) {
-                    return resultType;
-                }
-            }
-            throw new IllegalArgumentException("Value '" + value + "' is not a valid result type");
-        }
-
-        public boolean isVoid() {
-            return this == VOID;
-        }
-    }
-
-    public ActionResultRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    public JsonRepresentation getResult() {
-        return getRepresentation("result");
-    }
-
-    public ResultType getResultType() {
-        final String resultType = getString("resulttype");
-        return ResultType.lookup(resultType);
-    }
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectRepresentation.java
deleted file mode 100644
index 8f5ff6a..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectRepresentation.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
-public class DomainObjectRepresentation extends AbstractDomainObjectRepresentation {
-
-    public DomainObjectRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    public String getOid() {
-        return getString("oid");
-    }
-
-    public JsonRepresentation getActions() {
-        return getRepresentation("members[memberType=action]");
-    }
-
-    public JsonRepresentation getAction(final String id) {
-        return getRepresentation("members[memberType=action id=%s]", id);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectResource.java
deleted file mode 100644
index edb79a4..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainObjectResource.java
+++ /dev/null
@@ -1,151 +0,0 @@
-/*s
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import java.io.InputStream;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.DELETE;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.jboss.resteasy.annotations.ClientResponseType;
-
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-
-@Path("/objects")
-public interface DomainObjectResource {
-
-    @POST
-    @Path("/")
-    @Consumes({ MediaType.WILDCARD })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_DOMAIN_OBJECT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response persist(final InputStream object);
-
-    // //////////////////////////////////////////////////////////
-    // domain object
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{oid}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_DOMAIN_OBJECT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response object(@PathParam("oid") final String oidStr);
-
-    @PUT
-    @Path("/{oid}")
-    @Consumes({ MediaType.WILDCARD })
-    @Produces({ RestfulMediaType.APPLICATION_JSON_DOMAIN_OBJECT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response object(@PathParam("oid") final String oidStr, final InputStream arguments);
-
-    // //////////////////////////////////////////////////////////
-    // domain object property
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{oid}/properties/{propertyId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_PROPERTY, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response propertyDetails(@PathParam("oid") final String oidStr, @PathParam("propertyId") final String propertyId);
-
-    @PUT
-    @Path("/{oid}/properties/{propertyId}")
-    @Consumes({ MediaType.WILDCARD })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response modifyProperty(@PathParam("oid") final String oidStr, @PathParam("propertyId") final String propertyId, final InputStream arguments);
-
-    @DELETE
-    @Path("/{oid}/properties/{propertyId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response clearProperty(@PathParam("oid") final String oidStr, @PathParam("propertyId") final String propertyId);
-
-    // //////////////////////////////////////////////////////////
-    // domain object collection
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{oid}/collections/{collectionId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_COLLECTION, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response accessCollection(@PathParam("oid") final String oidStr, @PathParam("collectionId") final String collectionId);
-
-    @PUT
-    @Path("/{oid}/collections/{collectionId}")
-    @Consumes({ MediaType.WILDCARD })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ERROR })
-    public Response addToSet(@PathParam("oid") final String oidStr, @PathParam("collectionId") final String collectionId, final InputStream arguments);
-
-    @POST
-    @Path("/{oid}/collections/{collectionId}")
-    @Consumes({ MediaType.WILDCARD })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response addToList(@PathParam("oid") final String oidStr, @PathParam("collectionId") final String collectionId, final InputStream arguments);
-
-    @DELETE
-    @Path("/{oid}/collections/{collectionId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response removeFromCollection(@PathParam("oid") final String oidStr, @PathParam("collectionId") final String collectionId);
-
-    // //////////////////////////////////////////////////////////
-    // domain object action
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{oid}/actions/{actionId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_ACTION, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response actionPrompt(@PathParam("oid") final String oidStr, @PathParam("actionId") final String actionId);
-
-    // //////////////////////////////////////////////////////////
-    // domain object action invoke
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{oid}/actions/{actionId}/invoke")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response invokeActionQueryOnly(@PathParam("oid") final String oidStr, @PathParam("actionId") final String actionId);
-
-    @PUT
-    @Path("/{oid}/actions/{actionId}/invoke")
-    @Consumes({ MediaType.WILDCARD })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_SCALAR_VALUE, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response invokeActionIdempotent(@PathParam("oid") final String oidStr, @PathParam("actionId") final String actionId, final InputStream arguments);
-
-    @POST
-    @Path("/{oid}/actions/{actionId}/invoke")
-    @Consumes({ MediaType.WILDCARD })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response invokeAction(@PathParam("oid") final String oidStr, @PathParam("actionId") final String actionId, final InputStream arguments);
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainRepresentation.java
deleted file mode 100644
index f6ebf42..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainRepresentation.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.HasExtensions;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.HasLinks;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.LinksToSelf;
-import org.apache.isis.viewer.restfulobjects.applib.links.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.links.Rel;
-
-public abstract class DomainRepresentation extends JsonRepresentation implements LinksToSelf, HasLinks, HasExtensions {
-
-    public DomainRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    @Override
-    public LinkRepresentation getSelf() {
-        return getLinkWithRel(Rel.SELF);
-    }
-
-    @Override
-    public JsonRepresentation getLinks() {
-        return getArray("links").ensureArray();
-    }
-
-    public LinkRepresentation getLinkWithRel(final Rel rel) {
-        return getLinkWithRel(rel.getName());
-    }
-
-    public LinkRepresentation getLinkWithRel(final String rel) {
-        return getLink(String.format("links[rel=%s]", rel));
-    }
-
-    @Override
-    public JsonRepresentation getExtensions() {
-        return getMap("extensions");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainServiceResource.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainServiceResource.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainServiceResource.java
deleted file mode 100644
index 9580843..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/DomainServiceResource.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import java.io.InputStream;
-
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.PUT;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.jboss.resteasy.annotations.ClientResponseType;
-
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-
-@Path("/services")
-public interface DomainServiceResource {
-
-    @GET
-    @Path("/")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_LIST, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response services();
-
-    // //////////////////////////////////////////////////////////
-    // domain service
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{serviceId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_DOMAIN_OBJECT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response service(@PathParam("serviceId") final String serviceId);
-
-    // //////////////////////////////////////////////////////////
-    // domain service property
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{serviceId}/properties/{propertyId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_PROPERTY, RestfulMediaType.APPLICATION_JSON_ERROR })
-    public Response propertyDetails(@PathParam("serviceId") final String serviceId, @PathParam("propertyId") final String propertyId);
-
-    // //////////////////////////////////////////////////////////
-    // domain service action
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{serviceId}/actions/{actionId}")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_OBJECT_ACTION, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response actionPrompt(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId);
-
-    // //////////////////////////////////////////////////////////
-    // domain service action invoke
-    // //////////////////////////////////////////////////////////
-
-    @GET
-    @Path("/{serviceId}/actions/{actionId}/invoke")
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response invokeActionQueryOnly(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId);
-
-    @PUT
-    @Path("/{serviceId}/actions/{actionId}/invoke")
-    @Consumes({ MediaType.APPLICATION_JSON })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response invokeActionIdempotent(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId, final InputStream arguments);
-
-    @POST
-    @Path("/{serviceId}/actions/{actionId}/invoke")
-    @Consumes({ MediaType.APPLICATION_JSON })
-    @Produces({ MediaType.APPLICATION_JSON, RestfulMediaType.APPLICATION_JSON_ACTION_RESULT, RestfulMediaType.APPLICATION_JSON_ERROR })
-    @ClientResponseType(entityType = String.class)
-    public Response invokeAction(@PathParam("serviceId") final String serviceId, @PathParam("actionId") final String actionId, final InputStream arguments);
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ListRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ListRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ListRepresentation.java
deleted file mode 100644
index a238a74..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ListRepresentation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
-public class ListRepresentation extends DomainRepresentation {
-
-    public ListRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    public JsonRepresentation getValues() {
-        return getArray("value").ensureArray();
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectActionRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectActionRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectActionRepresentation.java
deleted file mode 100644
index 1f3bcce..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectActionRepresentation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.links.LinkRepresentation;
-
-public class ObjectActionRepresentation extends AbstractObjectMemberRepresentation {
-
-    public ObjectActionRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    public LinkRepresentation getInvoke() {
-        return getLinkWithRel("invoke");
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectCollectionRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectCollectionRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectCollectionRepresentation.java
deleted file mode 100644
index 765cc87..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectCollectionRepresentation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-public class ObjectCollectionRepresentation extends AbstractObjectMemberRepresentation {
-
-    public ObjectCollectionRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectPropertyRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectPropertyRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectPropertyRepresentation.java
deleted file mode 100644
index 37d9bc9..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ObjectPropertyRepresentation.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-public class ObjectPropertyRepresentation extends AbstractObjectMemberRepresentation {
-
-    public ObjectPropertyRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-}

http://git-wip-us.apache.org/repos/asf/isis/blob/75f41b75/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ScalarValueRepresentation.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ScalarValueRepresentation.java b/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ScalarValueRepresentation.java
deleted file mode 100644
index 0450bbf..0000000
--- a/component/viewer/restfulobjects/applib/src/main/java/org/apache/isis/viewer/restfulobjects/domainobjects/ScalarValueRepresentation.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *  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 org.apache.isis.viewer.restfulobjects.domainobjects;
-
-import org.codehaus.jackson.JsonNode;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-
-public class ScalarValueRepresentation extends DomainRepresentation {
-
-    public ScalarValueRepresentation(final JsonNode jsonNode) {
-        super(jsonNode);
-    }
-
-    public JsonRepresentation getValue() {
-        return getRepresentation("value");
-    }
-
-}