| Line | Hits | Note | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * $Id: ConfigurationServiceAdminInterface.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 | import java.util.Set; | ||
| 37 | |||
| 38 | //import org.jcoderz.commons.ArgumentMalformedException; | ||
| 39 | |||
| 40 | /** | ||
| 41 | * ConfigurationService's Administration interface. | ||
| 42 | * | ||
| 43 | * This class holds all business logic of the service related to administrative | ||
| 44 | * tasks like getting all configuration keys or single configuration values. | ||
| 45 | * | ||
| 46 | * For future releases the modification or update mechanisms to manipulate | ||
| 47 | * configuration data will be extended here. | ||
| 48 | * | ||
| 49 | */ | ||
| 50 | (1) | public interface ConfigurationServiceAdminInterface | |
| 51 | extends ConfigurationServiceCommonInterface | ||
| 52 | { | ||
| 53 | /** | ||
| 54 | * Returns an immutable Set containing all keys present in the | ||
| 55 | * configuration. The keys are <code>ConfigurationKey</code> objects. | ||
| 56 | * In case there are no keys, the Set is empty. | ||
| 57 | * | ||
| 58 | * @return the Set of all existing <code>ConfigurationKey</code> objects. | ||
| 59 | * Or empty set if no data is stored. | ||
| 60 | * @throws RemoteException if a remote call fails. | ||
| 61 | * @throws ConfigurationInitializationFailedException if the requested | ||
| 62 | * configuration keys could not be fetched, or if a key could not be | ||
| 63 | * transformed to a valid ConfigurationKey instance. | ||
| 64 | * This could only occur, for general config resource problems, | ||
| 65 | * therefor the initialization failure is thrown instead of the | ||
| 66 | * underlying ArgumentMalformedException. | ||
| 67 | */ | ||
| 68 | Set getKeys () | ||
| 69 | throws RemoteException, ConfigurationInitializationFailedException; | ||
| 70 | |||
| 71 | (2) | // TODO: define setter methods | |
| 72 | /** | ||
| 73 | * Stores the boolean value that is associated with the given key into | ||
| 74 | * the configuration. | ||
| 75 | * | ||
| 76 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 77 | * value | ||
| 78 | * @param value boolean value that represents a configuration parameter | ||
| 79 | * @throws RemoteException if a remote call fails. | ||
| 80 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 81 | * of a null object as input parameter. | ||
| 82 | * | ||
| 83 | void setBoolean (ConfigurationKey key, boolean value) | ||
| 84 | throws RemoteException, ArgumentMalformedException; | ||
| 85 | */ | ||
| 86 | |||
| 87 | /** | ||
| 88 | * Stores the int value that is associated with the given key into | ||
| 89 | * the configuration. | ||
| 90 | * | ||
| 91 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 92 | * value | ||
| 93 | * @param value int value that represents a configuration parameter | ||
| 94 | * @return the previous "new value" | ||
| 95 | * @throws RemoteException if a remote call fails. | ||
| 96 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 97 | * of a null object as input parameter. | ||
| 98 | * | ||
| 99 | void setInt (ConfigurationKey key, int value) | ||
| 100 | throws RemoteException, ArgumentMalformedException; | ||
| 101 | */ | ||
| 102 | |||
| 103 | /** | ||
| 104 | * Stores the long value that is associated with the given key into | ||
| 105 | * the configuration. | ||
| 106 | * | ||
| 107 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 108 | * value | ||
| 109 | * @param value long value that represents a configuration parameter | ||
| 110 | * @throws RemoteException if a remote call fails. | ||
| 111 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 112 | * of a null object as input parameter. | ||
| 113 | * | ||
| 114 | void setLong (ConfigurationKey key, long value) | ||
| 115 | throws RemoteException, ArgumentMalformedException; | ||
| 116 | */ | ||
| 117 | |||
| 118 | /** | ||
| 119 | * Stores the String value that is associated with the given key into | ||
| 120 | * the configuration. The String must not exceed 1000 characters in length. | ||
| 121 | * | ||
| 122 | * @param key ConfigurationKey that is the key for a stored configuration | ||
| 123 | * value | ||
| 124 | * @param value String value that represent a configuration parameter | ||
| 125 | * @throws RemoteException if a remote call fails. | ||
| 126 | * @throws ConfigurationObjectSizeExceededException in case the parameter | ||
| 127 | * 'value' exceeds 1000 in length. | ||
| 128 | * @throws ArgumentMalformedException Is thrown to indicate the illegal use | ||
| 129 | * of a null object as input parameter.<br> | ||
| 130 | * It is not allowed to use null for parameter value. | ||
| 131 | * | ||
| 132 | void setString (ConfigurationKey key, String value) | ||
| 133 | throws RemoteException, ConfigurationObjectSizeExceededException, | ||
| 134 | ArgumentMalformedException; | ||
| 135 | */ | ||
| 136 | |||
| 137 | } |
|
|
(1) | 50 | : | 0 | Type Javadoc comment is missing an @author tag. |
|
|
(2) | 71 | : | 0 | Comment matches to-do format '(TODO|FIXME|CHECKME)'. |