Package org.apache.directory.studio.ldapbrowser.core.utils

Examples of org.apache.directory.studio.ldapbrowser.core.utils.CompoundModification


        setShellStyle( getShellStyle() | SWT.RESIZE );

        // clone the entry and attribute hierarchy
        IEntry entry = attributeHierarchy.getEntry();
        String attributeDescription = attributeHierarchy.getAttributeDescription();
        IEntry clone = new CompoundModification().cloneEntry( entry );
        this.attributeHierarchy = clone.getAttributeWithSubtypes( attributeDescription );
    }
View Full Code Here


        IEntry referenceCopy = oscSharedReferenceCopies.remove( entry );
        if ( referenceCopy != null )
        {
            EntryEditorUtils.ensureAttributesInitialized( entry );
            EventRegistry.suspendEventFiringInCurrentThread();
            new CompoundModification().replaceAttributes( entry, referenceCopy, this );
            EventRegistry.resumeEventFiringInCurrentThread();
            oscSharedReferenceCopies.put( entry, referenceCopy );
        }
    }
View Full Code Here

    {
        IEntry workingCopy = oscSharedWorkingCopies.get( entry );
        if ( workingCopy != null )
        {
            EntryEditorUtils.ensureAttributesInitialized( entry );
            new CompoundModification().replaceAttributes( entry, workingCopy, this );
        }
    }
View Full Code Here

    private void updateAutoSaveSharedReferenceCopy( IEntry entry )
    {
        EntryEditorUtils.ensureAttributesInitialized( entry );
        IEntry workingCopy = autoSaveSharedReferenceCopies.get( entry );
        EventRegistry.suspendEventFiringInCurrentThread();
        new CompoundModification().replaceAttributes( entry, workingCopy, this );
        EventRegistry.resumeEventFiringInCurrentThread();
    }
View Full Code Here

    private void updateAutoSaveSharedWorkingCopy( IEntry entry )
    {
        EntryEditorUtils.ensureAttributesInitialized( entry );
        IEntry workingCopy = autoSaveSharedWorkingCopies.get( entry );
        new CompoundModification().replaceAttributes( entry, workingCopy, this );
    }
View Full Code Here

        if ( editor.isAutoSave() )
        {
            if ( !autoSaveSharedReferenceCopies.containsKey( originalEntry ) )
            {
                autoSaveSharedReferenceCopies
                    .put( originalEntry, new CompoundModification().cloneEntry( originalEntry ) );
            }
            if ( !autoSaveSharedWorkingCopies.containsKey( originalEntry ) )
            {
                IEntry referenceCopy = autoSaveSharedReferenceCopies.get( originalEntry );
                autoSaveSharedWorkingCopies.put( originalEntry, new CompoundModification().cloneEntry( referenceCopy ) );
            }
            return autoSaveSharedWorkingCopies.get( originalEntry );
        }
        else
        {
            if ( !oscSharedReferenceCopies.containsKey( originalEntry ) )
            {
                oscSharedReferenceCopies.put( originalEntry, new CompoundModification().cloneEntry( originalEntry ) );
            }
            if ( !oscSharedWorkingCopies.containsKey( originalEntry ) )
            {
                IEntry referenceCopy = oscSharedReferenceCopies.get( originalEntry );
                oscSharedWorkingCopies.put( originalEntry, new CompoundModification().cloneEntry( referenceCopy ) );
            }
            return oscSharedWorkingCopies.get( originalEntry );
        }
    }
View Full Code Here

            entry = entry.getBrowserConnection().getEntryFromCache( entry.getDn() );
        }

        if ( entry != null )
        {
            IEntry clone = new CompoundModification().cloneEntry( entry );
            new CompoundModification().createValues( clone, values );
            LdifFile diff = org.apache.directory.studio.ldapbrowser.core.utils.Utils.computeDiff( entry, clone );
            if ( diff != null )
            {
                UpdateEntryRunnable runnable = new UpdateEntryRunnable( entry, diff
                    .toFormattedString( LdifFormatParameters.DEFAULT ) );
View Full Code Here

            {
                ISearchResult sr = ( ISearchResult ) o;
                if ( !sr.equals( workingCopy ) )
                {
                    IEntry entry = sr.getEntry();
                    IEntry referenceEntry = new CompoundModification().cloneEntry( entry );
                    referenceCopy = new SearchResult( referenceEntry, sr.getSearch() );
                    IEntry workingEntry = new CompoundModification().cloneEntry( entry );
                    workingCopy = new SearchResult( workingEntry, sr.getSearch() );
                }

                return workingCopy;
            }
View Full Code Here

            AttributeHierarchy ah = result.getAttributeWithSubtypes( property );

            // switch operation:
            if ( ah == null && newRawValue != null )
            {
                new CompoundModification().createValue( result.getEntry(), property, newRawValue );
            }
            else if ( ah != null && newRawValue == null )
            {
                List<IValue> values = new ArrayList<IValue>();
                for ( IAttribute attribute : ah.getAttributes() )
                {
                    for ( IValue value : attribute.getValues() )
                    {
                        values.add( value );
                    }
                }
                new CompoundModification().deleteValues( values );
            }
            else if ( ah != null && ah.size() == 1 && ah.getAttribute().getValueSize() == 1 && newRawValue != null )
            {
                new CompoundModification().modifyValue( ah.getAttribute().getValues()[0], newRawValue );
            }
        }
    }
View Full Code Here

        this.referenceAttributeHierarchy = attributeHierarchy;

        // clone the entry and attribute hierarchy
        IEntry entry = attributeHierarchy.getEntry();
        String attributeDescription = attributeHierarchy.getAttributeDescription();
        IEntry clone = new CompoundModification().cloneEntry( entry );
        this.workingAttributeHierarchy = clone.getAttributeWithSubtypes( attributeDescription );
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.studio.ldapbrowser.core.utils.CompoundModification

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.