001/* 002 * Syncany, www.syncany.org 003 * Copyright (C) 2011-2016 Philipp C. Heckel <philipp.heckel@gmail.com> 004 * 005 * This program is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU General Public License as published by 007 * the Free Software Foundation, either version 3 of the License, or 008 * (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU General Public License for more details. 014 * 015 * You should have received a copy of the GNU General Public License 016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 017 */ 018package org.syncany.operations.ls; 019 020import java.util.Date; 021import java.util.HashSet; 022import java.util.Set; 023 024import org.simpleframework.xml.Element; 025import org.simpleframework.xml.ElementList; 026import org.syncany.database.FileVersion.FileType; 027import org.syncany.operations.OperationOptions; 028 029import com.google.common.collect.Sets; 030 031public class LsOperationOptions implements OperationOptions { 032 @Element(required = false) 033 private Date date; 034 035 @Element(required = false) 036 private String pathExpression; 037 038 @Element(required = false) 039 private boolean fileHistoryId; 040 041 @Element(required = false) 042 private boolean recursive; 043 044 @ElementList(required = false, entry = "fileType") 045 private HashSet<FileType> fileTypes; 046 047 @Element(required = false) 048 private boolean fetchHistories; 049 050 @Element(required = false) 051 private boolean deleted; 052 053 public LsOperationOptions() { 054 this.date = null; 055 this.pathExpression = null; 056 this.fileHistoryId = false; 057 this.recursive = false; 058 this.fileTypes = Sets.newHashSet(FileType.FILE, FileType.FOLDER, FileType.SYMLINK); 059 this.fetchHistories = false; 060 this.deleted = false; 061 } 062 063 public Date getDate() { 064 return date; 065 } 066 067 public void setDate(Date date) { 068 this.date = date; 069 } 070 071 public String getPathExpression() { 072 return pathExpression; 073 } 074 075 public void setPathExpression(String pathExpression) { 076 this.pathExpression = pathExpression; 077 } 078 079 public boolean isFileHistoryId() { 080 return fileHistoryId; 081 } 082 083 public void setFileHistoryId(boolean fileHistoryId) { 084 this.fileHistoryId = fileHistoryId; 085 } 086 087 public boolean isRecursive() { 088 return recursive; 089 } 090 091 public void setRecursive(boolean recursive) { 092 this.recursive = recursive; 093 } 094 095 public Set<FileType> getFileTypes() { 096 return fileTypes; 097 } 098 099 public void setFileTypes(HashSet<FileType> fileTypes) { 100 this.fileTypes = fileTypes; 101 } 102 103 public boolean isFetchHistories() { 104 return fetchHistories; 105 } 106 107 public void setFetchHistories(boolean fetchHistories) { 108 this.fetchHistories = fetchHistories; 109 } 110 111 public boolean isDeleted() { 112 return deleted; 113 } 114 115 public void setDeleted(boolean deleted) { 116 this.deleted = deleted; 117 } 118}