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.update; 019 020import org.simpleframework.xml.Element; 021import org.simpleframework.xml.Root; 022 023/** 024 * This class represents an information object describing an application release 025 * for a single distribution type. It is returned by the Syncany API during the 026 * {@link UpdateOperation} with the action {@link UpdateOperationAction#CHECK}. 027 * 028 * <p>this class uses the Simple framework for XML serialization, and its corresponding 029 * annotation-based configuration. 030 * 031 * @see <a href="http://simple.sourceforge.net/">Simple framework</a> 032 * @see <a href="https://github.com/syncany/syncany-website">Syncany Website/API</a> 033 * @author Philipp C. Heckel (philipp.heckel@gmail.com) 034 */ 035@Root(name = "appInfo", strict = false) 036public class AppInfo { 037 @Element(name = "dist", required = true) 038 private String dist; 039 040 @Element(name = "type", required = true) 041 private String type; 042 043 @Element(name = "appVersion", required = true) 044 private String appVersion; 045 046 @Element(name = "date", required = true) 047 private String date; 048 049 @Element(name = "release", required = true) 050 private boolean release; 051 052 @Element(name = "operatingSystem", required = true) 053 private String operatingSystem; 054 055 @Element(name = "architecture", required = true) 056 private String architecture; 057 058 @Element(name = "checksum", required = true) 059 private boolean checksum; 060 061 @Element(name = "downloadUrl", required = true) 062 private String downloadUrl; 063 064 public AppInfo() { 065 // Nothing. 066 } 067 068 public String getDist() { 069 return dist; 070 } 071 072 public String getType() { 073 return type; 074 } 075 076 public String getAppVersion() { 077 return appVersion; 078 } 079 080 public String getDate() { 081 return date; 082 } 083 084 public boolean isRelease() { 085 return release; 086 } 087 088 public String getOperatingSystem() { 089 return operatingSystem; 090 } 091 092 public String getArchitecture() { 093 return architecture; 094 } 095 096 public boolean isChecksum() { 097 return checksum; 098 } 099 100 public String getDownloadUrl() { 101 return downloadUrl; 102 } 103}