001/*
002 * (C) Copyright 2006-2012 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 *     Thomas Roger <troger@nuxeo.com>
018 */
019
020package org.nuxeo.ecm.activity;
021
022import java.util.ArrayList;
023import java.util.List;
024
025import org.nuxeo.common.xmap.annotation.XNode;
026import org.nuxeo.common.xmap.annotation.XObject;
027
028/**
029 * An {@code ActivityVerb} stores the configuration for a given activity verb:
030 * <ul>
031 * <li>a label key</li>
032 * <li>an icon path</li>
033 * </ul>
034 *
035 * @author <a href="mailto:troger@nuxeo.com">Thomas Roger</a>
036 * @since 5.6
037 */
038@XObject("activityVerb")
039public class ActivityVerb {
040
041    @XNode("@verb")
042    protected String verb;
043
044    @XNode("@labelKey")
045    protected String labelKey;
046
047    @XNode("@icon")
048    protected String icon;
049
050    public String getVerb() {
051        return verb;
052    }
053
054    public void setVerb(String verb) {
055        this.verb = verb;
056    }
057
058    public String getLabelKey() {
059        return labelKey;
060    }
061
062    public void setLabelKey(String labelKey) {
063        this.labelKey = labelKey;
064    }
065
066    public String getIcon() {
067        return icon;
068    }
069
070    public void setIcon(String icon) {
071        this.icon = icon;
072    }
073
074    @Override
075    public ActivityVerb clone() {
076        ActivityVerb clone = new ActivityVerb();
077        clone.setVerb(getVerb());
078        clone.setLabelKey(getLabelKey());
079        clone.setIcon(getIcon());
080        return clone;
081    }
082
083}