Package org.apache.directory.server.core

Examples of org.apache.directory.server.core.CoreSession


     * without the ManageDsaIT flag.
     */
    @Test
    public void testMoveAndRenameIsReferralCoreAPIWithoutManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" );
        DN newParent = new DN( "o=PNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "cn=Alex" );
       
        try
        {
            coreSession.moveAndRename( dn, newParent, newRdn, false, false );
            fail();
        }
        catch ( ReferralException re )
        {
            int nbRefs = 0;
View Full Code Here


     * with the ManageDsaIT flag
     */
    @Test
    public void testMoveAndRenameIsReferralCoreAPIWithManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "cn=Emmanuel Lecharny,ou=apache,ou=Roles,o=MNN,c=WW,ou=system" );
        DN newParent = new DN( "o=PNN,c=WW,ou=system" );
        RDN newRdn = new RDN( "cn=Alex" );
       
        try
        {
            coreSession.moveAndRename( dn, newParent, newRdn, false, true );
            fail();
        }
        catch ( PartialResultException pre )
        {
            assertTrue( true );
View Full Code Here

     * without a ManageDsaIT.
     */
    @Test
    public void testCompareEntryWithAncestorCoreAPIWithoutManageDsaIt() throws Exception
    {
        CoreSession session = service.getAdminSession();
       
        try
        {
            session.compare( new DN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" ), "cn", "Emmanuel Lecharny", false );
            fail();
        }
        catch ( ReferralException re )
        {
            int nbRefs = 0;
View Full Code Here

     * with a ManageDsaIT.
     */
    @Test
    public void testCompareEntryWithAncestorCoreAPIWithManageDsaIt() throws Exception
    {
        CoreSession session = service.getAdminSession();
       
        try
        {
            session.compare( new DN( "cn=Emmanuel Lecharny,ou=Roles,o=MNN,c=WW,ou=system" ), "cn", "Emmanuel Lecharny", true );
            fail();
        }
        catch ( PartialResultException pre )
        {
            assertTrue( true );
View Full Code Here

     * and no ManageDsaIt flag.
     */
    @Test
    public void testCompareExistingEntryReferralCoreAPIWithoutManageDsaIt() throws Exception
    {
        CoreSession session = service.getAdminSession();
       
        try
        {
            session.compare( new DN( "ou=Roles,o=MNN,c=WW,ou=system" ), "ou", "roles", false );
            fail();
        }
        catch ( ReferralException re )
        {
            int nbRefs = 0;
View Full Code Here

     * with the ManageDsaIt flag.
     */
    @Test
    public void testCompareExistingEntryReferralCoreAPIWithManageDsaIt() throws Exception
    {
        CoreSession session = service.getAdminSession();
       
        assertTrue( session.compare( new DN( "ou=Roles,o=MNN,c=WW,ou=system" ), "ou", "roles", true ) );
    }
View Full Code Here

     * in its ancestor, using the Core API without the ManageDsaIt flag.
     */
    @Test
    public void testSearchWithReferralAncestorCoreAPIWithoutManageDSAIt() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "ou=nobody,ou=apache,ou=roles,o=Mnn,c=WW,ou=system" );
       
        try
        {
            coreSession.search( dn, "(ObjectClass=*)", false );
            fail();
        }
        catch ( ReferralException re )
        {
            int nbRefs = 0;
View Full Code Here

     * in its ancestor, using the Core API with the ManageDsaIt flag.
     */
    @Test
    public void testSearchWithReferralAncestorCoreAPIWithManageDSAIt() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "ou=nobody,ou=apache,ou=roles,o=Mnn,c=WW,ou=system" );
       
        try
        {
            coreSession.search( dn, "(ObjectClass=*)", true );
            fail();
        }
        catch ( PartialResultException pre )
        {
            assertTrue( true );
View Full Code Here

     * Test a search of an existing referral, using the Core API without the ManageDsaIt flag.
     */
    @Test
    public void testSearchExistingReferralCoreAPIWithoutManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "ou=roles,o=Mnn,c=WW,ou=system" );
       
        try
        {
            coreSession.search( dn, "(ObjectClass=*)", false );
            fail();
        }
        catch ( ReferralException re )
        {
            int nbRefs = 0;
View Full Code Here

     * Test a search of an existing referral, using the Core API with the ManageDsaIt flag.
     */
    @Test
    public void testSearchExistingReferralCoreAPIWithManageDsaIT() throws Exception
    {
        CoreSession coreSession = service.getAdminSession();
        DN dn = new DN( "ou=roles,o=Mnn,c=WW,ou=system" );
       
        EntryFilteringCursor cursor = coreSession.search( dn, "(ObjectClass=*)", true );
       
        assertNotNull( cursor );
       
        cursor.beforeFirst();
        int nbRes = 0;
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.CoreSession

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.