View Javadoc
1 /* 2 * (C) 2002 David Carr david@carr.name 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * 9 * This program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with this program; if not, write to the Free Software 16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 */ 18 19 package net.sourceforge.mflow.api; 20 21 /*** 22 * A class for representing an entity with which communication can occur 23 * Serves primarily as a repository for ContactMethods, associated with a name 24 * 25 * @author <a href="mailto:david@carr.name">David Carr</a> 26 * @version $Revision: 1.3 $ 27 */ 28 public interface Contact { 29 /*** 30 * Mutator for the name 31 * 32 * @param name the new name 33 */ 34 void setName(String name); 35 36 /*** 37 * Accessor for the name 38 * 39 * @return the name 40 */ 41 String getName(); 42 43 /*** 44 * Adds a ContactMethod 45 * 46 * @param cm the ContactMethod to add 47 */ 48 void addContactMethod(ContactMethod cm); 49 50 /*** 51 * Removes a ContactMethod if it is a member of this Contact 52 * 53 * @param cm the ContactMethod to remove 54 */ 55 void removeContactMethod(ContactMethod cm); 56 57 /*** 58 * Accessor for all of the ContactMethods associated with this Contact 59 * 60 * @return an array of ContactMethods 61 */ 62 ContactMethod[] getContactMethods(); 63 64 /*** 65 * Mutator for all of the ContactMethods associated with this Contact 66 * 67 * @param cms an array of ContactMethods 68 */ 69 void setContactMethods(ContactMethod[] cms); 70 71 /*** 72 * Accessor for a single ContactMethod associated with this Contact 73 * 74 * @param index the index of the ContactMethod to return 75 * @return the ContactMethod at the specified index 76 */ 77 ContactMethod getContactMethods(int index); 78 79 /*** 80 * Mutator for a single ContactMethod associated with this Contact 81 * 82 * @param index the index of the ContactMethod to change 83 * @param cm the ContactMethod to set 84 */ 85 void setContactMethods(int index, ContactMethod cm); 86 }

This page was automatically generated by Maven