Class MasterSourceLookupDispatcher
java.lang.Object
org.codehaus.plexus.components.secdispatcher.internal.dispatchers.MasterSourceLookupDispatcher
- All Implemented Interfaces:
Dispatcher
,DispatcherMeta
@Singleton
@Named("masterSourceLookup")
public class MasterSourceLookupDispatcher
extends Object
implements Dispatcher, DispatcherMeta
This dispatcher does not actually perform any crypto operations, but just forwards the string to be decrypted
to a
MasterSource
. The given string is supposed to contain a valid source reference which is resolvable
by one of the bound MasterSource
implementations (and not actually an encrypted value).
This dispatcher doesn't support encryption, but just validates and returns the given master source reference.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.codehaus.plexus.components.secdispatcher.Dispatcher
Dispatcher.EncryptPayload
Nested classes/interfaces inherited from interface org.codehaus.plexus.components.secdispatcher.DispatcherMeta
DispatcherMeta.Field
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecrypt given encrypted string.Returns the display (human) name of the dispatcher.Encrypt given plaintext string.fields()
Returns the configuration fields of the dispatcher.name()
The name of the dispatcher.validateConfiguration
(Map<String, String> config) Validates dispatcher configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.codehaus.plexus.components.secdispatcher.DispatcherMeta
isHidden
-
Field Details
-
NAME
- See Also:
-
sources
-
-
Constructor Details
-
MasterSourceLookupDispatcher
-
-
Method Details
-
name
Description copied from interface:DispatcherMeta
The name of the dispatcher.- Specified by:
name
in interfaceDispatcherMeta
-
displayName
Description copied from interface:DispatcherMeta
Returns the display (human) name of the dispatcher.- Specified by:
displayName
in interfaceDispatcherMeta
-
fields
Description copied from interface:DispatcherMeta
Returns the configuration fields of the dispatcher.- Specified by:
fields
in interfaceDispatcherMeta
-
encrypt
public Dispatcher.EncryptPayload encrypt(String str, Map<String, String> attributes, Map<String, throws SecDispatcherExceptionString> config) Description copied from interface:Dispatcher
Encrypt given plaintext string. Implementation must return at least same attributes it got, but may add more attributes to returned payload.- Specified by:
encrypt
in interfaceDispatcher
- Parameters:
str
- string to encrypt, nevernull
attributes
- attributes, nevernull
config
- configuration from settings-security.xml, nevernull
- Returns:
- encrypted string and attributes in
Dispatcher.EncryptPayload
- Throws:
SecDispatcherException
-
decrypt
public String decrypt(String str, Map<String, String> attributes, Map<String, throws SecDispatcherExceptionString> config) Description copied from interface:Dispatcher
Decrypt given encrypted string.- Specified by:
decrypt
in interfaceDispatcher
- Parameters:
str
- string to decrypt, nevernull
attributes
- attributes, nevernull
config
- configuration from settings-security.xml, nevernull
- Returns:
- decrypted string
- Throws:
SecDispatcherException
-
validateConfiguration
Description copied from interface:Dispatcher
Validates dispatcher configuration.- Specified by:
validateConfiguration
in interfaceDispatcher
-