Package codes.thischwa.cf.fluent
Class ZoneOperationsImpl
java.lang.Object
codes.thischwa.cf.fluent.ZoneOperationsImpl
- All Implemented Interfaces:
ZoneOperations
Implementation of ZoneOperations for fluent API access to zone-level operations.
-
Constructor Summary
ConstructorsConstructorDescriptionZoneOperationsImpl(CfDnsClient client, ZoneEntity zone) Constructs a ZoneOperationsImpl instance. -
Method Summary
Modifier and TypeMethodDescriptionSelects a record (subdomain) within the zone for further operations.getRecord(String subdomain, @Nullable RecordType... types) Selects a record with specific types within the zone for further operations.list(@Nullable RecordType... types) Lists all DNS records within the zone, optionally filtered by types.
-
Constructor Details
-
ZoneOperationsImpl
Constructs a ZoneOperationsImpl instance.- Parameters:
client- the CfDnsClient instance to use for operationszone- the ZoneEntity representing the DNS zone
-
-
Method Details
-
getRecord
Description copied from interface:ZoneOperationsSelects a record (subdomain) within the zone for further operations.- Specified by:
getRecordin interfaceZoneOperations- Parameters:
subdomain- the subdomain relative to the zone (e.g. "www"), or "@" for the zone apex- Returns:
- a RecordOperations instance for chaining record-specific operations
- Throws:
CloudflareApiException- if the zone cannot be found or accessed
-
getRecord
public RecordOperations getRecord(String subdomain, @Nullable @Nullable RecordType... types) throws CloudflareApiException Description copied from interface:ZoneOperationsSelects a record with specific types within the zone for further operations.The type filter does not restrict a subsequent
RecordOperations.delete(RecordType...)call; that method uses its own type arguments, and calling it without arguments deletes all record types for the selected subdomain. ACloudflareApiExceptionfrom an individual deletion is logged and does not stop later attempts; seeRecordOperations.delete(RecordType...).- Specified by:
getRecordin interfaceZoneOperations- Parameters:
subdomain- the subdomain relative to the zone (e.g. "www"), or "@" for the zone apextypes- optional DNS record types to filter by- Returns:
- a RecordOperations instance for chaining record-specific operations
- Throws:
CloudflareApiException- if the zone cannot be found or accessed
-
list
public List<RecordEntity> list(@Nullable @Nullable RecordType... types) throws CloudflareApiException Description copied from interface:ZoneOperationsLists all DNS records within the zone, optionally filtered by types.- Specified by:
listin interfaceZoneOperations- Parameters:
types- optional DNS record types to filter by- Returns:
- a list of RecordEntity objects matching the criteria
- Throws:
CloudflareApiException- if an error occurs while retrieving records
-