📄 rollerconfigdata.java
字号:
package org.roller.pojos;import java.io.File;import java.lang.reflect.AccessibleObject;import java.lang.reflect.Field;import java.math.BigDecimal;import java.util.Arrays;import java.util.List;import org.apache.commons.lang.StringUtils;import org.roller.RollerException;import org.roller.model.Roller;import org.roller.model.RollerFactory;import org.roller.util.PojoUtil;/** * Configuration object for Roller. Reads and writes roller-config.xml. * RollerConfig extends Struts ActionForm so that it can be extended by * RollerConfigForm in the administrator pages. * <p /> * This is where you set default Roller configuration values. * * @ejb:bean name="RollerConfigData" * @struts.form include-all="true" * @hibernate.class table="rollerconfig" * hibernate.jcs-cache usage="read-write" */public class RollerConfigData extends org.roller.pojos.PersistentObject implements java.io.Serializable{ static final long serialVersionUID = -6354583200913127875L; protected java.lang.String id = null; /** * Roller database version. */ protected String mDatabaseVersion = "995"; // 1.0 will be '1000' /** * Absolute URL for site, for cases where infered absolute URL doesn't work. */ protected String mAbsoluteURL = null; /** * Should Roller cache return RSS pages. */ protected Boolean mRssUseCache = Boolean.FALSE; /** * Duration to cache RSS pages (in seconds). */ protected Integer mRssCacheTime = new Integer(3000); /** * Does Roller allow the creation of new users. */ protected Boolean mNewUserAllowed = Boolean.TRUE; /** * @deprecated Admins now indicated by roles in userroles table. */ protected String mAdminUsers = "admin"; /** * Where to get Themes presented to new users. */ protected String mUserThemes = "/themes"; /** * List of "editor pages" for the Weblog entry editor * seperated with commas. */ protected String mEditorPages = "editor-text.jsp,editor-text-js.jsp,editor-rte.jsp,editor-dhtml.jsp,editor-ekit.jsp,editor-wiki-js.jsp"; /** * Dis/enble RSS aggregation capabilities. */ protected Boolean mEnableAggregator = Boolean.FALSE; /** * Are file uploads enabled. */ protected Boolean mUploadEnabled = Boolean.TRUE; /** * The maximum size of each user's upload directory. */ protected BigDecimal mUploadMaxDirMB = new BigDecimal("2"); /** * The maximum size allowed per uploaded file. */ protected BigDecimal mUploadMaxFileMB = new BigDecimal(".5"); /** * List of permitted file extensions (not including the "dot") * seperated with commas. * This attribute is mutually exclusive with uploadForbid. */ protected String mUploadAllow = ""; /** * List of forbidden file extensions (not including the "dot") * seperated with commas. * This attribute is mutually exclusive with uploadAllow. */ protected String mUploadForbid = ""; /** * Directory where uploaded files will be stored. * May end with a slash. Optional, this value will * default to RollerContext.USER_RESOURCES. If specified, * should be a full path on the system harddrive or * relative to the WebApp. */ protected String mUploadDir = ""; /** * The path from which the webserver will serve upload files. * This values must not end in a slash. */ protected String uploadPath = "/resources"; protected Boolean mMemDebug = Boolean.FALSE; /** * Determines if the Comment page will "autoformat" * comments. That is, replace carriage-returns with <br />. */ protected Boolean mAutoformatComments = Boolean.FALSE; /** * Determines if the Comment page will escape html in comments. */ protected Boolean mEscapeCommentHtml = Boolean.FALSE; /** * Determines if e-mailing comments is enabled. */ protected Boolean mEmailComments = Boolean.FALSE; /** * Enable linkback extraction. */ protected Boolean mEnableLinkback = Boolean.FALSE; /** * Name of this site */ protected String mSiteName = "Roller-based Site"; /** * Description of this site */ protected String mSiteDescription = "Roller-based Site"; /** * Site administrator's email address */ protected String mEmailAddress = ""; /** * Lucene index directory */ protected String mIndexDir = "${user.home}" + File.separator + "roller-index"; /** * Flag for encrypting passwords */ protected Boolean mEncryptPasswords = Boolean.FALSE; protected String mAlgorithm = "SHA"; /** * Comma-delimited list of "words" for filtering referrer spam. */ protected String mRefererSpamWords = ""; //-------------------------------------- begin requisite getters & setters /** * Not remote since primary key may be extracted by other means. * * @struts.validator type="required" msgkey="errors.required" * @ejb:persistent-field * @hibernate.id column="id" type="string" * generator-class="uuid.hex" unsaved-value="null" */ public String getId() { return this.id; } /** @ejb:persistent-field */ public void setId(String id) { this.id = id; } /** * @ejb:persistent-field * @hibernate.property column="absoluteurl" non-null="false" unique="false" */ public String getAbsoluteURL() { return mAbsoluteURL; } /** @ejb:persistent-field */ public void setAbsoluteURL(String string) { mAbsoluteURL = string; } /** * @ejb:persistent-field * @hibernate.property column="rssusecache" non-null="true" unique="false" */ public Boolean getRssUseCache() { return mRssUseCache; } /** @ejb:persistent-field */ public void setRssUseCache(Boolean use) { mRssUseCache = use; } /** * @ejb:persistent-field * @hibernate.property column="rsscachetime" non-null="true" unique="false" */ public Integer getRssCacheTime() { return mRssCacheTime; } /** @ejb:persistent-field */ public void setRssCacheTime(Integer cacheTime) { mRssCacheTime = cacheTime; } /** * @ejb:persistent-field * @hibernate.property column="newuserallowed" non-null="true" unique="false" */ public Boolean getNewUserAllowed() { return mNewUserAllowed; } /** @ejb:persistent-field */ public void setNewUserAllowed(Boolean use) { mNewUserAllowed = use; } /** * @deprecated Admins now indicated by roles in userroles table. */ public String getAdminUsers() { return mAdminUsers; } /** * @deprecated Admins now indicated by roles in userroles table. */ public void setAdminUsers(String _adminUsers) { mAdminUsers = _adminUsers; } /** * @ejb:persistent-field * @hibernate.property column="userthemes" non-null="true" unique="false" */ public String getUserThemes() { return mUserThemes; } /** @ejb:persistent-field */ public void setUserThemes(String str) { mUserThemes = str; } /** * @ejb:persistent-field * @hibernate.property column="editorpages" non-null="false" unique="false" */ public String getEditorPages() { return mEditorPages; } /** @ejb:persistent-field */ public void setEditorPages(String _editorPages) { mEditorPages = _editorPages; } /** * @ejb:persistent-field * @hibernate.property column="enableaggregator" non-null="true" unique="false" */ public Boolean getEnableAggregator() { return mEnableAggregator; } /** @ejb:persistent-field */ public void setEnableAggregator(Boolean use) { mEnableAggregator = use; } /** * @ejb:persistent-field * @hibernate.property column="uploadenabled" non-null="true" unique="false" */ public Boolean getUploadEnabled() { return mUploadEnabled; } /** @ejb:persistent-field */ public void setUploadEnabled(Boolean use) { mUploadEnabled = use; } /** * @ejb:persistent-field * @hibernate.property column="uploadmaxdirmb" * non-null="true" unique="false" type="big_decimal" */ public BigDecimal getUploadMaxDirMB() { return mUploadMaxDirMB; } /** @ejb:persistent-field */ public void setUploadMaxDirMB(BigDecimal use) { mUploadMaxDirMB = use; } /** * @ejb:persistent-field * @hibernate.property column="uploadmaxfilemb" * non-null="true" unique="false" type="big_decimal" */ public BigDecimal getUploadMaxFileMB() { return mUploadMaxFileMB; } /** @ejb:persistent-field */ public void setUploadMaxFileMB(BigDecimal use) { mUploadMaxFileMB = use; } /** * @ejb:persistent-field * @hibernate.property column="uploadallow" non-null="true" unique="false" */ public String getUploadAllow() { return mUploadAllow; } /** @ejb:persistent-field */ public void setUploadAllow(String _uploadAllow) { mUploadAllow = _uploadAllow; } /** * @ejb:persistent-field * @hibernate.property column="uploadforbid" non-null="true" unique="false" */ public String getUploadForbid() { return mUploadForbid; } /** @ejb:persistent-field */ public void setUploadForbid(String _uploadForbid) { mUploadForbid = _uploadForbid; } /** * @ejb:persistent-field * @hibernate.property column="uploaddir" non-null="true" unique="false" */ public String getUploadDir() { return mUploadDir; } /** @ejb:persistent-field */ public void setUploadDir(String str) { mUploadDir = str; } /** * @ejb:persistent-field * @hibernate.property column="uploadpath" non-null="true" unique="false"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -