001/*
002 * (C) Copyright 2006-2008 Nuxeo SAS (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Nuxeo - initial API and implementation
016 *
017 * $Id$
018 */
019
020package org.nuxeo.ecm.platform.audit.ws;
021
022import java.io.Serializable;
023import java.util.Date;
024
025import org.nuxeo.ecm.platform.audit.api.LogEntry;
026
027public class EventDescriptor implements Serializable {
028
029    private static final long serialVersionUID = 987698679871L;
030
031    private String eventId;
032
033    private String eventDate;
034
035    private String docPath;
036
037    private String docUUID;
038
039    private String lifeCycle;
040
041    private String repoId;
042
043    public EventDescriptor() {
044    }
045
046    public EventDescriptor(LogEntry logEntry) {
047        this.eventDate = logEntry.getEventDate().toString();
048        this.eventId = logEntry.getEventId();
049        this.docPath = logEntry.getDocPath();
050        this.docUUID = logEntry.getDocUUID();
051        this.lifeCycle = logEntry.getDocLifeCycle();
052        this.repoId = logEntry.getRepositoryId();
053    }
054
055    /**
056     * @deprecated since 5.4.2, use the other constructor
057     */
058    @Deprecated
059    public EventDescriptor(String eventId, Date eventDate, String docPath, String docUUID, String lifeCycle) {
060        this.eventDate = eventDate.toString();
061        this.eventId = eventId;
062        this.docPath = docPath;
063        this.docUUID = docUUID;
064        this.lifeCycle = lifeCycle;
065    }
066
067    public String getEventId() {
068        return eventId;
069    }
070
071    public String getEventDate() {
072        return eventDate;
073    }
074
075    public String getDocPath() {
076        return docPath;
077    }
078
079    public String getDocUUID() {
080        return docUUID;
081    }
082
083    public void setEventId(String eventId) {
084        this.eventId = eventId;
085    }
086
087    public void setEventDate(String eventDate) {
088        this.eventDate = eventDate;
089    }
090
091    public void setDocPath(String docPath) {
092        this.docPath = docPath;
093    }
094
095    public void setDocUUID(String docUUID) {
096        this.docUUID = docUUID;
097    }
098
099    public String getLifeCycle() {
100        return lifeCycle;
101    }
102
103    public void setLifeCycle(String lifeCycle) {
104        this.lifeCycle = lifeCycle;
105    }
106
107    public String getRepositoryId() {
108        return repoId;
109    }
110
111    public void setRepositoryId(String repoId) {
112        this.repoId = repoId;
113    }
114
115}