1 16 package org.jahia.services.pages; 17 18 19 25 public class JahiaPageDefinitionTemp { 26 27 private static final String CLASS_NAME = JahiaPageDefinitionTemp.class.getName (); 28 29 private int mID; 30 private int mSiteID; 31 private String mName; 32 private String mSourcePath; private boolean mAvailable; private String mImage; 35 private boolean mIsDefault = false; 36 37 49 public JahiaPageDefinitionTemp (int ID, int siteID, String name, 50 String sourcePath, boolean isAvailable, 51 String image, boolean isDefault) { 52 mID = ID; 53 mSiteID = siteID; 54 55 if (name == null) { 56 name = ""; 57 } 58 mName = name; 59 60 if (sourcePath == null) { 61 sourcePath = ""; 62 } 63 mSourcePath = sourcePath; 64 65 mAvailable = isAvailable; 66 67 if (image == null) { 68 image = ""; 69 } 70 mImage = image; 71 72 mIsDefault = isDefault; 73 74 } 75 76 83 public JahiaPageDefinitionTemp (JahiaPageDefinition template, boolean isDefault) { 84 if (template == null) 85 return; 86 87 mID = template.getID (); 88 mSiteID = template.getJahiaID (); 89 mName = template.getName (); 90 mSourcePath = template.getSourcePath (); 91 mAvailable = template.isAvailable (); 92 mImage = template.getImage (); 93 mIsDefault = isDefault; 94 } 95 96 102 public final int getID () { 103 return mID; 104 } 105 106 107 113 public String getImage () { 114 return mImage; 115 } 116 117 118 124 public final int getJahiaID () { 125 return mSiteID; 126 } 127 128 129 135 public final String getName () { 136 return mName; 137 } 138 139 140 146 public final String getSourcePath () { 147 return mSourcePath; 148 } 149 150 151 158 public final boolean isAvailable () { 159 return mAvailable; 160 } 161 162 169 public final boolean isDefault () { 170 return mIsDefault; 171 } 172 173 179 public void setImage (String value) { 180 mImage = value; 181 } 182 183 184 190 public void setJahiaID (int value) { 191 mSiteID = value; 192 } 193 194 195 201 public void setName (String value) { 202 mName = value; 203 } 204 205 211 public void setSourcePath (String value) { 212 mSourcePath = value; 213 } 214 215 222 public void setAvailable (boolean value) { 223 mAvailable = value; 224 } 225 226 233 public void setDefault (boolean value) { 234 mIsDefault = value; 235 } 236 237 } | Popular Tags |