Package org.apache.wiki.ui

# Class Installer

java.lang.Object
org.apache.wiki.ui.Installer

public class Installer extends Object
Manages JSPWiki installation on behalf of `admin/Install.jsp`. The contents of this class were previously part of `Install.jsp`.

Since:
  2.4.20

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`ADMIN_GROUP`
`static final String`
`ADMIN_ID`
`static final String`
`ADMIN_NAME`
`static final String`
`APP_NAME`
`static final String`
`INSTALL_ERROR`
`static final String`
`INSTALL_INFO`
`static final String`
`INSTALL_WARNING`
`static final String`
`PAGE_DIR`
`static final String`
`PROPFILENAME`
`static final String`
`STORAGE_DIR`
`static String`
`TMP_DIR`
`static final String`
`WORK_DIR`

## Constructor Summary

Constructors
Constructor
Description
`Installer(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.ServletConfig config)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`adminExists()`
Returns `true` if the administrative user had been created previously.
`String`
`createAdministrator()`
Creates an administrative user and returns the new password.
`String`
`getPropertiesList()`
Returns the properties as a "key=value" string separated by newlines
`String`
`getPropertiesPath()`
`String`
`getProperty(String key)`
Returns a property from the Engine's properties.
`void`
`parseProperties()`
`void`
`restoreUserValues()`
`void`
`saveProperties()`
`boolean`
`validateProperties()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### ADMIN_ID

public static final String ADMIN_ID

See Also:
  - Constant Field Values

### ADMIN_NAME

public static final String ADMIN_NAME

See Also:
  - Constant Field Values

### INSTALL_INFO

public static final String INSTALL_INFO

See Also:
  - Constant Field Values

### INSTALL_ERROR

public static final String INSTALL_ERROR

See Also:
  - Constant Field Values

### INSTALL_WARNING

public static final String INSTALL_WARNING

See Also:
  - Constant Field Values

### APP_NAME

public static final String APP_NAME

See Also:
  - Constant Field Values

### STORAGE_DIR

public static final String STORAGE_DIR

See Also:
  - Constant Field Values

### PAGE_DIR

public static final String PAGE_DIR

See Also:
  - Constant Field Values

### WORK_DIR

public static final String WORK_DIR

See Also:
  - Constant Field Values

### ADMIN_GROUP

public static final String ADMIN_GROUP

See Also:
  - Constant Field Values

### PROPFILENAME

public static final String PROPFILENAME

See Also:
  - Constant Field Values

### TMP_DIR

public static String TMP_DIR

## Constructor Details

### Installer

public Installer(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.ServletConfig config)

## Method Details

### adminExists

public boolean adminExists()
Returns `true` if the administrative user had been created previously.

Returns:
  the result

### createAdministrator

public String createAdministrator() throws WikiSecurityException
Creates an administrative user and returns the new password. If the admin user exists, the password will be `null`.

Returns:
  the password
Throws:
  `WikiSecurityException`

### getPropertiesList

public String getPropertiesList()
Returns the properties as a "key=value" string separated by newlines

Returns:
  the string

### getPropertiesPath

public String getPropertiesPath()

### getProperty

public String getProperty(String key)
Returns a property from the Engine's properties.

Parameters:
  `key` - the property key
Returns:
  the property value

### parseProperties

public void parseProperties()

### saveProperties

public void saveProperties()

### validateProperties

public boolean validateProperties()

### restoreUserValues

public void restoreUserValues()