001/* 002 * (C) Copyright 2013 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 * Wojciech Sulejman 016 * Vladimir Pasquier <vpasquier@nuxeo.com> 017 */ 018 019package org.nuxeo.ecm.platform.signature.core.sign; 020 021import org.nuxeo.common.xmap.annotation.XNode; 022import org.nuxeo.common.xmap.annotation.XObject; 023 024/** 025 * Provides default values for signing services. 026 * 027 * @author <a href="mailto:ws@nuxeo.com">Wojciech Sulejman</a> 028 */ 029@XObject("configuration") 030public class SignatureDescriptor { 031 032 @XNode("@id") 033 protected String id; 034 035 @XNode("reason") 036 protected String reason; 037 038 @XNode("layout") 039 protected SignatureLayout signatureLayout; 040 041 /** 042 * @since 5.8 Definition of the layout applied on signatures. 043 */ 044 @XObject("layout") 045 public static class SignatureLayout { 046 047 @XNode("@lines") 048 protected Integer lines = 5; 049 050 @XNode("@columns") 051 protected Integer columns = 3; 052 053 @XNode("@startLine") 054 protected Integer startLine = 1; 055 056 @XNode("@startColumn") 057 protected Integer startColumn = 1; 058 059 @XNode("@textSize") 060 protected Integer textSize = 9; 061 062 public Integer getLines() { 063 return lines; 064 } 065 066 public Integer getColumns() { 067 return columns; 068 } 069 070 public Integer getStartLine() { 071 return startLine; 072 } 073 074 public Integer getStartColumn() { 075 return startColumn; 076 } 077 078 public Integer getTextSize() { 079 return textSize; 080 } 081 } 082 083 public SignatureLayout getSignatureLayout() { 084 return signatureLayout; 085 } 086 087 public String getReason() { 088 return reason; 089 } 090 091 public void setReason(String reason) { 092 this.reason = reason; 093 } 094 095 public String getId() { 096 return id; 097 } 098 099 private boolean remove; 100 101 @XNode("removeExtension") 102 protected void setRemoveExtension(boolean remove) { 103 this.remove = remove; 104 } 105 106 public boolean getRemoveExtension() { 107 return remove; 108 } 109 110}