1 31 32 package org.opencms.file; 33 34 import org.opencms.util.CmsUUID; 35 36 import java.io.Serializable ; 37 38 56 public class CmsBackupResource extends CmsFile implements Cloneable , Serializable , Comparable { 57 58 59 private static final long serialVersionUID = -6659773406054276891L; 60 61 62 private CmsUUID m_backupId; 63 64 67 private String m_createdByName; 68 69 70 private String m_lastModifiedByName; 71 72 75 private int m_tagId; 76 77 78 private int m_versionId; 79 80 104 public CmsBackupResource( 105 CmsUUID backupId, 106 int tagId, 107 int versionId, 108 CmsUUID structureId, 109 CmsUUID resourceId, 110 CmsUUID contentId, 111 String path, 112 int type, 113 int flags, 114 int projectId, 115 int state, 116 long dateCreated, 117 CmsUUID userCreated, 118 String userCreatedName, 119 long dateLastModified, 120 CmsUUID userLastModified, 121 String userLastModifiedName, 122 long dateReleased, 123 long dateExpired, 124 int size, 125 byte[] content) { 126 127 super( 129 structureId, 130 resourceId, 131 contentId, 132 path, 133 type, 134 flags, 135 projectId, 136 state, 137 dateCreated, 138 userCreated, 139 dateLastModified, 140 userLastModified, 141 dateReleased, 142 dateExpired, 143 0, 144 size, 145 content); 146 147 m_backupId = backupId; 148 149 m_tagId = tagId; 151 152 m_versionId = versionId; 154 155 m_createdByName = userCreatedName; 157 158 m_lastModifiedByName = userLastModifiedName; 160 } 161 162 167 public Object clone() { 168 169 byte[] newContent = new byte[this.getContents().length]; 170 System.arraycopy(getContents(), 0, newContent, 0, getContents().length); 171 172 return new CmsBackupResource( 173 getBackupId(), 174 getTagId(), 175 getVersionId(), 176 getStructureId(), 177 getResourceId(), 178 getContentId(), 179 getRootPath(), 180 getTypeId(), 181 getFlags(), 182 getProjectLastModified(), 183 getState(), 184 getDateCreated(), 185 getUserCreated(), 186 getCreatedByName(), 187 getDateLastModified(), 188 getUserLastModified(), 189 getLastModifiedByName(), 190 getDateReleased(), 191 getDateExpired(), 192 getLength(), 193 newContent); 194 } 195 196 201 public CmsUUID getBackupId() { 202 203 return m_backupId; 204 } 205 206 211 public String getCreatedByName() { 212 213 return m_createdByName; 214 } 215 216 221 public String getLastModifiedByName() { 222 223 return m_lastModifiedByName; 224 } 225 226 231 public int getTagId() { 232 233 return m_tagId; 234 } 235 236 241 public int getVersionId() { 242 243 return m_versionId; 244 } 245 } 246 | Popular Tags |