001/* 002 * (C) Copyright 2015 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-2.1.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 * Nicolas Chapurlat <nchapurlat@nuxeo.com> 016 */ 017 018package org.nuxeo.ecm.core.io.registry; 019 020import org.nuxeo.common.xmap.annotation.XNode; 021import org.nuxeo.common.xmap.annotation.XObject; 022 023/** 024 * POJO used to handle "register" {@link MarshallerRegistry} extension point. 025 * 026 * @since 7.2 027 */ 028@XObject("register") 029public class MarshallerRegistryDescriptor { 030 031 @XNode("@class") 032 private Class<?> clazz; 033 034 @XNode("@enable") 035 private boolean enable; 036 037 public MarshallerRegistryDescriptor() { 038 } 039 040 public MarshallerRegistryDescriptor(Class<?> clazz, boolean enable) { 041 super(); 042 this.clazz = clazz; 043 this.enable = enable; 044 } 045 046 public Class<?> getClazz() { 047 return clazz; 048 } 049 050 public void setClazz(Class<?> clazz) { 051 this.clazz = clazz; 052 } 053 054 public boolean isEnable() { 055 return enable; 056 } 057 058 public void setEnable(boolean enable) { 059 this.enable = enable; 060 } 061 062 @Override 063 public String toString() { 064 return clazz.getName() + ":" + Boolean.toString(enable); 065 } 066 067}