| 1 | | | |
| 2 | | | |
| 3 | | | |
| 4 | | | |
| 5 | | | |
| 6 | | | |
| 7 | | | |
| 8 | | | |
| 9 | | | |
| 10 | | | |
| 11 | | | |
| 12 | | | |
| 13 | | | |
| 14 | | | |
| 15 | | | |
| 16 | | | |
| 17 | | | |
| 18 | | | |
| 19 | | | |
| 20 | | | |
| 21 | | | |
| 22 | | | |
| 23 | | | |
| 24 | | | |
| 25 | | | |
| 26 | | | |
| 27 | | | |
| 28 | | | |
| 29 | | | |
| 30 | | | |
| 31 | | | |
| 32 | | | |
| 33 | | | package org.jcoderz.commons.config; |
| 34 | | | |
| 35 | | | import java.rmi.RemoteException; |
| 36 | | | import java.util.Set; |
| 37 | | | |
| 38 | | | |
| 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) | |
| 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 | | | } |
| 138 | | | |