/** * @deprecated since 2.6M1 please do not use this, it is bound to a jrcs based implementation. */ @Deprecated public Archive getArchive() { if (this.attachment_archive == null) { return null; } else { return this.attachment_archive.getRCSArchive(); } }
/** * @return an array of versions which are available for this attachment, * ordered by version number decending. */ public Version[] getVersions() { final Node[] nodes = getRCSArchive().changeLog(); final Version[] versions = new Version[nodes.length]; for (int i = 0; i < nodes.length; i++) { versions[i] = nodes[i].getVersion(); } return versions; }
/** * {@inheritDoc} * * @see java.lang.Object#clone() */ @Override public Object clone() { XWikiAttachmentArchive attachmentarchive = null; try { attachmentarchive = (XWikiAttachmentArchive) getClass().newInstance(); } catch (Exception e) { // This should not happen LOG.error("Error while attachmentArchive.clone()", e); } attachmentarchive.setAttachment(getAttachment()); attachmentarchive.setRCSArchive(getRCSArchive()); return attachmentarchive; }
final Archive rcsArchive = getRCSArchive();