View Javadoc
1 /*** 2 * Copyright (c) 2002, CodeStreet LLC. All rights reserved.<p> 3 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following 4 * conditions are met:<p> 5 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 6 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer 7 * in the documentation and/or other materials provided with the distribution. Neither the name of CodeStreet LLC. nor the 8 * names of its contributors may be used to endorse or promote products derived from this software without specific prior written 9 * permission.<p> 10 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT 11 * NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 12 * THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 13 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 14 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 15 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.<p> 16 */ 17 18 package com.codestreet.messageforge; 19 20 /*** 21 * This class represents a required field specification. A message can specify 22 * a set of fields that are required when one or more conditions are satisfied.<br> 23 * 24 * For example, a message can specify that fields X, Y, and Z must be set (even 25 * though one or more of them are optional) when the value of field A is 'Foo' 26 * and the value of field B is 'Goo'.<br> 27 * @author Jawaid Hakim. 28 */ 29 public class RRequiredGrp implements java.io.Serializable 30 { 31 // Generated by serialver 32 static final long serialVersionUID = -5274287757301941405L; 33 34 /*** 35 * Ctor. 36 * @param condFldNames Conditional field names. 37 * @param condFldValues Conditional values. 38 * @param reqFields Required field names. 39 * @see RMsg 40 */ 41 public RRequiredGrp(String[] condFldNames, String[] condFldValues, String[] reqFields) 42 { 43 condFldNames_ = condFldNames; 44 condFldValues_ = condFldValues; 45 reqFields_ = reqFields; 46 } 47 48 /*** 49 * Get the names of the conditional fields. 50 * @return Names of the conditional fields. 51 */ 52 public final String[] getConditionalFields() 53 { 54 return condFldNames_; 55 } 56 57 /*** 58 * Get the conditional field values. 59 * @return Conditional field values. 60 */ 61 public final String[] getConditionalValues() 62 { 63 return condFldValues_; 64 } 65 66 /*** 67 * Get the names of the required fields. 68 * @return Names of the required fields. 69 */ 70 public final String[] getRequiredFields() 71 { 72 return reqFields_; 73 } 74 75 /*** 76 * Conditional field names. 77 */ 78 private final String[] condFldNames_; 79 80 /*** 81 * Conditional field values. 82 */ 83 private final String[] condFldValues_; 84 85 /*** 86 * Required field names. 87 */ 88 private final String[] reqFields_; 89 }

This page was automatically generated by Maven