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