Class DefaultSecDispatcher
- java.lang.Object
-
- org.codehaus.plexus.logging.AbstractLogEnabled
-
- org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher
-
- All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled
,SecDispatcher
public class DefaultSecDispatcher extends org.codehaus.plexus.logging.AbstractLogEnabled implements SecDispatcher
-
-
Field Summary
Fields Modifier and Type Field Description protected org.sonatype.plexus.components.cipher.PlexusCipher
_cipher
DefaultHandlerprotected java.lang.String
_configurationFile
protected java.util.Map
_decryptors
All available dispatchersstatic char
ATTR_START
static char
ATTR_STOP
static java.lang.String
SYSTEM_PROPERTY_SEC_LOCATION
static java.lang.String
TYPE_ATTR
-
Fields inherited from interface org.sonatype.plexus.components.sec.dispatcher.SecDispatcher
ROLE, SYSTEM_PROPERTY_MASTER_PASSWORD, SYSTEM_PROPERTY_SERVER_PASSWORD
-
-
Constructor Summary
Constructors Constructor Description DefaultSecDispatcher()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
decrypt(java.lang.String str)
decrypt given encrypted stringjava.lang.String
getConfigurationFile()
private java.lang.String
getMaster(SettingsSecurity sec)
private SettingsSecurity
getSec()
private boolean
isEncryptedString(java.lang.String str)
static void
main(java.lang.String[] args)
private static boolean
propertyExists(java.lang.String[] values, java.lang.String[] av)
Encrytion helpervoid
setConfigurationFile(java.lang.String file)
private static void
show(boolean showMaster)
private java.lang.String
strip(java.lang.String str)
private java.util.Map
stripAttributes(java.lang.String str)
private static void
usage()
-
-
-
Field Detail
-
SYSTEM_PROPERTY_SEC_LOCATION
public static final java.lang.String SYSTEM_PROPERTY_SEC_LOCATION
- See Also:
- Constant Field Values
-
TYPE_ATTR
public static final java.lang.String TYPE_ATTR
- See Also:
- Constant Field Values
-
ATTR_START
public static final char ATTR_START
- See Also:
- Constant Field Values
-
ATTR_STOP
public static final char ATTR_STOP
- See Also:
- Constant Field Values
-
_cipher
protected org.sonatype.plexus.components.cipher.PlexusCipher _cipher
DefaultHandler
-
_decryptors
protected java.util.Map _decryptors
All available dispatchers
-
_configurationFile
protected java.lang.String _configurationFile
-
-
Method Detail
-
decrypt
public java.lang.String decrypt(java.lang.String str) throws SecDispatcherException
Description copied from interface:SecDispatcher
decrypt given encrypted string- Specified by:
decrypt
in interfaceSecDispatcher
- Returns:
- decrypted string
- Throws:
SecDispatcherException
-
strip
private java.lang.String strip(java.lang.String str)
-
stripAttributes
private java.util.Map stripAttributes(java.lang.String str)
-
isEncryptedString
private boolean isEncryptedString(java.lang.String str)
-
getSec
private SettingsSecurity getSec() throws SecDispatcherException
- Throws:
SecDispatcherException
-
getMaster
private java.lang.String getMaster(SettingsSecurity sec) throws SecDispatcherException
- Throws:
SecDispatcherException
-
getConfigurationFile
public java.lang.String getConfigurationFile()
-
setConfigurationFile
public void setConfigurationFile(java.lang.String file)
-
propertyExists
private static boolean propertyExists(java.lang.String[] values, java.lang.String[] av)
Encrytion helper- Throws:
java.io.IOException
-
usage
private static final void usage()
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
show
private static void show(boolean showMaster) throws java.lang.Exception
- Throws:
java.lang.Exception
-
-