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