public class UserConfigurationPersisterImpl extends Object implements UserConfigurationPersister
| Constructor and Description |
|---|
UserConfigurationPersisterImpl(File configurationDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
detectPersistedConfigurationType()
Detects the persisted configuration type.
|
InputStream |
getConfigurationStream()
Returns the active configuration.
|
UserConfigurationType |
getConfigurationType()
Returns the current configuration type
|
boolean |
isCustomConfigurationAvailable()
Returns true if a custom Atlassian User configuration file is available.
|
void |
updateConfiguration(UserConfigurationType configurationType)
Updates configuration to the given configuration type.
|
public UserConfigurationPersisterImpl(File configurationDirectory) throws IOException
IOExceptionpublic InputStream getConfigurationStream() throws IOException
UserConfigurationPersistergetConfigurationStream in interface UserConfigurationPersisterIOException - if the file cannot be readpublic void updateConfiguration(UserConfigurationType configurationType) throws IOException
UserConfigurationPersisterupdateConfiguration in interface UserConfigurationPersisterconfigurationType - new configuration typeIOException - If the configuration could not be updatedpublic UserConfigurationType getConfigurationType()
UserConfigurationPersistergetConfigurationType in interface UserConfigurationPersisterpublic boolean isCustomConfigurationAvailable()
UserConfigurationPersisterisCustomConfigurationAvailable in interface UserConfigurationPersistertrue if the current configuration is UserConfigurationType.CUSTOM or if a backup
is availablepublic void detectPersistedConfigurationType()
throws IOException
UserConfigurationPersisterShould be called when it is likely that atlassian-user.xml has been modified.
detectPersistedConfigurationType in interface UserConfigurationPersisterIOException - if the persistent configuration could not be readCopyright © 2016 Atlassian Software Systems Pty Ltd. All rights reserved.