| Line | Hits | Note | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * $Id: ConfigurationServiceCommonInterface.java 1011 2008-06-16 17:57:36Z amandel $ | ||
| 3 | * | ||
| 4 | * Copyright 2006, The jCoderZ.org Project. All rights reserved. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions are | ||
| 8 | * met: | ||
| 9 | * | ||
| 10 | * * Redistributions of source code must retain the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer. | ||
| 12 | * * Redistributions in binary form must reproduce the above | ||
| 13 | * copyright notice, this list of conditions and the following | ||
| 14 | * disclaimer in the documentation and/or other materials | ||
| 15 | * provided with the distribution. | ||
| 16 | * * Neither the name of the jCoderZ.org Project nor the names of | ||
| 17 | * its contributors may be used to endorse or promote products | ||
| 18 | * derived from this software without specific prior written | ||
| 19 | * permission. | ||
| 20 | * | ||
| 21 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS" AND | ||
| 22 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 23 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 24 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS | ||
| 25 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
| 26 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
| 27 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
| 28 | * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | ||
| 29 | * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | ||
| 30 | * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | ||
| 31 | * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 32 | */ | ||
| 33 | package org.jcoderz.commons.config; | ||
| 34 | |||
| 35 | import java.rmi.RemoteException; | ||
| 36 | |||
| 37 | import org.jcoderz.commons.ArgumentMalformedException; | ||
| 38 | |||
| 39 | /** | ||
| 40 | * Common ConfigurationService's business interface with | ||
| 41 | * getter method to get configuration parameters. | ||
| 42 | * | ||
| 43 | * On this level only primitve types String, int, long and boolean are used. | ||
| 44 | * The wellformed and complex typed interfaces for the specific services are | ||
| 45 | * using this more simple interface. | ||
| 46 | * | ||
| 47 | */ | ||
| 48 | (1) | public interface ConfigurationServiceCommonInterface | |
| 49 | { | ||
| 50 | /** | ||
| 51 | * Returns the boolean value that is associated with the given key. | ||
| 52 | * | ||
| 53 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 54 | * value. | ||
| 55 | * @return the boolean value that is associated with the given key. | ||
| 56 | * @throws RemoteException if a remote call fails. | ||
| 57 | * @throws ConfigurationValueNotFoundException in case there is no match to | ||
| 58 | * key. | ||
| 59 | * @throws ConfigurationTypeConversionFailedException in case the found value | ||
| 60 | * could not be converted to boolean type. | ||
| 61 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 62 | * of a null object as input parameter. | ||
| 63 | */ | ||
| 64 | boolean getBoolean (ConfigurationKey key) | ||
| 65 | throws RemoteException, ConfigurationValueNotFoundException, | ||
| 66 | ConfigurationTypeConversionFailedException, | ||
| 67 | ArgumentMalformedException; | ||
| 68 | |||
| 69 | |||
| 70 | /** | ||
| 71 | * Returns the int value that is associated with the given key. | ||
| 72 | * | ||
| 73 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 74 | * value. | ||
| 75 | * @return the int value that is associated with the given key. | ||
| 76 | * @throws RemoteException if a remote call fails. | ||
| 77 | * @throws ConfigurationValueNotFoundException in case there is no match to | ||
| 78 | * the key. | ||
| 79 | * @throws ConfigurationTypeConversionFailedException in case the found value | ||
| 80 | * could not be converted to int type. | ||
| 81 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 82 | * of a null object as input parameter. | ||
| 83 | * @throws NumberFormatException in case the stored value cannot be | ||
| 84 | * converted into an int | ||
| 85 | */ | ||
| 86 | int getInt (ConfigurationKey key) | ||
| 87 | throws RemoteException, ConfigurationValueNotFoundException, | ||
| 88 | ConfigurationTypeConversionFailedException, | ||
| 89 | ArgumentMalformedException, NumberFormatException; | ||
| 90 | |||
| 91 | |||
| 92 | /** | ||
| 93 | * Returns the long value that is associated with the given key. | ||
| 94 | * | ||
| 95 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 96 | * value. | ||
| 97 | * @return the long value that is associated with the given key. | ||
| 98 | * @throws RemoteException if a remote call fails. | ||
| 99 | * @throws ConfigurationValueNotFoundException in case there is no match to | ||
| 100 | * the key. | ||
| 101 | * @throws ConfigurationTypeConversionFailedException in case the found value | ||
| 102 | * could not be converted to long type. | ||
| 103 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 104 | * of a null object as input parameter. | ||
| 105 | */ | ||
| 106 | long getLong (ConfigurationKey key) | ||
| 107 | throws RemoteException, ConfigurationValueNotFoundException, | ||
| 108 | ConfigurationTypeConversionFailedException, | ||
| 109 | ArgumentMalformedException; | ||
| 110 | |||
| 111 | |||
| 112 | /** | ||
| 113 | * Returns the String value that is associated with the given key. | ||
| 114 | * | ||
| 115 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 116 | * value. | ||
| 117 | * @return the String value that is associated with the given key. | ||
| 118 | * @throws RemoteException if a remote call fails. | ||
| 119 | * @throws ConfigurationValueNotFoundException in case there is no match to | ||
| 120 | * the key. | ||
| 121 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 122 | * of a null object as input parameter. | ||
| 123 | */ | ||
| 124 | String getString (ConfigurationKey key) | ||
| 125 | throws RemoteException, ConfigurationValueNotFoundException, | ||
| 126 | ArgumentMalformedException; | ||
| 127 | |||
| 128 | } |
|
|
(1) | 48 | : | 0 | Type Javadoc comment is missing an @author tag. |