001/** 002 * Copyright 2005-2015 The Kuali Foundation 003 * 004 * Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php 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.kuali.rice.krad.uif.container; 017 018import org.kuali.rice.krad.datadictionary.parse.BeanTag; 019import org.kuali.rice.krad.datadictionary.parse.BeanTagAttribute; 020import org.kuali.rice.krad.datadictionary.parse.BeanTags; 021 022/** 023 * Special <code>Group</code> that presents a grouping on links, which can 024 * also include nested groupings of links 025 * 026 * <p> 027 * Generally this group outputs a list of <code>LinkField</code> instances, however 028 * it can be configured to place separates between the fields and also delimiters 029 * for the grouping 030 * </p> 031 * 032 * @author Kuali Rice Team (rice.collab@kuali.org) 033 */ 034@BeanTags({@BeanTag(name = "linkGroup", parent = "Uif-LinkGroup"), 035 @BeanTag(name = "linkSubGroup", parent = "Uif-LinkSubGroup")}) 036public class LinkGroup extends GroupBase { 037 private static final long serialVersionUID = -4173031543626881250L; 038 039 private String groupBeginDelimiter; 040 private String groupEndDelimiter; 041 private String linkSeparator; 042 private String emptyLinkGroupString; 043 044 public LinkGroup() { 045 super(); 046 } 047 048 /** 049 * String that will be rendered before the group of links are rendered 050 * 051 * <p> 052 * If the list of links is empty, the start delimiter will not be 053 * rendered but instead the #emptyLinkGroupString will be outputted 054 * </p> 055 * 056 * e.g. '[' 057 * 058 * @return group begin delimiter 059 */ 060 @BeanTagAttribute 061 public String getGroupBeginDelimiter() { 062 return groupBeginDelimiter; 063 } 064 065 /** 066 * Setter for the group begin delimiter 067 * 068 * @param groupBeginDelimiter 069 */ 070 public void setGroupBeginDelimiter(String groupBeginDelimiter) { 071 this.groupBeginDelimiter = groupBeginDelimiter; 072 } 073 074 /** 075 * String that will be rendered after the group of links are rendered 076 * 077 * <p> 078 * If the list of links is empty, the end delimiter will not be 079 * rendered but instead the #emptyLinkGroupString will be outputted 080 * </p> 081 * 082 * e.g. ']' 083 * 084 * @return group end delimiter 085 */ 086 @BeanTagAttribute 087 public String getGroupEndDelimiter() { 088 return groupEndDelimiter; 089 } 090 091 /** 092 * Setter for the group end delimiter 093 * 094 * @param groupEndDelimiter 095 */ 096 public void setGroupEndDelimiter(String groupEndDelimiter) { 097 this.groupEndDelimiter = groupEndDelimiter; 098 } 099 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}