public class GetRecords extends java.lang.Object implements DnsOperation
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.String,RecordType> |
OBJECTCLASS_TO_TYPE
Mappings of type to objectClass.
|
private QuestionRecord |
question
The name of the question to get.
|
private static java.util.Map<RecordType,java.lang.String> |
TYPE_TO_OBJECTCLASS
Mappings of type to objectClass.
|
| Constructor and Description |
|---|
GetRecords(QuestionRecord question)
Creates the action to be used against the embedded JNDI provider.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Set<ResourceRecord> |
execute(javax.naming.directory.DirContext ctx,
javax.naming.Name base)
Note that the base is a relative path from the exiting context.
|
private javax.naming.Name |
getDomainComponents(javax.naming.Name name) |
private ResourceRecord |
getRecord(javax.naming.directory.Attributes attrs,
javax.naming.Name relative)
Marshals a RecordStoreEntry from an Attributes object.
|
private javax.naming.Name |
getRelativeName(java.lang.String nameInNamespace,
java.lang.String baseDn) |
private RecordType |
getType(javax.naming.directory.Attribute objectClass) |
(package private) java.lang.String |
transformDistinguishedName(java.lang.String distinguishedName)
Uses the algorithm in RFC 2247
to transform a distinguished name into an Internet domain name.
|
(package private) java.lang.String |
transformDomainName(java.lang.String domainName)
Uses the algorithm in RFC 2247
to transform any Internet domain name into a distinguished name.
|
private final QuestionRecord question
private static final java.util.Map<RecordType,java.lang.String> TYPE_TO_OBJECTCLASS
private static final java.util.Map<java.lang.String,RecordType> OBJECTCLASS_TO_TYPE
public GetRecords(QuestionRecord question)
question - public java.util.Set<ResourceRecord> execute(javax.naming.directory.DirContext ctx, javax.naming.Name base) throws java.lang.Exception
execute in interface DnsOperationctx - The context to execute the command withbase - The base Dn for working with the contextjava.lang.Exception - The exception thrown by the commandprivate ResourceRecord getRecord(javax.naming.directory.Attributes attrs, javax.naming.Name relative) throws javax.naming.NamingException
attrs - the attributes of the DNS questionjavax.naming.NamingException - if there are any access problemsjava.lang.String transformDomainName(java.lang.String domainName)
domainName - the domain namejava.lang.String transformDistinguishedName(java.lang.String distinguishedName)
distinguishedName - the distinguished nameprivate RecordType getType(javax.naming.directory.Attribute objectClass) throws javax.naming.NamingException
javax.naming.NamingExceptionprivate javax.naming.Name getRelativeName(java.lang.String nameInNamespace,
java.lang.String baseDn)
throws javax.naming.NamingException
javax.naming.NamingExceptionprivate javax.naming.Name getDomainComponents(javax.naming.Name name)
throws javax.naming.NamingException
javax.naming.NamingException