⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jahiaauditlogmanagerservice.java

📁 java 写的一个新闻发布系统
💻 JAVA
字号:
////                                   ____.//                       __/\ ______|    |__/\.     _______//            __   .____|    |       \   |    +----+       \//    _______|  /--|    |    |    -   \  _    |    :    -   \_________//   \\______: :---|    :    :           |    :    |         \________>//           |__\---\_____________:______:    :____|____:_____\//                                      /_____|////                 . . . i n   j a h i a   w e   t r u s t . . .//// MJ 19.02.2001//////package org.jahia.services.audit;import java.sql.*;import java.lang.*;import java.util.*;                                     // Listimport org.jahia.data.events.*;                     // EventObjectimport org.jahia.services.JahiaService;import org.jahia.params.*;                          // ParamBeanimport org.jahia.services.usermanager.*;            // JahiaUserimport org.jahia.exceptions.JahiaException;import org.jahia.data.JahiaDOMObject;import org.jahia.data.JahiaDBDOMObject;/** * The audit log manager takes care of writing audit log entries for any events that should * be logged and to retrieve those entries for display or sending as a file. * * * @author Mikha雔 Janson * @version 1.0 */public abstract class JahiaAuditLogManagerService extends JahiaService{    private String mServiceName = "JahiaAuditLogManager";    /**     * standard access method to log an Event     *     * @param   je              a reference to the JahiaEvent object to log     * @param   objectType      an <code>int</code> representing the type of the of the logged event     * @param   operationStr    a <code>String</code> containing the message logged with the event     */    public abstract boolean logEvent ( JahiaEvent je, int objectType, String operationStr );    /**     * utility method to retrieve log entries for a specific object type and ID     *     * @param   objectType  an <code>int</code> representing the object type to retrieve     * @param   objectID    an <code>int</code> representing the ID of the object to retrieve logs for     * @return              a <code>List</code> of HashMaps containing keys for time, username, operation, and their value for each logged event     */    public abstract ArrayList getLog ( int objectType, int objectID );    /**     * utility method to retrieve all log entries     *     * @return              a <code>List</code> of HashMaps containing keys for time, username, operation, and their value for each logged event     */    public abstract ArrayList getLog ();    /**     * utility method to flush log entries for a specific object type and  ID     *     * @param   objectType  an <code>int</code> representing the object type to retrieve     * @param   objectID    an <code>int</code> representing the ID of the object to retrieve logs for     * @param   jParams     a <code>ParamBean</code> object     * @return              a <code>List</code> of HashMaps containing keys for time, username, operation, and their value for each logged event     */    public abstract int flushLogs ( int objectType, int objectID, ParamBean jParams );    /**     * utility method to flush all log entries     *     * @param   theUser     a reference to the JahiaUser object representing the administrator user requesting the flush     * @return  true on success, false on any error     */    //public abstract boolean flushLogs ( JahiaUser theUser );    /**     * utility method to flush all log entries older than a given number of days     *     * @param   theUser     a reference to the JahiaUser object representing the administrator user requesting the flush     * @return  true on success, false on any error     */    public abstract boolean flushLogs ( JahiaUser theUser, Integer maxlogsdays );    /**     * utility method to flush all log entries of a site     *     * @param   theUser     a reference to the JahiaUser object representing the administrator user requesting the flush     * @return  true on success, false on any error     */    public abstract boolean flushSiteLogs ( JahiaUser theUser, String siteKey );    /**     * utility method to delete superfluous log entries when the maxLogs property has been set to a lower     * value than the current number of entries     *     * @param   maxLogs     the new maximal value for the number of log entries     * @param   maxlogsdays the number of days to keep existing log entries for     * @return  the number of rows deleted     */    public abstract int enforceMaxLogs( int MaxLogs);    //--------------------------------------------------------------------------	/**	 * return a DOM document of all logs of a site	 *	 * @param String the site key	 *	 * @return JahiaDOMObject a DOM representation of this object	 *	 * @author NK	 */	public abstract JahiaDOMObject getLogsAsDOM( String siteKey )	throws JahiaException;} // end JahiaDBAuditLogManager

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -