001 /*
002 * Licensed to the Apache Software Foundation (ASF) under one
003 * or more contributor license agreements. See the NOTICE file
004 * distributed with this work for additional information
005 * regarding copyright ownership. The ASF licenses this file
006 * to you under the Apache License, Version 2.0 (the
007 * "License"); you may not use this file except in compliance
008 * with the License. You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing,
013 * software distributed under the License is distributed on an
014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015 * KIND, either express or implied. See the License for the
016 * specific language governing permissions and limitations
017 * under the License.
018 */
019 package org.apache.isis.viewer.xhtml.applib.resources;
020
021 import javax.ws.rs.GET;
022 import javax.ws.rs.Path;
023 import javax.ws.rs.PathParam;
024 import javax.ws.rs.Produces;
025
026 public interface SpecsResource {
027
028 @GET
029 @Path("/")
030 @Produces({ "application/xhtml+xml", "text/html" })
031 public abstract String specs();
032
033 @GET
034 @Path("/{specFullName}")
035 @Produces({ "application/xhtml+xml", "text/html" })
036 public abstract String spec(@PathParam("specFullName") final String specFullName);
037
038 @GET
039 @Path("/{specFullName}/facet/{facetType}")
040 @Produces({ "application/xhtml+xml", "text/html" })
041 public abstract String specFacet(@PathParam("specFullName") final String specFullName,
042 @PathParam("facetType") final String facetTypeName);
043
044 @GET
045 @Path("/{specFullName}/property/{propertyName}")
046 @Produces({ "application/xhtml+xml", "text/html" })
047 public abstract String specProperty(@PathParam("specFullName") final String specFullName,
048 @PathParam("propertyName") final String propertyName);
049
050 @GET
051 @Path("/{specFullName}/collection/{collectionName}")
052 @Produces({ "application/xhtml+xml", "text/html" })
053 public abstract String specCollection(@PathParam("specFullName") final String specFullName,
054 @PathParam("collectionName") final String collectionName);
055
056 @GET
057 @Path("/{specFullName}/action/{actionId}")
058 @Produces({ "application/xhtml+xml", "text/html" })
059 public abstract String specAction(@PathParam("specFullName") final String specFullName,
060 @PathParam("actionId") final String actionId);
061
062 @GET
063 @Path("/{specFullName}/property/{propertyName}/facet/{facetType}")
064 @Produces({ "application/xhtml+xml", "text/html" })
065 public abstract String specPropertyFacet(@PathParam("specFullName") final String specFullName,
066 @PathParam("propertyName") final String propertyName, @PathParam("facetType") final String facetTypeName);
067
068 @GET
069 @Path("/{specFullName}/collection/{collectionName}/facet/{facetType}")
070 @Produces({ "application/xhtml+xml", "text/html" })
071 public abstract String specCollectionFacet(@PathParam("specFullName") final String specFullName,
072 @PathParam("collectionName") final String collectionName, @PathParam("facetType") final String facetTypeName);
073
074 @GET
075 @Path("/{specFullName}/action/{actionId}/facet/{facetType}")
076 @Produces({ "application/xhtml+xml", "text/html" })
077 public abstract String specActionFacet(@PathParam("specFullName") final String specFullName,
078 @PathParam("actionId") final String actionId, @PathParam("facetType") final String facetTypeName);
079
080 }