001/*
002 * (C) Copyright 2010-2013 Nuxeo SA (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 *     Olivier Grisel
016 */
017package org.nuxeo.ecm.platform.suggestbox.service.descriptors;
018
019import org.nuxeo.common.xmap.annotation.XNode;
020import org.nuxeo.common.xmap.annotation.XObject;
021
022/**
023 * XMap descriptor for registering overridable suggestion handlers (individual operations or named chains of
024 * operations).
025 *
026 * @author ogrisel
027 */
028@XObject("suggestionHandler")
029public class SuggestionHandlerDescriptor implements Cloneable {
030
031    @XNode("@name")
032    protected String name = "default";
033
034    @XNode("@type")
035    protected String type;
036
037    @XNode("@suggesterGroup")
038    protected String suggestGroup;
039
040    @XNode("@operation")
041    protected String operation;
042
043    @XNode("@operationChain")
044    protected String operationChain;
045
046    @XNode("@enabled")
047    protected boolean enabled = true;
048
049    public String getName() {
050        return name;
051    }
052
053    public boolean isEnabled() {
054        return enabled;
055    }
056
057    public void setEnabled(boolean enabled) {
058        this.enabled = enabled;
059    }
060
061    public String getType() {
062        return type;
063    }
064
065    public void setType(String type) {
066        this.type = type;
067    }
068
069    public String getSuggesterGroup() {
070        return suggestGroup;
071    }
072
073    public void setSuggesterGroup(String suggesterGroup) {
074        this.suggestGroup = suggesterGroup;
075    }
076
077    public String getOperation() {
078        return operation;
079    }
080
081    public void setOperation(String operation) {
082        this.operation = operation;
083    }
084
085    public String getOperationChain() {
086        return operationChain;
087    }
088
089    public void setOperationChain(String operationChain) {
090        this.operationChain = operationChain;
091    }
092
093    /*
094     * Override the Object.clone to make it public
095     */
096    @Override
097    public Object clone() throws CloneNotSupportedException {
098        return super.clone();
099    }
100
101}