001/* 002 * Copyright 2013 Box, Inc. All rights reserved. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.nuxeo.box.api.marshalling.dao; 017 018import com.fasterxml.jackson.annotation.JsonProperty; 019 020import java.util.Map; 021 022public class BoxRealTimeServer extends BoxTypedObject { 023 024 private static final String FIELD_URL = "url"; 025 026 /** 027 * Constructor. 028 */ 029 public BoxRealTimeServer() { 030 setType(BoxResourceType.REALTIME_SERVER.toString()); 031 } 032 033 /** 034 * Copy constructor, this does deep copy for all the fields. 035 * 036 * @param obj 037 */ 038 public BoxRealTimeServer(BoxRealTimeServer obj) { 039 super(obj); 040 } 041 042 /** 043 * Get url. 044 * 045 * @return url. 046 */ 047 @JsonProperty(FIELD_URL) 048 public String getUrl() { 049 return (String) getValue(FIELD_URL); 050 } 051 052 /** 053 * Setter. This is only used by {@see <a href="http://jackson.codehaus .org">Jackson JSON processer</a>} 054 * 055 * @param url Url. 056 */ 057 @JsonProperty(FIELD_URL) 058 private void setUrl(String url) { 059 put(FIELD_URL, url); 060 } 061 062 /** 063 * Instantiate the object from a map. Each entry in the map reflects to a field. 064 * 065 * @param map 066 */ 067 public BoxRealTimeServer(Map<String, Object> map) { 068 super(map); 069 } 070 071}