1 package org.jahia.services.sites; 2 3 import java.io.Serializable ; 4 5 6 21 22 public class SiteLanguageSettings implements Serializable { 23 24 private int ID; 25 private int siteID; 26 private boolean activated; 27 private int rank; 28 private boolean mandatory; 29 private String code; 30 private boolean inPersistantStorage = false; 31 private boolean dataModified = false; 32 33 54 public SiteLanguageSettings (int ID, int siteID, String code, 55 boolean activated, int rank, 56 boolean mandatory, 57 boolean existsInPersistantStorage) { 58 this.ID = ID; 59 this.siteID = siteID; 60 this.code = code; 61 this.activated = activated; 62 this.rank = rank; 63 this.mandatory = mandatory; 64 this.inPersistantStorage = existsInPersistantStorage; 65 } 66 67 82 public SiteLanguageSettings (int siteID, String code, 83 boolean activated, int rank, 84 boolean mandatory) { 85 this (-1, siteID, code, activated, rank, mandatory, false); 86 } 87 88 89 97 protected void setID (int ID) { 98 this.ID = ID; 100 } 101 102 107 public int getID () { 108 return ID; 109 } 110 111 117 public int getSiteID () { 118 return siteID; 119 } 120 121 128 public String getCode () { 129 return code; 130 } 131 132 137 public boolean isActivated () { 138 return activated; 139 } 140 141 150 public int getRank () { 151 return rank; 152 } 153 154 165 public void setRank (int rank) { 166 this.dataModified = true; 167 this.rank = rank; 168 } 169 170 177 public boolean isMandatory () { 178 return mandatory; 179 } 180 181 189 public boolean isInPersistantStorage () { 190 return inPersistantStorage; 191 } 192 193 199 public boolean isDataModified () { 200 return dataModified; 201 } 202 203 210 public void setDataModified (boolean dataModified) { 211 this.dataModified = dataModified; 212 } 213 214 220 public void setActivated (boolean activated) { 221 this.dataModified = true; 222 this.activated = activated; 223 } 224 225 232 public void setMandatory (boolean mandatory) { 233 this.dataModified = true; 234 this.mandatory = mandatory; 235 } 236 237 } 238 | Popular Tags |