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.init; 019 020import org.syncany.operations.OperationResult; 021import org.syncany.plugins.transfer.StorageTestResult; 022 023public class InitOperationResult implements OperationResult { 024 public enum InitResultCode { 025 OK, NOK_TEST_FAILED 026 } 027 028 private InitResultCode resultCode; 029 private StorageTestResult testResult; 030 private GenlinkOperationResult genLinkResult; 031 private boolean addedToDaemon; 032 033 public InitOperationResult() { 034 this.resultCode = InitResultCode.NOK_TEST_FAILED; 035 this.testResult = null; 036 this.genLinkResult = null; 037 this.addedToDaemon = false; 038 } 039 040 public InitResultCode getResultCode() { 041 return resultCode; 042 } 043 044 public GenlinkOperationResult getGenLinkResult() { 045 return genLinkResult; 046 } 047 048 public StorageTestResult getTestResult() { 049 return testResult; 050 } 051 052 public boolean isAddedToDaemon() { 053 return addedToDaemon; 054 } 055 056 public void setAddedToDaemon(boolean addedToDaemon) { 057 this.addedToDaemon = addedToDaemon; 058 } 059 060 public void setResultCode(InitResultCode resultCode) { 061 this.resultCode = resultCode; 062 } 063 064 public void setTestResult(StorageTestResult testResult) { 065 this.testResult = testResult; 066 } 067 068 public void setGenLinkResult(GenlinkOperationResult genLinkResult) { 069 this.genLinkResult = genLinkResult; 070 } 071}