| 
 | Cumulus4j API (1.2.0-SNAPSHOT) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cumulus4j.keymanager.api.internal.AbstractKeyManagerAPI
org.cumulus4j.keymanager.api.internal.remote.RemoteKeyManagerAPI
public class RemoteKeyManagerAPI
| Field Summary | 
|---|
| Fields inherited from class org.cumulus4j.keymanager.api.internal.AbstractKeyManagerAPI | 
|---|
| FILE_URL_PREFIX | 
| Constructor Summary | |
|---|---|
| RemoteKeyManagerAPI() | |
| Method Summary | |
|---|---|
| protected static String | appendFinalSlash(String url) | 
|  void | deleteUser(String userName)Delete a user. | 
| protected  com.sun.jersey.api.client.Client | getClient() | 
|  CryptoSession | getCryptoSession(String appServerBaseURL)Get a session for a certain application server. | 
|  DateDependentKeyStrategyInitResult | initDateDependentKeyStrategy(DateDependentKeyStrategyInitParam param)Initialise a new key-store with the DateDependentKeyStrategy. | 
|  void | putUser(String userName,
               char[] password)Create a new user or change an existing user's password. | 
|  void | setConfiguration(KeyManagerAPIConfiguration configuration)Set the configuration for this KeyManagerAPIinstance. | 
| protected static void | throwUniformInterfaceExceptionAsAuthenticationException(com.sun.jersey.api.client.UniformInterfaceException x) | 
| protected static void | throwUniformInterfaceExceptionAsIOException(com.sun.jersey.api.client.UniformInterfaceException x) | 
| Methods inherited from class org.cumulus4j.keymanager.api.internal.AbstractKeyManagerAPI | 
|---|
| equals, getAuthPassword, getAuthUserName, getConf, getConfiguration, getKeyManagerBaseURL, getKeyStoreID | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public RemoteKeyManagerAPI()
                    throws KeyManagerAPIInstantiationException
KeyManagerAPIInstantiationException| Method Detail | 
|---|
public void setConfiguration(KeyManagerAPIConfiguration configuration)
                      throws IllegalArgumentException,
                             KeyManagerAPIInstantiationException
KeyManagerAPI
 Set the configuration for this KeyManagerAPI instance.
 
 Before a KeyManagerAPI instance can actually be used, it first needs to be configured. The configuration
 passed to this method will be marked read-only.
 
setConfiguration in interface KeyManagerAPIsetConfiguration in class AbstractKeyManagerAPIconfiguration - the configuration (which will be marked read-only
 by this operation). Must not be null.
IllegalArgumentException - if the configuration is null or incomplete (e.g. configuration.keyStoreID being null).
KeyManagerAPIInstantiationException - if the actual implementation cannot be instantiated.protected static final String appendFinalSlash(String url)
protected com.sun.jersey.api.client.Client getClient()
public DateDependentKeyStrategyInitResult initDateDependentKeyStrategy(DateDependentKeyStrategyInitParam param)
                                                                throws KeyStoreNotEmptyException,
                                                                       IOException
KeyManagerAPIDateDependentKeyStrategy.
param - the settings controlling the details of how to initialise it. Must not be null.
KeyStoreNotEmptyException
IOException
public void putUser(String userName,
                    char[] password)
             throws AuthenticationException,
                    IOException
KeyManagerAPIcurrent user
 is modified, this instance of KeyManagerAPI will be updated with a new configuration, automatically. Other instances of KeyManagerAPI
 - even in the same JVM - are not updated, though.
userName - the name of the new user.password - the password of the new user.
AuthenticationException - if the authUserName or the authPassword is incorrect.
IOException - if the communication with the key-store (either local key-store-file or remote key-server) fails.
public void deleteUser(String userName)
                throws AuthenticationException,
                       CannotDeleteLastUserException,
                       IOException
KeyManagerAPIAuthenticationException.
userName - the name of the user to be deleted.
AuthenticationException - if the authUserName or the authPassword is incorrect.
CannotDeleteLastUserException - if you attempted to delete the last user (which would render the key-store to be totally
 unreadable).
IOException - if the communication with the key-store (either local key-store-file or remote key-server) fails.
public CryptoSession getCryptoSession(String appServerBaseURL)
                               throws IOException,
                                      AuthenticationException
KeyManagerAPIGet a session for a certain application server.
appServerBaseURL - the base-url of the app-server-key-manager-channel (must not be null). This is the part of the URL before the "/KeyManagerChannel" -
 e.g. if the REST URL of the KeyManagerChannel-service is
 "https://serverUsingCumulus4j.mydomain.org/org.cumulus4j.keymanager.back.webapp/KeyManagerChannel", then this must be
 "https://serverUsingCumulus4j.mydomain.org/org.cumulus4j.keymanager.back.webapp".
null.
IOException - if the communication with the key-store (either local key-store-file or remote key-server) fails.
AuthenticationException - if the authUserName or the authPassword is incorrect.
protected static void throwUniformInterfaceExceptionAsAuthenticationException(com.sun.jersey.api.client.UniformInterfaceException x)
                                                                       throws AuthenticationException
AuthenticationException
protected static void throwUniformInterfaceExceptionAsIOException(com.sun.jersey.api.client.UniformInterfaceException x)
                                                           throws IOException
IOException| 
 | Cumulus4j API (1.2.0-SNAPSHOT) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||