1 /* 2 * ModeShape (http://www.modeshape.org) 3 * See the COPYRIGHT.txt file distributed with this work for information 4 * regarding copyright ownership. Some portions may be licensed 5 * to Red Hat, Inc. under one or more contributor license agreements. 6 * See the AUTHORS.txt file in the distribution for a full listing of 7 * individual contributors. 8 * 9 * ModeShape is free software. Unless otherwise indicated, all code in ModeShape 10 * is licensed to you under the terms of the GNU Lesser General Public License as 11 * published by the Free Software Foundation; either version 2.1 of 12 * the License, or (at your option) any later version. 13 * 14 * ModeShape is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this software; if not, write to the Free 21 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 22 * 02110-1301 USA, or see the FSF site: http://www.fsf.org. 23 */ 24 package org.modeshape.web.jcr.rest.client.json; 25 26 /** 27 * The <code>IJsonConstants</code> interface provides JSON-specific constants used when JSON as a transport mechanism between the 28 * REST client and the REST server. 29 */ 30 public interface IJsonConstants { 31 32 /** 33 * The HTTP method to use when creating a connection with the REST server. 34 */ 35 enum RequestMethod { 36 /** 37 * The HTTP DELETE request method. 38 */ 39 DELETE, 40 41 /** 42 * The HTTP GET request method. 43 */ 44 GET, 45 46 /** 47 * The HTTP POST request method. 48 */ 49 POST, 50 51 /** 52 * The HTTP PUT request method. 53 */ 54 PUT 55 } 56 57 /** 58 * The key in the <code>JSONObject</code> whose value is the collection of node children. 59 */ 60 String CHILDREN_KEY = "children"; 61 62 /** 63 * The key in the <code>JSONObject</code> whose value is the collection of node properties. 64 */ 65 String PROPERTIES_KEY = "properties"; 66 67 /** 68 * The workspace context added to the URLs. 69 */ 70 String WORKSPACE_CONTEXT = "/items"; 71 72 /** 73 * The segment added to the URLs for queries. 74 */ 75 String QUERY_CONTEXT = "/query"; 76 77 /** 78 * The suffix appended to properties whose values are base64-encoded 79 */ 80 String BASE64_SUFFIX = "/base64/"; 81 82 }