public abstract class AbstractProfilesConfigFileScanner extends Object
Constructor and Description |
---|
AbstractProfilesConfigFileScanner() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isSupportedProperty(String propertyName)
Hook to allow subclasses to determine which properties are supported and which aren't.
|
protected abstract void |
onEmptyOrCommentLine(String profileName,
String line)
Action to be performed when an empty or comment line is detected
|
protected abstract void |
onEndOfFile()
Action to be performed when the scanner reaches the end of the
credentials file.
|
protected abstract void |
onProfileEndingLine(String prevProfileName)
Action to be performed when the scanner reaches the end of a profile
section.
|
protected abstract void |
onProfileProperty(String profileName,
String propertyName,
String propertyValue,
boolean isSupportedProperty,
String line)
Action to be performed when a property declaration is detected inside a
profile section.
|
protected abstract void |
onProfileStartingLine(String newProfileName,
String line)
Action to be performed when the starting line of a new profile is detected
|
protected void |
run(Scanner scanner)
Scan through the given input, and perform the defined actions.
|
protected abstract void onEmptyOrCommentLine(String profileName, String line)
protected abstract void onProfileStartingLine(String newProfileName, String line)
protected abstract void onProfileEndingLine(String prevProfileName)
protected abstract void onEndOfFile()
protected abstract void onProfileProperty(String profileName, String propertyName, String propertyValue, boolean isSupportedProperty, String line)
profileName
- The name of the profile where this property is declared.propertyName
- The name of the property.propertyValue
- The value of the property.isSupportedProperty
- Whether this is a supported property according to the
specification of credential profiles file.line
- The original line of text where the property is declared.protected boolean isSupportedProperty(String propertyName)
protected void run(Scanner scanner)
scanner
- The scanner for the credentials file input.Copyright © 2024. All rights reserved.