001/*
002 * (C) Copyright 2006-2007 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: EventDescriptor.java 19481 2007-05-27 10:50:10Z sfermigier $
018 */
019
020package org.nuxeo.ecm.platform.audit.service.extension;
021
022import java.util.ArrayList;
023import java.util.List;
024
025import org.nuxeo.common.xmap.annotation.XNode;
026import org.nuxeo.common.xmap.annotation.XNodeList;
027import org.nuxeo.common.xmap.annotation.XObject;
028
029/**
030 * Really simple auditable event descriptor.
031 *
032 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a>
033 */
034@XObject("event")
035public class EventDescriptor {
036
037    @XNode("@name")
038    private String name;
039
040    @XNode("@enabled")
041    private boolean enabled = true;
042
043    @XNodeList(value = "extendedInfos/extendedInfo", type = ArrayList.class, componentType = ExtendedInfoDescriptor.class)
044    protected List<ExtendedInfoDescriptor> extendedInfoDescriptors;
045
046    public boolean getEnabled() {
047        return enabled;
048    }
049
050    /**
051     * @since 7.4
052     */
053    public List<ExtendedInfoDescriptor> getExtendedInfoDescriptors() {
054        return extendedInfoDescriptors;
055    }
056
057    public String getName() {
058        return name;
059    }
060
061    public void setEnabled(boolean enabled) {
062        this.enabled = enabled;
063    }
064
065    /**
066     * @since 7.4
067     */
068    public void setExtendedInfoDescriptors(List<ExtendedInfoDescriptor> extendedInfoDescriptors) {
069        this.extendedInfoDescriptors = extendedInfoDescriptors;
070    }
071
072    public void setName(String name) {
073        this.name = name;
074    }
075
076}