001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.audit;
016    
017    import com.liferay.portal.kernel.json.JSONException;
018    import com.liferay.portal.kernel.json.JSONObject;
019    
020    import java.util.Date;
021    
022    /**
023     * @author Amos Fong
024     */
025    public interface AuditMessageFactory {
026    
027            public AuditMessage getAuditMessage(String message) throws JSONException;
028    
029            public AuditMessage getAuditMessage(
030                    String eventType, long companyId, long userId, String userName);
031    
032            public AuditMessage getAuditMessage(
033                    String eventType, long companyId, long userId, String userName,
034                    String className, String classPK);
035    
036            public AuditMessage getAuditMessage(
037                    String eventType, long companyId, long userId, String userName,
038                    String className, String classPK, String message);
039    
040            public AuditMessage getAuditMessage(
041                    String eventType, long companyId, long userId, String userName,
042                    String className, String classPK, String message, Date timestamp,
043                    JSONObject additionalInfo);
044    
045            public AuditMessage getAuditMessage(
046                    String eventType, long companyId, long userId, String userName,
047                    String className, String classPK, String message,
048                    JSONObject additionalInfo);
049    
050    }