001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com) 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * For further information about Alkacon Software GmbH & Co. KG, please see the 018 * company website: http://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: http://www.opencms.org 022 * 023 * You should have received a copy of the GNU Lesser General Public 024 * License along with this library; if not, write to the Free Software 025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 */ 027 028package org.opencms.workplace.tools.history; 029 030import org.opencms.main.OpenCms; 031 032/** 033 * Bean to store the entries made by the user in the History Clear form in the 034 * administration view.<p> 035 * 036 * @since 6.9.1 037 */ 038public class CmsHistoryClear { 039 040 /** Mode for clearing the versions of the deleted resources too. */ 041 private String m_clearDeletedMode; 042 043 /** The date versions older than will be cleared. */ 044 private long m_clearOlderThan; 045 046 /** Number of versions to keep. */ 047 private int m_keepVersions; 048 049 /** 050 * Default constructor initializing values.<p> 051 */ 052 public CmsHistoryClear() { 053 054 m_keepVersions = OpenCms.getSystemInfo().getHistoryVersions(); 055 m_clearDeletedMode = CmsHistoryClearDialog.MODE_CLEANDELETED_KEEP_RESTORE_VERSION; 056 } 057 058 /** 059 * Returns the date versions older than will be cleared.<p> 060 * 061 * @return the date versions older than will be cleared 062 */ 063 public long getClearOlderThan() { 064 065 return m_clearOlderThan; 066 } 067 068 /** 069 * Returns the number of versions to keep.<p> 070 * 071 * @return the number of versions to keep 072 */ 073 public int getKeepVersions() { 074 075 return m_keepVersions; 076 } 077 078 /** 079 * Returns the clear deleted mode.<p> 080 * 081 * @return the clear deleted mode 082 */ 083 public String getClearDeletedMode() { 084 085 return m_clearDeletedMode; 086 } 087 088 /** 089 * Sets the clear deleted mode.<p> 090 * 091 * @param clearDeletedMode the clear deleted mode 092 */ 093 public void setClearDeletedMode(String clearDeletedMode) { 094 095 m_clearDeletedMode = clearDeletedMode; 096 } 097 098 /** 099 * Sets the date versions older than will be cleared.<p> 100 * 101 * @param clearOlderThan the date versions older than will be cleared 102 */ 103 public void setClearOlderThan(long clearOlderThan) { 104 105 m_clearOlderThan = clearOlderThan; 106 } 107 108 /** 109 * Sets the number of versions to keep.<p> 110 * 111 * @param keepVersions the number of versions to keep 112 */ 113 public void setKeepVersions(int keepVersions) { 114 115 m_keepVersions = keepVersions; 116 } 117}