Package com.google.gerrit.server.config
Class ProjectConfigEntry
java.lang.Object
com.google.gerrit.server.config.ProjectConfigEntry
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionProjectConfigEntry
(String displayName, boolean defaultValue) ProjectConfigEntry
(String displayName, boolean defaultValue, String description) ProjectConfigEntry
(String displayName, int defaultValue) ProjectConfigEntry
(String displayName, int defaultValue, boolean inheritable) ProjectConfigEntry
(String displayName, int defaultValue, boolean inheritable, String description) ProjectConfigEntry
(String displayName, long defaultValue) ProjectConfigEntry
(String displayName, long defaultValue, boolean inheritable) ProjectConfigEntry
(String displayName, long defaultValue, boolean inheritable, String description) ProjectConfigEntry
(String displayName, String defaultValue) ProjectConfigEntry
(String displayName, String defaultValue, boolean inheritable) ProjectConfigEntry
(String displayName, String defaultValue, boolean inheritable, String description) ProjectConfigEntry
(String displayName, String defaultValue, ProjectConfigEntryType type, List<String> permittedValues, boolean inheritable, String description) ProjectConfigEntry
(String displayName, String defaultValue, List<String> permittedValues) ProjectConfigEntry
(String displayName, String defaultValue, List<String> permittedValues, boolean inheritable) ProjectConfigEntry
(String displayName, String defaultValue, List<String> permittedValues, boolean inheritable, String description) ProjectConfigEntry
(String displayName, T defaultValue, Class<T> permittedValues) ProjectConfigEntry
(String displayName, T defaultValue, Class<T> permittedValues, boolean inheritable) ProjectConfigEntry
(String displayName, T defaultValue, Class<T> permittedValues, boolean inheritable, String description) -
Method Summary
Modifier and TypeMethodDescriptiongetType()
getWarning
(ProjectState project) Returns any warning associated with the projectboolean
isEditable
(ProjectState project) Returns whether the project is editableboolean
onRead
(ProjectState project, String value) Called after reading the project config value.onRead
(ProjectState project, List<String> values) Called after reading the project config value of type ARRAY.void
onUpdate
(Project.NameKey project, Boolean oldValue, Boolean newValue) Called after a project config is updated.void
onUpdate
(Project.NameKey project, Integer oldValue, Integer newValue) Called after a project config is updated.void
onUpdate
(Project.NameKey project, Long oldValue, Long newValue) Called after a project config is updated.void
onUpdate
(Project.NameKey project, String oldValue, String newValue) Called after a project config is updated.preUpdate
(ConfigValue configValue) Called before the project config is updated.
-
Constructor Details
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
ProjectConfigEntry
-
-
Method Details
-
getDisplayName
-
getDescription
-
isInheritable
public boolean isInheritable() -
getDefaultValue
-
getType
-
getPermittedValues
-
isEditable
Returns whether the project is editable- Parameters:
project
- project state.
-
getWarning
Returns any warning associated with the project- Parameters:
project
- project state.
-
preUpdate
Called before the project config is updated. To modify the value before the project config is updated, override this method and return the modified value. Default implementation returns the same value.- Parameters:
configValue
- the original configValue that was entered.- Returns:
- the modified configValue.
-
onRead
Called after reading the project config value. To modify the value before returning it to the client, override this method and return the modified value. Default implementation returns the same value.- Parameters:
project
- the project.value
- the actual value of the config entry (computed out of the configured value, the inherited value and the default value).- Returns:
- the modified value.
-
onRead
Called after reading the project config value of type ARRAY. To modify the values before returning it to the client, override this method and return the modified values. Default implementation returns the same values.- Parameters:
project
- the project.values
- the actual values of the config entry (computed out of the configured value, the inherited value and the default value).- Returns:
- the modified values.
-
onUpdate
Called after a project config is updated.- Parameters:
project
- project name.oldValue
- old entry value.newValue
- new entry value.
-
onUpdate
Called after a project config is updated.- Parameters:
project
- project name.oldValue
- old entry value.newValue
- new entry value.
-
onUpdate
Called after a project config is updated.- Parameters:
project
- project name.oldValue
- old entry value.newValue
- new entry value.
-
onUpdate
Called after a project config is updated.- Parameters:
project
- project name.oldValue
- old entry value.newValue
- new entry value.
-