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 java.util.Map; 019 020// CHECKSTYLE:OFF 021 022/** 023 * Permission for shared links. 024 */ 025public class BoxSharedLinkPermissions extends BoxObject { 026 027 private boolean can_download; 028 029 /** 030 * Default constructor. 031 */ 032 public BoxSharedLinkPermissions() { 033 } 034 035 /** 036 * Copy constructor, this does deep copy for all the fields. 037 * 038 * @param obj 039 */ 040 public BoxSharedLinkPermissions(BoxSharedLinkPermissions obj) { 041 super(obj); 042 } 043 044 /** 045 * Instantiate the object from a map. Each entry in the map reflects to a field. 046 * 047 * @param map 048 */ 049 public BoxSharedLinkPermissions(Map<String, Object> map) { 050 super(map); 051 } 052 053 /** 054 * Constructor. 055 * 056 * @param canDownload can be downloaded 057 */ 058 public BoxSharedLinkPermissions(final boolean canDownload) { 059 this.setCan_download(canDownload); 060 } 061 062 /** 063 * whether can_download is true. 064 * 065 * @return can_download 066 */ 067 public boolean isCan_download() { 068 return can_download; 069 } 070 071 /** 072 * Setter. 073 * 074 * @param canDownload 075 */ 076 private void setCan_download(final boolean canDownload) { 077 this.can_download = canDownload; 078 } 079}