View Javadoc
1 /* 2 * $Id: UtilityBean.java,v 1.1 2003/10/02 01:26:59 smulube Exp $ 3 * 4 * ***** BEGIN LICENSE BLOCK ***** 5 * =========================================================================== 6 * Copyright (c) 2003 Sam Mulube 7 * 8 * Permission is hereby granted, free of charge, to any person obtaining a copy 9 * of this software and associated documentation files (the "Software"), to deal 10 * in the Software without restriction, including without limitation the rights 11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 * copies of the Software, and to permit persons to whom the Software is 13 * furnished to do so, subject to the following conditions: 14 * 15 * The above copyright notice and this permission notice shall be included in 16 * all copies or substantial portions of the Software. 17 * 18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 24 * SOFTWARE.COPYRIGHT AND PERMISSION NOTICE 25 * =========================================================================== 26 * ***** END LICENSE BLOCK ***** 27 */ 28 package org.zerofun.maven.im.beans; 29 30 import org.apache.commons.lang.StringUtils; 31 32 /*** 33 * Some simple utility methods for the Maven IM plugin. 34 * 35 * @author <a href="mailto:sam@mulube.com">Sam Mulube</a> 36 * @version $Revision: 1.1 $ 37 * 38 */ 39 public class UtilityBean { 40 41 /*** 42 * Parses a string which may contain either a single recipient, or a comma 43 * separated list of recipients, and spits out an array of strings, each one 44 * of which is a single recipient. 45 * 46 * @param recipients the comma separated list of recipients 47 * @return an array of recipients 48 */ 49 public static String[] getRecipients(String recipients) { 50 return StringUtils.stripAll(StringUtils.split(StringUtils.strip(recipients), ",")); 51 } 52 } 53 54 /* 55 * $Log: UtilityBean.java,v $ 56 * Revision 1.1 2003/10/02 01:26:59 smulube 57 * moved string manipulation method into this bean. 58 * 59 */

This page was automatically generated by Maven