-
Notifications
You must be signed in to change notification settings - Fork 1
/
DomainDAO.java
139 lines (129 loc) · 5.48 KB
/
DomainDAO.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
package mx.nic.rdap.db.spi;
import mx.nic.rdap.core.db.Domain;
import mx.nic.rdap.core.db.Nameserver;
import mx.nic.rdap.db.exception.RdapDataAccessException;
import mx.nic.rdap.db.struct.SearchResultStruct;
/**
* Interface for {@link Domain} DAO functions.
*/
public interface DomainDAO extends DAO {
/**
* Search for a {@link Domain} by its fqdn.
*
* @param domainName
* the <code>fqdn</code> of the object to be searched
* @param useNsAsAttribute
* Boolean value which defines if nameservers are being used as
* attributes or as objects.
* @return a {@link Domain} related to <code>ldhName</code>
* @throws RdapDataAccessException
*/
public Domain getByName(String domainName, Boolean useNsAsAttribute) throws RdapDataAccessException;
/**
* Search for domains by a ldhName in full or partial form, as well as by a
* complete or partial zone.
*
* @param namePattern
* A search pattern representing a domain's name, it can contain
* an asterisk '*' to match zero or more trailing characters at
* the end.
* @param resultLimit
* Maximum number of results.
* @param useNsAsAttribute
* Boolean value which defines if nameservers are being used as
* attributes or as objects.
* @return A {@link SearchResultStruct} with a List of {@link Nameserver}
* objects related to the <code>namePattern</code>.
* @throws RdapDataAccessException
*/
public SearchResultStruct<Domain> searchByName(String domainName, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Search for domains by their nameserver's name in full or partial form.
*
* @param nsName
* A search pattern representing a domain's nameserver name, it
* can contain an asterisk '*' to match zero or more trailing
* characters at the end.
* @param resultLimit
* Maximum number of results
* @param useNsAsAttribute
* Boolean value which defines if nameservers are being used as
* attributes or as objects.
* @return A {@link SearchResultStruct} containing a list of {@link Domain}
* objects related to the <code>nsName</code>
* @throws RdapDataAccessException
*/
public SearchResultStruct<Domain> searchByNsName(String nsName, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Search for domains by their nameserver' ip in full or partial form.
*
* @param ip
* A search pattern representing a domain's nameserver ip
* address.
* @param resultLimit
* Maximum number of results
* @param useNsAsAttribute
* Boolean value which defines if nameservers are being used as
* attributes or as objects.
* @return A {@link SearchResultStruct} containing a list of {@link Domain}
* objects related to the <code>ip</code>
* @throws RdapDataAccessException
*/
public SearchResultStruct<Domain> searchByNsIp(String ip, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Search for domains by their names, either unicode or ldh, using a regular
* expression.
*
* @param regexName
* A regular expression representing a pattern for a domain's
* name.
* @param resultLimit
* Maximum number of results.
* @param useNsAsAttribute
* Boolean value which defines if nameservers are being used as
* attributes or as objects.
* @return A {@link SearchResultStruct} containing a list of {@link Domain}
* objects related to the <code>regexName</code>
* @throws RdapDataAccessException
*/
public SearchResultStruct<Domain> searchByRegexName(String regexName, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Search for domains by their nameserver's name using a regular expression.
*
* @param regexNsName
* A regular expression representing a pattern for a domain's
* nameserver name.
* @param resultLimit
* Maximum number of results.
* @param useNsAsAttribute
* Boolean value which defines if nameservers are being used as
* attributes or as objects.
* @return A {@link SearchResultStruct} containing a list of {@link Domain}
* objects related to the <code>regexNsName</code>
* @throws RdapDataAccessException
*/
public SearchResultStruct<Domain> searchByRegexNsName(String regexNsName, Integer resultLimit,
boolean useNsAsAttribute) throws RdapDataAccessException;
/**
* Search for domains by their nameserver's ip address using a regular
* expression.
*
* @param ip
* A regular expression representing a pattern for a domain's
* nameserver ip address.
* @param resultLimit
* Maximum number of results.
* @param useNameserverAsDomainAttribute
* Boolean value which defines if nameservers are being used as
* attributes or as objects.
* @return A {@link SearchResultStruct} containing a list of {@link Domain}
* objects related to the <code>ip</code>
* @throws RdapDataAccessException
*/
public SearchResultStruct<Domain> searchByRegexNsIp(String ip, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
}