Class LegacyVOMSESParserImpl
java.lang.Object
org.italiangrid.voms.request.impl.LegacyVOMSESParserImpl
- All Implemented Interfaces:
VOMSESParser
Implementation of the
VOMSESParser
interface.
This class is responsible for parsing VOMSES configuration files and extracting
VOMSServerInfo
instances from them.
It supports parsing from files, directories, and readers, and ensures that the VOMSES files exist and are readable before processing.
VOMSES files typically contain server connection information in a structured format.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Performs basic sanity checks on the provided file.Parses a VOMSES file or directory.Parses VOMSES configuration from aReader
.protected List
<VOMSServerInfo> parseDirectory
(File directory) Parses all VOMSES files in a given directory.protected VOMSServerInfo
Parses a single line from a VOMSES file.
-
Constructor Details
-
LegacyVOMSESParserImpl
public LegacyVOMSESParserImpl()
-
-
Method Details
-
fileSanityChecks
Performs basic sanity checks on the provided file.- Parameters:
f
- the file to check- Throws:
VOMSError
- if the file does not exist or is not readable
-
parseLine
Parses a single line from a VOMSES file.- Parameters:
vomsesLine
- the line to parse- Returns:
- a
VOMSServerInfo
instance representing the parsed line - Throws:
URISyntaxException
- if the URI in the line is malformed
-
parse
Parses VOMSES configuration from aReader
.- Specified by:
parse
in interfaceVOMSESParser
- Parameters:
vomsesReader
- the reader containing VOMSES configuration- Returns:
- a list of
VOMSServerInfo
instances extracted from the input
-
parseDirectory
Parses all VOMSES files in a given directory.- Parameters:
directory
- the directory containing VOMSES files- Returns:
- a list of
VOMSServerInfo
instances parsed from the directory
-
parse
Parses a VOMSES file or directory.- Specified by:
parse
in interfaceVOMSESParser
- Parameters:
f
- the file or directory to parse- Returns:
- a list of
VOMSServerInfo
instances parsed from the file/directory - Throws:
VOMSError
- if the file is not found or an error occurs during parsing
-