Examples of clone()


Examples of org.apache.directory.api.ldap.model.entry.DefaultAttribute.clone()

    @Test
    public void testClone() throws LdapException
    {
        Attribute attr = new DefaultAttribute( "test" );

        Attribute clone = attr.clone();

        assertEquals( attr, clone );
        attr.setUpId( "new" );
        assertEquals( "test", clone.getId() );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultEntry.clone()

    @Test
    public void testClone() throws Exception
    {
        Entry entry1 = new DefaultEntry( schemaManager );

        Entry entry2 = entry1.clone();

        assertEquals( entry1, entry2 );
        entry2.setDn( EXAMPLE_DN );

        assertEquals( Dn.EMPTY_DN, entry1.getDn() );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.DefaultModification.clone()

    {
        Attribute attribute = new DefaultAttribute( atCN );
        attribute.add( "test1", "test2" );

        Modification mod = new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, attribute );
        Modification clone = mod.clone();

        attribute.remove( "test2" );

        Attribute clonedAttribute = clone.getAttribute();
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.clone()

        try
        {
            eagerlyPopulateFields( renameContext );
            Entry originalEntry = getOriginalEntry( renameContext );
            renameContext.setOriginalEntry( originalEntry );
            renameContext.setModifiedEntry( originalEntry.clone() );

            // Call the Rename method
            Interceptor head = directoryService.getInterceptor( renameContext.getNextInterceptor() );

            head.rename( renameContext );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.BranchNode.clone()

    @Test
    public void testAndFilter() throws ParseException
    {
        BranchNode node = ( BranchNode ) FilterParser.parse( null, "(&(ou~=people)(age>=30))" );
        // just check that it doesn't throw for now
        node = ( BranchNode ) node.clone();
        assertEquals( 2, node.getChildren().size() );
        assertTrue( node instanceof AndNode );
    }

View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.ExtensibleNode.clone()

    public void testExtensibleFilterForm1() throws ParseException
    {
        ExtensibleNode node = ( ExtensibleNode ) FilterParser.parse( null,
            "(ou:dn:stupidMatch:=dummyAssertion\\23\\2A)" );
        // just check that it doesn't throw for now
        node = ( ExtensibleNode ) node.clone();
        assertEquals( "ou", node.getAttribute() );
        assertEquals( "dummyAssertion#*", node.getValue().getString() );
        assertEquals( "stupidMatch", node.getMatchingRuleId() );
        assertTrue( node.hasDnAttributes() );
        assertTrue( node instanceof ExtensibleNode );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.PresenceNode.clone()

    @Test
    public void testPresentFilter() throws ParseException
    {
        PresenceNode node = ( PresenceNode ) FilterParser.parse( null, "(ou=*)" );
        // just check that it doesn't throw for now
        node = ( PresenceNode ) node.clone();
        assertEquals( "ou", node.getAttribute() );
        assertTrue( node instanceof PresenceNode );
    }


View Full Code Here

Examples of org.apache.directory.api.ldap.model.filter.SubstringNode.clone()

    @Test
    public void testSubstringNoAnyNoFinal() throws ParseException
    {
        SubstringNode node = ( SubstringNode ) FilterParser.parse( null, "(ou=foo*)" );
        // just check that it doesn't throw for now
        node = ( SubstringNode ) node.clone();
        assertEquals( "ou", node.getAttribute() );
        assertTrue( node instanceof SubstringNode );
        assertEquals( 0, node.getAny().size() );
        assertFalse( node.getAny().contains( "" ) );
        assertEquals( "foo", node.getInitial() );
View Full Code Here

Examples of org.apache.directory.ldapstudio.browser.core.model.ISearch.clone()

            Object obj = objects[0];

            if ( obj instanceof ISearch )
            {
                ISearch search = ( ISearch ) obj;
                exampleSearch = ( ISearch ) search.clone();
                exampleSearch.setName( null );
            }
            else if ( obj instanceof IEntry )
            {
                IEntry entry = ( IEntry ) obj;
View Full Code Here

Examples of org.apache.directory.server.core.entry.ClonedServerEntry.clone()

        engine.checkPermission( schemaManager, opContext, userGroups, principalDn,
            principal.getAuthenticationLevel(), name, null, null,
            Collections.singleton( MicroOperation.MODIFY ), tuples, entry, null );

        Collection<MicroOperation> perms = null;
        ServerEntry entryView = ( ServerEntry ) entry.clone();
       
        for ( Modification mod : mods )
        {
            ServerAttribute attr = (ServerAttribute)mod.getAttribute();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.