-
Notifications
You must be signed in to change notification settings - Fork 1
/
DomainDAO.java
171 lines (161 loc) · 7.53 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
package mx.nic.rdap.db.spi;
import mx.nic.rdap.core.db.Domain;
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 {
/**
* Retrieves a {@link Domain} by Fully Qualified Domain Name (FQDN).
*
* @param domainName
* the FQDN of the desired domain.
* @return The {@link Domain} whose FQDN is <code>domainName</code>.
* <p>
* This function can return <code>null</code> to express that the
* domain was not found.
*/
public Domain getByName(String domainName, Boolean useNsAsAttribute) throws RdapDataAccessException;
/**
* Searches for domains by a ldhName in full or partial form.
*
* @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 domains that should be listed in the
* resulting {@link SearchResultStruct}. The implementation of
* this method can choose to stop adding up domains when this
* limit is reached for the sake of performance, but if not, the
* caller is expected truncate the response accordingly.
* <p>
* Even though this value is an {@link Integer}, it cannot be
* <code>null</code>.
* @return {@link Domain}s that match <code>namePattern</code>.
* <p>
* Empty result sets can be expressed by <code>null</code> or an
* empty {@link SearchResultStruct}.
*/
public SearchResultStruct<Domain> searchByName(String namePattern, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Searches 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 domains that should be listed in the
* resulting {@link SearchResultStruct}. The implementation of
* this method can choose to stop adding up domains when this
* limit is reached for the sake of performance, but if not, the
* caller is expected truncate the response accordingly.
* <p>
* Even though this value is an {@link Integer}, it cannot be
* <code>null</code>.
* @return {@link Domain}s whose nameservers' names match
* <code>nsName</code>.
* <p>
* Empty result sets can be expressed by <code>null</code> or an
* empty {@link SearchResultStruct}.
*/
public SearchResultStruct<Domain> searchByNsName(String nsName, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Searches for domains by nameserver IP in full or partial form.
*
* @param ip
* A search pattern representing a domain's nameserver IP
* address.
* @param resultLimit
* Maximum number of domains that should be listed in the
* resulting {@link SearchResultStruct}. The implementation of
* this method can choose to stop adding up domains when this
* limit is reached for the sake of performance, but if not, the
* caller is expected truncate the response accordingly.
* <p>
* Even though this value is an {@link Integer}, it cannot be
* <code>null</code>.
* @return {@link Domain}s that contain at least one nameserver whose IP
* address matches <code>ip</code>.
* <p>
* Empty result sets can be expressed by <code>null</code> or an
* empty {@link SearchResultStruct}.
*/
public SearchResultStruct<Domain> searchByNsIp(String ip, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Searches 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 domains that should be listed in the
* resulting {@link SearchResultStruct}. The implementation of
* this method can choose to stop adding up domains when this
* limit is reached for the sake of performance, but if not, the
* caller is expected truncate the response accordingly.
* <p>
* Even though this value is an {@link Integer}, it cannot be
* <code>null</code>.
* @return {@link Domain}s that match <code>regexName</code>.
* <p>
* Empty result sets can be expressed by <code>null</code> or an
* empty {@link SearchResultStruct}.
*/
public SearchResultStruct<Domain> searchByRegexName(String regexName, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
/**
* Searches 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 domains that should be listed in the
* resulting {@link SearchResultStruct}. The implementation of
* this method can choose to stop adding up domains when this
* limit is reached for the sake of performance, but if not, the
* caller is expected truncate the response accordingly.
* <p>
* Even though this value is an {@link Integer}, it cannot be
* <code>null</code>.
* @return {@link Domain}s whose nameservers' names match
* <code>regexNsName</code>.
* <p>
* Empty result sets can be expressed by <code>null</code> or an
* empty {@link SearchResultStruct}.
*/
public SearchResultStruct<Domain> searchByRegexNsName(String regexNsName, Integer resultLimit,
boolean useNsAsAttribute) throws RdapDataAccessException;
/**
* Searches 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 domains that should be listed in the
* resulting {@link SearchResultStruct}. The implementation of
* this method can choose to stop adding up domains when this
* limit is reached for the sake of performance, but if not, the
* caller is expected truncate the response accordingly.
* <p>
* Even though this value is an {@link Integer}, it cannot be
* <code>null</code>.
* @return {@link Domain}s that contain at least one nameserver whose IP
* address matches <code>ip</code>.
* <p>
* Empty result sets can be expressed by <code>null</code> or an
* empty {@link SearchResultStruct}.
*/
public SearchResultStruct<Domain> searchByRegexNsIp(String ip, Integer resultLimit, boolean useNsAsAttribute)
throws RdapDataAccessException;
}