Package com.sun.identity.setup
Class BootstrapData
- java.lang.Object
-
- com.sun.identity.setup.BootstrapData
-
public class BootstrapData extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONFIG_PWD_KEYstatic StringDS_BASE_DNstatic StringDS_HOSTstatic StringDS_ISEMBEDDEDstatic StringDS_MGRstatic StringDS_PORTstatic StringDS_PROTOCOLstatic StringDS_PWDstatic StringDS_REPLICATIONPORTstatic StringDS_REPLICATIONPORT_AVAILABLEstatic StringDSAME_PWD_KEYstatic StringENCKEY
-
Constructor Summary
Constructors Constructor Description BootstrapData(String basedir)Creates an instance of this classBootstrapData(Map mapConfig)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetBaseDN()ListgetData()Returns list of bootstrap data.MapgetDataAsMap(int idx)Gets attributes in a given row as aMap.StringgetDsameUserPassword()StringgetInstanceName()StringgetServerConfigXML(boolean bCrypt)Returns server configuration XML.StringgetUserBaseDN()voidinitSMS(boolean startDS)static Map<String,String>queryStringToMap(String str)
-
-
-
Field Detail
-
DSAME_PWD_KEY
public static final String DSAME_PWD_KEY
- See Also:
- Constant Field Values
-
CONFIG_PWD_KEY
public static final String CONFIG_PWD_KEY
- See Also:
- Constant Field Values
-
DS_HOST
public static final String DS_HOST
- See Also:
- Constant Field Values
-
DS_PORT
public static final String DS_PORT
- See Also:
- Constant Field Values
-
DS_PROTOCOL
public static final String DS_PROTOCOL
- See Also:
- Constant Field Values
-
DS_PWD
public static final String DS_PWD
- See Also:
- Constant Field Values
-
DS_MGR
public static final String DS_MGR
- See Also:
- Constant Field Values
-
DS_BASE_DN
public static final String DS_BASE_DN
- See Also:
- Constant Field Values
-
DS_REPLICATIONPORT
public static final String DS_REPLICATIONPORT
- See Also:
- Constant Field Values
-
DS_REPLICATIONPORT_AVAILABLE
public static final String DS_REPLICATIONPORT_AVAILABLE
- See Also:
- Constant Field Values
-
DS_ISEMBEDDED
public static final String DS_ISEMBEDDED
- See Also:
- Constant Field Values
-
ENCKEY
public static final String ENCKEY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BootstrapData
public BootstrapData(String basedir) throws IOException
Creates an instance of this class- Parameters:
basedir- Base Directory of the installation.- Throws:
IOException- if cannot read the file.
-
BootstrapData
public BootstrapData(Map mapConfig) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
-
Method Detail
-
getData
public List getData()
Returns list of bootstrap data.- Returns:
- list of bootstrap data.
-
getInstanceName
public String getInstanceName()
-
getUserBaseDN
public String getUserBaseDN()
-
getBaseDN
public String getBaseDN()
-
getDsameUserPassword
public String getDsameUserPassword()
-
getDataAsMap
public Map getDataAsMap(int idx) throws MalformedURLException, UnsupportedEncodingException
Gets attributes in a given row as aMap.- Parameters:
idx- row (starting with 0)- Returns:
- Map of attributes
- Throws:
MalformedURLExceptionUnsupportedEncodingException
-
initSMS
public void initSMS(boolean startDS) throws UnsupportedEncodingException, LDAPServiceException, MalformedURLException
-
getServerConfigXML
public String getServerConfigXML(boolean bCrypt) throws UnsupportedEncodingException, MalformedURLException
Returns server configuration XML. It is generated from bootstrap file.- Parameters:
bCrypt-trueto decrypt the password with default key and encrypt it with the key defined inAMConfig.properties.- Returns:
- server configuration XML.
- Throws:
UnsupportedEncodingException- if XML encoding is incorrect.MalformedURLException- if bootstrap URL is not well formed.
-
queryStringToMap
public static Map<String,String> queryStringToMap(String str) throws UnsupportedEncodingException
- Throws:
UnsupportedEncodingException
-
-