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.restfulobjects.applib;
020
021 import javax.ws.rs.core.MediaType;
022
023 /**
024 * Values per the profile parameter
025 *
026 * @see http://buzzword.org.uk/2009/draft-inkster-profile-parameter-00.html
027 */
028 public final class RestfulMediaType {
029
030 private RestfulMediaType() {
031 }
032
033 private static final String BASE = MediaType.APPLICATION_JSON + ";profile=urn:org.restfulobjects/";
034
035 public final static String APPLICATION_JSON_HOME_PAGE = BASE + "homepage";
036 public final static String APPLICATION_JSON_USER = BASE + "user";
037 public final static String APPLICATION_JSON_VERSION = BASE + "version";
038 public final static String APPLICATION_JSON_LIST = BASE + "list";
039 public final static String APPLICATION_JSON_SCALAR_VALUE = BASE + "scalarvalue";
040 public final static String APPLICATION_JSON_DOMAIN_OBJECT = BASE + "domainobject";
041 public final static String APPLICATION_JSON_TRANSIENT_DOMAIN_OBJECT = BASE + "transient";
042 public final static String APPLICATION_JSON_OBJECT_PROPERTY = BASE + "objectproperty";
043 public final static String APPLICATION_JSON_OBJECT_COLLECTION = BASE + "objectcollection";
044 public final static String APPLICATION_JSON_OBJECT_ACTION = BASE + "objectaction";
045 public final static String APPLICATION_JSON_ACTION_RESULT = BASE + "actionresult";
046 public final static String APPLICATION_JSON_TYPE_LIST = BASE + "typelist";
047 public final static String APPLICATION_JSON_DOMAIN_TYPE = BASE + "domaintype";
048 public final static String APPLICATION_JSON_TYPE_ACTION_RESULT = BASE + "typeactionresult";
049 public final static String APPLICATION_JSON_PROPERTY_DESCRIPTION = BASE + "propertydescription";
050 public final static String APPLICATION_JSON_COLLECTION_DESCRIPTION = BASE + "collectiondescription";
051 public final static String APPLICATION_JSON_ACTION_DESCRIPTION = BASE + "actiondescription";
052 public final static String APPLICATION_JSON_ACTION_PARAMETER_DESCRIPTION = BASE + "actionparameterdescription";
053 public final static String APPLICATION_JSON_ERROR = BASE + "error";
054
055 }