001: /*
002: * JOSSO: Java Open Single Sign-On
003: *
004: * Copyright 2004-2008, Atricore, Inc.
005: *
006: * This is free software; you can redistribute it and/or modify it
007: * under the terms of the GNU Lesser General Public License as
008: * published by the Free Software Foundation; either version 2.1 of
009: * the License, or (at your option) any later version.
010: *
011: * This software is distributed in the hope that it will be useful,
012: * but WITHOUT ANY WARRANTY; without even the implied warranty of
013: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014: * Lesser General Public License for more details.
015: *
016: * You should have received a copy of the GNU Lesser General Public
017: * License along with this software; if not, write to the Free
018: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
019: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
020: */
021: package org.josso.gateway.audit.service;
022:
023: import org.josso.gateway.audit.SSOAuditTrail;
024:
025: import java.util.Date;
026: import java.util.Properties;
027:
028: /**
029: * Base Audit Trail implementation.
030: *
031: * @author <a href="mailto:sgonzalez@josso.org">Sebastian Gonzalez Oyuela</a>
032: *
033: * @version $Id: BaseSSOAuditTrail.java 508 2008-02-18 13:32:29Z sgonzalez $
034: */
035: public class BaseSSOAuditTrail implements SSOAuditTrail {
036:
037: private String category;
038:
039: private String severity;
040:
041: private String action;
042:
043: private String outcome;
044:
045: private String subject;
046:
047: private Date time;
048:
049: private Throwable error;
050:
051: private Properties props;
052:
053: public BaseSSOAuditTrail(String category, String severity,
054: String subject, String action, String outcome, Date time,
055: Properties props) {
056: this .category = category;
057: this .severity = severity;
058: this .subject = subject;
059: this .action = action;
060: this .outcome = outcome;
061: this .time = time;
062: this .props = props;
063: }
064:
065: public BaseSSOAuditTrail(String category, String severity,
066: String subject, String action, String outcome, Date time,
067: Properties props, Throwable error) {
068: this (category, severity, subject, action, outcome, time, props);
069: this .error = error;
070: }
071:
072: public String getCategory() {
073: return category;
074: }
075:
076: public String getSeverity() {
077: return severity;
078: }
079:
080: public String getSubject() {
081: return subject;
082: }
083:
084: public String getAction() {
085: return action;
086: }
087:
088: public String getOutcome() {
089: return outcome;
090: }
091:
092: public Date getTime() {
093: return time;
094: }
095:
096: public Properties getProperties() {
097: return props;
098: }
099:
100: public Throwable getError() {
101: return error;
102: }
103:
104: }
|