Search in sources :

Example 11 with ResolveResult

use of javax.naming.spi.ResolveResult in project jdk8u_jdk by JetBrains.

the class GenericURLDirContext method modifyAttributes.

public void modifyAttributes(String name, ModificationItem[] mods) throws NamingException {
    ResolveResult res = getRootURLContext(name, myEnv);
    DirContext ctx = (DirContext) res.getResolvedObj();
    try {
        ctx.modifyAttributes(res.getRemainingName(), mods);
    } finally {
        ctx.close();
    }
}
Also used : ResolveResult(javax.naming.spi.ResolveResult)

Example 12 with ResolveResult

use of javax.naming.spi.ResolveResult in project jdk8u_jdk by JetBrains.

the class GenericURLDirContext method search.

public NamingEnumeration<SearchResult> search(String name, Attributes matchingAttributes, String[] attributesToReturn) throws NamingException {
    ResolveResult res = getRootURLContext(name, myEnv);
    DirContext ctx = (DirContext) res.getResolvedObj();
    try {
        return ctx.search(res.getRemainingName(), matchingAttributes, attributesToReturn);
    } finally {
        ctx.close();
    }
}
Also used : ResolveResult(javax.naming.spi.ResolveResult)

Example 13 with ResolveResult

use of javax.naming.spi.ResolveResult in project jdk8u_jdk by JetBrains.

the class GenericURLDirContext method getAttributes.

public Attributes getAttributes(String name) throws NamingException {
    ResolveResult res = getRootURLContext(name, myEnv);
    DirContext ctx = (DirContext) res.getResolvedObj();
    try {
        return ctx.getAttributes(res.getRemainingName());
    } finally {
        ctx.close();
    }
}
Also used : ResolveResult(javax.naming.spi.ResolveResult)

Example 14 with ResolveResult

use of javax.naming.spi.ResolveResult in project jdk8u_jdk by JetBrains.

the class GenericURLDirContext method modifyAttributes.

public void modifyAttributes(String name, int mod_op, Attributes attrs) throws NamingException {
    ResolveResult res = getRootURLContext(name, myEnv);
    DirContext ctx = (DirContext) res.getResolvedObj();
    try {
        ctx.modifyAttributes(res.getRemainingName(), mod_op, attrs);
    } finally {
        ctx.close();
    }
}
Also used : ResolveResult(javax.naming.spi.ResolveResult)

Example 15 with ResolveResult

use of javax.naming.spi.ResolveResult in project jdk8u_jdk by JetBrains.

the class GenericURLDirContext method search.

public NamingEnumeration<SearchResult> search(String name, Attributes matchingAttributes) throws NamingException {
    ResolveResult res = getRootURLContext(name, myEnv);
    DirContext ctx = (DirContext) res.getResolvedObj();
    try {
        return ctx.search(res.getRemainingName(), matchingAttributes);
    } finally {
        ctx.close();
    }
}
Also used : ResolveResult(javax.naming.spi.ResolveResult)

Aggregations

ResolveResult (javax.naming.spi.ResolveResult)31 CompositeName (javax.naming.CompositeName)2 Context (javax.naming.Context)2 Name (javax.naming.Name)2 Reference (javax.naming.Reference)2 LdapURL (com.sun.jndi.ldap.LdapURL)1 RegistryContext (com.sun.jndi.rmi.registry.RegistryContext)1 GenericURLContext (com.sun.jndi.toolkit.url.GenericURLContext)1 CannotProceedException (javax.naming.CannotProceedException)1 InitialContext (javax.naming.InitialContext)1 LinkRef (javax.naming.LinkRef)1 NameNotFoundException (javax.naming.NameNotFoundException)1 EventContext (javax.naming.event.EventContext)1 Resolver (javax.naming.spi.Resolver)1 ServiceName (org.jboss.msc.service.ServiceName)1 Test (org.junit.Test)1