1 /** 2 * Copyright 2005-2016 The Kuali Foundation 3 * 4 * Licensed under the Educational Community License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.opensource.org/licenses/ecl2.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.kuali.rice.krad.uif.container; 17 18 import org.kuali.rice.krad.datadictionary.parse.BeanTag; 19 import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; 20 import org.kuali.rice.krad.datadictionary.parse.BeanTags; 21 22 /** 23 * Special <code>Group</code> that presents a grouping on links, which can 24 * also include nested groupings of links 25 * 26 * <p> 27 * Generally this group outputs a list of <code>LinkField</code> instances, however 28 * it can be configured to place separates between the fields and also delimiters 29 * for the grouping 30 * </p> 31 * 32 * @author Kuali Rice Team (rice.collab@kuali.org) 33 */ 34 @BeanTags({@BeanTag(name = "linkGroup", parent = "Uif-LinkGroup"), 35 @BeanTag(name = "linkSubGroup", parent = "Uif-LinkSubGroup")}) 36 public class LinkGroup extends GroupBase { 37 private static final long serialVersionUID = -4173031543626881250L; 38 39 private String groupBeginDelimiter; 40 private String groupEndDelimiter; 41 private String linkSeparator; 42 private String emptyLinkGroupString; 43 44 public LinkGroup() { 45 super(); 46 } 47 48 /** 49 * String that will be rendered before the group of links are rendered 50 * 51 * <p> 52 * If the list of links is empty, the start delimiter will not be 53 * rendered but instead the #emptyLinkGroupString will be outputted 54 * </p> 55 * 56 * e.g. '[' 57 * 58 * @return group begin delimiter 59 */ 60 @BeanTagAttribute 61 public String getGroupBeginDelimiter() { 62 return groupBeginDelimiter; 63 } 64 65 /** 66 * Setter for the group begin delimiter 67 * 68 * @param groupBeginDelimiter 69 */ 70 public void setGroupBeginDelimiter(String groupBeginDelimiter) { 71 this.groupBeginDelimiter = groupBeginDelimiter; 72 } 73 74 /** 75 * String that will be rendered after the group of links are rendered 76 * 77 * <p> 78 * If the list of links is empty, the end delimiter will not be 79 * rendered but instead the #emptyLinkGroupString will be outputted 80 * </p> 81 * 82 * e.g. ']' 83 * 84 * @return group end delimiter 85 */ 86 @BeanTagAttribute 87 public String getGroupEndDelimiter() { 88 return groupEndDelimiter; 89 } 90 91 /** 92 * Setter for the group end delimiter 93 * 94 * @param groupEndDelimiter 95 */ 96 public void setGroupEndDelimiter(String groupEndDelimiter) { 97 this.groupEndDelimiter = groupEndDelimiter; 98 } 99 100 /** 101 * String that will be rendered between each rendered link 102 * 103 * e.g. '|' 104 * 105 * @return link separator 106 */ 107 @BeanTagAttribute 108 public String getLinkSeparator() { 109 return linkSeparator; 110 } 111 112 /** 113 * Setter for the link separator 114 * 115 * @param linkSeparator 116 */ 117 public void setLinkSeparator(String linkSeparator) { 118 this.linkSeparator = linkSeparator; 119 } 120 121 /** 122 * String that will be outputted when the list backing the 123 * link group is empty 124 * 125 * @return empty group string 126 */ 127 @BeanTagAttribute 128 public String getEmptyLinkGroupString() { 129 return emptyLinkGroupString; 130 } 131 132 /** 133 * Setter for the empty group string 134 * 135 * @param emptyLinkGroupString 136 */ 137 public void setEmptyLinkGroupString(String emptyLinkGroupString) { 138 this.emptyLinkGroupString = emptyLinkGroupString; 139 } 140 141 }