001/* 002 * Copyright (c) 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * All rights reserved. This program and the accompanying materials 005 * are made available under the terms of the Eclipse Public License v1.0 006 * which accompanies this distribution, and is available at 007 * http://www.eclipse.org/legal/epl-v10.html 008 * 009 * Contributors: 010 * matic 011 */ 012package org.nuxeo.ecm.core.management.probes; 013 014import org.nuxeo.common.xmap.annotation.XNode; 015import org.nuxeo.common.xmap.annotation.XObject; 016import org.nuxeo.ecm.core.management.api.Probe; 017 018/** 019 * @author Stephane Lacoin (Nuxeo EP Software Engineer) 020 */ 021@XObject("probe") 022public class ProbeDescriptor { 023 024 @XNode("@name") 025 private String shortcutName; 026 027 @XNode("@qualifiedName") 028 private String qualifiedName; 029 030 @XNode("@class") 031 private Class<? extends Probe> probeClass; 032 033 @XNode("label") 034 private String label; 035 036 @XNode("description") 037 private String description; 038 039 public String getLabel() { 040 if (label == null) { 041 return "label." + shortcutName; 042 } 043 return label; 044 } 045 046 public String getDescription() { 047 if (description == null) { 048 return "description." + shortcutName; 049 } 050 return description; 051 } 052 053 public String getShortcut() { 054 return shortcutName; 055 } 056 057 public String getQualifiedName() { 058 return qualifiedName; 059 } 060 061 public Class<? extends Probe> getProbeClass() { 062 return probeClass; 063 } 064 065}