001/* 002 * Copyright 2010 Anyware Services 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 */ 016package org.ametys.cms.contenttype; 017 018import org.ametys.runtime.i18n.I18nizableText; 019 020/** 021 * Repeater definition. 022 * @deprecated Use {@link org.ametys.cms.model.ContentRestrictedRepeaterDefinition} instead 023 */ 024@Deprecated 025public class RepeaterDefinition extends MetadataDefinition 026{ 027 private int _initializeSize; 028 private int _minSize; 029 private int _maxSize; 030 private I18nizableText _addLabel; 031 private I18nizableText _delLabel; 032 private String _headerLabel; 033 034 /** 035 * Retrieves the initial size. 036 * @return the initial size. 037 */ 038 public int getInitialSize() 039 { 040 return _initializeSize; 041 } 042 043 /** 044 * Set the initial size. 045 * @param size the initial size. 046 */ 047 public void setInitialSize(int size) 048 { 049 _initializeSize = size; 050 } 051 052 /** 053 * Retrieves the minimum size. 054 * @return the minimum size. 055 */ 056 public int getMinSize() 057 { 058 return _minSize; 059 } 060 061 /** 062 * Set the minimum size. 063 * @param size the minimum size. 064 */ 065 public void setMinSize(int size) 066 { 067 _minSize = size; 068 } 069 070 /** 071 * Retrieves the maximum size. 072 * @return the maximum size or <code>-1</code> if unbounded. 073 */ 074 public int getMaxSize() 075 { 076 return _maxSize; 077 } 078 079 /** 080 * Set the maximum size. 081 * @param size the maximum size or <code>-1</code> if unbounded. 082 */ 083 public void setMaxSize(int size) 084 { 085 _maxSize = size; 086 } 087 088 /** 089 * Retrieves the add label. 090 * @return the add label or <code>null</code> if none. 091 */ 092 public I18nizableText getAddLabel() 093 { 094 return _addLabel; 095 } 096 097 /** 098 * Set the add label. 099 * @param label the add label or <code>null</code> if none. 100 */ 101 public void setAddLabel(I18nizableText label) 102 { 103 _addLabel = label; 104 } 105 106 /** 107 * Retrieves the delete label. 108 * @return the delete label or <code>null</code> if none. 109 */ 110 public I18nizableText getDeleteLabel() 111 { 112 return _delLabel; 113 } 114 115 /** 116 * Set the delete label. 117 * @param label the delete label or <code>null</code> if none. 118 */ 119 public void setDeleteLabel(I18nizableText label) 120 { 121 _delLabel = label; 122 } 123 124 /** 125 * Get the header label. 126 * @return the header label or <code>null</code> if none. 127 */ 128 public String getHeaderLabel() 129 { 130 return _headerLabel; 131 } 132 133 /** 134 * Set the header label. 135 * @param label the header label or <code>null</code> if none. 136 */ 137 public void setHeaderLabel(String label) 138 { 139 _headerLabel = label; 140 } 141 142 @Override 143 public String toString() 144 { 145 return "REPEATER " + super.toString(); 146 } 147}