001/* 002 * (C) Copyright 2018 Nuxeo (http://nuxeo.com/) and others. 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 * 016 * Contributors: 017 * Florent Guillaume 018 */ 019package org.nuxeo.drive.adapter.impl; 020 021import org.nuxeo.drive.adapter.FileSystemItem; 022import org.nuxeo.drive.adapter.FolderItem; 023 024/** 025 * Simple FileSystemItem just holding data, used for JSON deserialization. 026 * 027 * @since 9.10-HF01, 10.1 028 */ 029public class SimpleFileSystemItem extends AbstractFileSystemItem { 030 031 private static final long serialVersionUID = 1L; 032 033 protected String downloadURL; 034 035 protected String digestAlgorithm; 036 037 protected String digest; 038 039 protected boolean canUpdate; 040 041 protected boolean canCreateChild; 042 043 protected boolean canScrollDescendants; 044 045 public SimpleFileSystemItem() { 046 } 047 048 public String getDownloadURL() { 049 return downloadURL; 050 } 051 052 public String getDigestAlgorithm() { 053 return digestAlgorithm; 054 } 055 056 public String getDigest() { 057 return digest; 058 } 059 060 public boolean getCanUpdate() { 061 return canUpdate; 062 } 063 064 public boolean getCanCreateChild() { 065 return canCreateChild; 066 } 067 068 public boolean getCanScrollDescendants() { 069 return canScrollDescendants; 070 } 071 072 public void setDownloadURL(String downloadURL) { 073 this.downloadURL = downloadURL; 074 } 075 076 public void setDigestAlgorithm(String digestAlgorithm) { 077 this.digestAlgorithm = digestAlgorithm; 078 } 079 080 public void setDigest(String digest) { 081 this.digest = digest; 082 } 083 084 public void setCanUpdate(boolean canUpdate) { 085 this.canUpdate = canUpdate; 086 } 087 088 public void setCanCreateChild(boolean canCreateChild) { 089 this.canCreateChild = canCreateChild; 090 } 091 092 public void setCanScrollDescendants(boolean canScrollDescendants) { 093 this.canScrollDescendants = canScrollDescendants; 094 } 095 096 @Override 097 public void rename(String name) { 098 throw new UnsupportedOperationException(); 099 } 100 101 @Override 102 public void delete() { 103 throw new UnsupportedOperationException(); 104 } 105 106 @Override 107 public boolean canMove(FolderItem dest) { 108 throw new UnsupportedOperationException(); 109 } 110 111 @Override 112 public FileSystemItem move(FolderItem dest) { 113 throw new UnsupportedOperationException(); 114 } 115 116}