001/*
002 * (C) Copyright 2006-2008 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Nuxeo - initial API and implementation
018 *
019 * $Id$
020 */
021
022package org.nuxeo.ecm.platform.audit.ws;
023
024import java.io.Serializable;
025import java.util.Date;
026
027import org.nuxeo.ecm.platform.audit.api.LogEntry;
028
029public class EventDescriptor implements Serializable {
030
031    private static final long serialVersionUID = 987698679871L;
032
033    private String eventId;
034
035    private String eventDate;
036
037    private String docPath;
038
039    private String docUUID;
040
041    private String lifeCycle;
042
043    private String repoId;
044
045    public EventDescriptor() {
046    }
047
048    public EventDescriptor(LogEntry logEntry) {
049        this.eventDate = logEntry.getEventDate().toString();
050        this.eventId = logEntry.getEventId();
051        this.docPath = logEntry.getDocPath();
052        this.docUUID = logEntry.getDocUUID();
053        this.lifeCycle = logEntry.getDocLifeCycle();
054        this.repoId = logEntry.getRepositoryId();
055    }
056
057    /**
058     * @deprecated since 5.4.2, use the other constructor
059     */
060    @Deprecated
061    public EventDescriptor(String eventId, Date eventDate, String docPath, String docUUID, String lifeCycle) {
062        this.eventDate = eventDate.toString();
063        this.eventId = eventId;
064        this.docPath = docPath;
065        this.docUUID = docUUID;
066        this.lifeCycle = lifeCycle;
067    }
068
069    public String getEventId() {
070        return eventId;
071    }
072
073    public String getEventDate() {
074        return eventDate;
075    }
076
077    public String getDocPath() {
078        return docPath;
079    }
080
081    public String getDocUUID() {
082        return docUUID;
083    }
084
085    public void setEventId(String eventId) {
086        this.eventId = eventId;
087    }
088
089    public void setEventDate(String eventDate) {
090        this.eventDate = eventDate;
091    }
092
093    public void setDocPath(String docPath) {
094        this.docPath = docPath;
095    }
096
097    public void setDocUUID(String docUUID) {
098        this.docUUID = docUUID;
099    }
100
101    public String getLifeCycle() {
102        return lifeCycle;
103    }
104
105    public void setLifeCycle(String lifeCycle) {
106        this.lifeCycle = lifeCycle;
107    }
108
109    public String getRepositoryId() {
110        return repoId;
111    }
112
113    public void setRepositoryId(String repoId) {
114        this.repoId = repoId;
115    }
116
117}