001/* 002 * (C) Copyright 2014 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.api.validation; 019 020import org.nuxeo.common.xmap.annotation.XNode; 021import org.nuxeo.common.xmap.annotation.XObject; 022 023/** 024 * Handler for the {@link DocumentValidationService} "activations" extension point. 025 * 026 * @since 7.1 027 */ 028@XObject("validation") 029public class DocumentValidationDescriptor { 030 031 @XNode("@context") 032 private String context; 033 034 @XNode("@activated") 035 private boolean activated; 036 037 public DocumentValidationDescriptor() { 038 } 039 040 public DocumentValidationDescriptor(String context, boolean activated) { 041 super(); 042 this.context = context; 043 this.activated = activated; 044 } 045 046 public String getContext() { 047 return context; 048 } 049 050 public void setContext(String context) { 051 this.context = context; 052 } 053 054 public boolean isActivated() { 055 return activated; 056 } 057 058 public void setActivated(boolean activated) { 059 this.activated = activated; 060 } 061 062 @Override 063 public String toString() { 064 return context + ": " + activated; 065 } 066 067}