TrueZIP Driver TZP (ZIP.RAES) 7.0-rc1

de.schlichtherle.truezip.key
Interface KeyManager<K,P extends KeyProvider<K>>

Type Parameters:
K - The type of the keys.
P - The type of the providers.
All Known Implementing Classes:
PromptingKeyManager, SafeKeyManager

@DefaultAnnotation(value=edu.umd.cs.findbugs.annotations.NonNull.class)
public interface KeyManager<K,P extends KeyProvider<K>>

A container for key providers for protected resources which need to get created or opened by client applications.

Implementations must be safe for multi-threading.

Author:
Christian Schlichtherle

Method Summary
 P getKeyProvider(URI resource)
          Returns the key provider for the given protected resource.
 boolean moveKeyProvider(URI oldResource, URI newResource)
          Moves the key provider from the URI oldResource to newResource.
 boolean removeKeyProvider(URI resource)
          Removes the key provider for the given protected resource.
 

Method Detail

getKeyProvider

P getKeyProvider(URI resource)
Returns the key provider for the given protected resource. If no key provider is mapped, a new key provider is created and returned.

Parameters:
resource - the URI of the protected resource.
Returns:
The key provider mapped for the protected resource.

moveKeyProvider

boolean moveKeyProvider(URI oldResource,
                        URI newResource)
Moves the key provider from the URI oldResource to newResource.

Parameters:
oldResource - the old URI of the protected resource.
newResource - the new URI of the protected resource.
Returns:
whether or not the operation succeeded, i.e. if a key provider was present for the old URI.

removeKeyProvider

boolean removeKeyProvider(URI resource)
Removes the key provider for the given protected resource.

Parameters:
resource - the URI of the protected resource.
Returns:
whether or not the operation succeeded, i.e. if a key provider was present for the old URI.

TrueZIP Driver TZP (ZIP.RAES) 7.0-rc1

Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.