|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| EnterpriseProperty.java | 50% | 83.3% | 100% | 81.8% |
|
||||||||||||||
| 1 | /** | |
| 2 | * JTRunner is free software; you can redistribute it and/or modify it under the | |
| 3 | * terms of the GNU General Public License as published by the Free Software | |
| 4 | * Foundation; either version 2, or (at your option) any later version. | |
| 5 | */ | |
| 6 | ||
| 7 | package jtr.config.enterprise; | |
| 8 | ||
| 9 | import java.io.Serializable; | |
| 10 | ||
| 11 | /** | |
| 12 | * Instances of this class all represent single properties belonging to an | |
| 13 | * <code>EnterpriseConfig</code> instance.<br> | |
| 14 | * An enterprise property is a simple name, value pair useful for representing | |
| 15 | * those properties necessary for performing look up operations in a JNDI | |
| 16 | * environment. | |
| 17 | * | |
| 18 | * @author Francesco Russo (frusso@dev.java.net) | |
| 19 | * @version 4.0 | |
| 20 | * @since 1.0 | |
| 21 | */ | |
| 22 | public class EnterpriseProperty implements Serializable { | |
| 23 | /** | |
| 24 | * Constructor. | |
| 25 | */ | |
| 26 | 8 | public EnterpriseProperty() { |
| 27 | } | |
| 28 | ||
| 29 | /** | |
| 30 | * Returns this enterprise property unique name. | |
| 31 | * | |
| 32 | * @return String | |
| 33 | */ | |
| 34 | 16 | public String getName() { |
| 35 | 16 | return name; |
| 36 | } | |
| 37 | ||
| 38 | /** | |
| 39 | * Sets this enterprise property unique name. | |
| 40 | * | |
| 41 | * @param name | |
| 42 | */ | |
| 43 | 16 | public void setName(String name) { |
| 44 | 16 | this.name = name; |
| 45 | } | |
| 46 | ||
| 47 | /** | |
| 48 | * Returns the value of the current enterprise property. | |
| 49 | * | |
| 50 | * @return String | |
| 51 | */ | |
| 52 | 16 | public String getValue() { |
| 53 | 16 | return value; |
| 54 | } | |
| 55 | ||
| 56 | /** | |
| 57 | * Sets the value of the current enterprise property. | |
| 58 | * | |
| 59 | * @param value | |
| 60 | * String | |
| 61 | */ | |
| 62 | 16 | public void setValue(String value) { |
| 63 | 16 | this.value = value; |
| 64 | } | |
| 65 | ||
| 66 | ||
| 67 | /** | |
| 68 | * @see java.lang.Object#toString() | |
| 69 | */ | |
| 70 | 30133 | public String toString() { |
| 71 | 30133 | String res = ""; |
| 72 | 30135 | if (name != null) { |
| 73 | 30139 | res = res + name + "="; |
| 74 | } else { | |
| 75 | 0 | res = res + "null="; |
| 76 | } | |
| 77 | 30126 | if (value != null) { |
| 78 | 30123 | res = res + value; |
| 79 | } else { | |
| 80 | 0 | res = res + "null"; |
| 81 | } | |
| 82 | 30130 | return res; |
| 83 | } | |
| 84 | ||
| 85 | private String name; | |
| 86 | ||
| 87 | private String value; | |
| 88 | } |
|
||||||||||