001/** 002 * Copyright 2011-2012 The Kuali Foundation Licensed under the 003 * Educational Community License, Version 2.0 (the "License"); you may 004 * not use this file except in compliance with the License. You may 005 * obtain a copy of the License at 006 * 007 * http://www.osedu.org/licenses/ECL-2.0 008 * 009 * Unless required by applicable law or agreed to in writing, 010 * software distributed under the License is distributed on an "AS IS" 011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express 012 * or implied. See the License for the specific language governing 013 * permissions and limitations under the License. 014 */ 015 016package org.kuali.mobility.shared; 017 018import java.util.ArrayList; 019import java.util.List; 020 021public class ToolFromXML{ 022 023 024 // Constants used for the Requisites field. 025 // !!! DON'T CHANGE VALUES!!! Matches values in Tool.java. 026 public static final int NATIVE = 1; 027 public static final int IOS = 2; 028 public static final int ANDROID = 4; 029 public static final int WINDOWS_PHONE = 8; 030 public static final int BLACKBERRY = 16; 031 public static final int NON_NATIVE = 32; 032 033 private String title; 034 private String subtitle; 035 private String contacts; 036 private String keywords; 037 private String alias; 038 private String url; 039 private String description; 040 private String iconUrl; 041 private boolean isNative; 042 private boolean isiOS; 043 private boolean isAndroid; 044 private boolean isWindows; 045 private boolean isBlackberry; 046 private boolean isNonNative; 047 048 private List<String> publishingACLS = new ArrayList(); 049 private List<String> viewingACLS = new ArrayList(); 050 051 052 053 public List<String> getPublishingACLS() { 054 return publishingACLS; 055 } 056 public void setPublishingACLS(List<String> publishingACLS) { 057 this.publishingACLS = publishingACLS; 058 } 059 public List<String> getViewingACLS() { 060 return viewingACLS; 061 } 062 public void setViewingACLS(List<String> viewingACLS) { 063 this.viewingACLS = viewingACLS; 064 } 065 public String getTitle() { 066 return title; 067 } 068 public void setTitle(String title) { 069 this.title = title; 070 } 071 public String getSubtitle() { 072 return subtitle; 073 } 074 public void setSubtitle(String subtitle) { 075 this.subtitle = subtitle; 076 } 077 public String getContacts() { 078 return contacts; 079 } 080 public void setContacts(String contacts) { 081 this.contacts = contacts; 082 } 083 public String getKeywords() { 084 return keywords; 085 } 086 public void setKeywords(String keywords) { 087 this.keywords = keywords; 088 } 089 public String getAlias() { 090 return alias; 091 } 092 public void setAlias(String alias) { 093 this.alias = alias; 094 } 095 public String getUrl() { 096 return url; 097 } 098 public void setUrl(String url) { 099 this.url = url; 100 } 101 public String getDescription() { 102 return description; 103 } 104 public void setDescription(String description) { 105 this.description = description; 106 } 107 public String getIconUrl() { 108 return iconUrl; 109 } 110 public void setIconUrl(String iconUrl) { 111 this.iconUrl = iconUrl; 112 } 113 public boolean isNative() { 114 return isNative; 115 } 116 public void setNative(boolean isNative) { 117 this.isNative = isNative; 118 } 119 public boolean isiOS() { 120 return isiOS; 121 } 122 public void setIsiOS(boolean isiOS) { 123 this.isiOS = isiOS; 124 } 125 public boolean isAndroid() { 126 return isAndroid; 127 } 128 public void setAndroid(boolean isAndroid) { 129 this.isAndroid = isAndroid; 130 } 131 public boolean isWindows() { 132 return isWindows; 133 } 134 public void setWindows(boolean isWindows) { 135 this.isWindows = isWindows; 136 } 137 public boolean isBlackberry() { 138 return isBlackberry; 139 } 140 public void setBlackberry(boolean isBlackberry) { 141 this.isBlackberry = isBlackberry; 142 } 143 public boolean isNonNative() { 144 return isNonNative; 145 } 146 public void setNonNative(boolean isNonNative) { 147 this.isNonNative = isNonNative; 148 } 149 public int getRequisites(){ 150 int reqs = 0; 151 if(this.isNative()) reqs |= NATIVE; 152 if(this.isiOS()) reqs |= IOS; 153 if(this.isAndroid()) reqs |= ANDROID; 154 if(this.isWindows()) reqs |= WINDOWS_PHONE; 155 if(this.isBlackberry()) reqs |= BLACKBERRY; 156 if(this.isNonNative()) reqs |= NON_NATIVE; 157 return reqs; 158 } 159 160 @Override 161 public String toString() { 162 return "\nToolFromXML \n[title=" + title + ", \nsubtitle=" + subtitle 163 + ", \ncontacts=" + contacts + ", \nkeywords=" + keywords 164 + ", \nalias=" + alias + ", \nurl=" + url + ", \ndescription=" 165 + description + ", \niconUrl=" + iconUrl + ", \nisNative=" 166 + isNative + ", \nisiOS=" + isiOS + ", \nisAndroid=" + isAndroid 167 + ", \nisWindows=" + isWindows + ", \nisBlackberry=" + isBlackberry 168 + ", \nisNonNative=" + isNonNative 169 + super.toString() + "]"; 170 } 171 172}