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

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


    /**
     * {@inheritDoc}
     */
    public boolean performFinish()
    {
        new CompoundModification().replaceAttributes( prototypeEntry, selectedEntry, this );
        return true;
    }
View Full Code Here


        dialog.setBlockOnOpen( true );
        dialog.create();
        if ( dialog.open() == Dialog.OK )
        {
            String newAttributeDescription = wizard.getAttributeDescription();
            new CompoundModification().renameValues( values, newAttributeDescription );
        }
    }
View Full Code Here

            if ( entry != null )
            {
                // only modify the model
                // the modification at the directory is done by EntryEditorManager
                new CompoundModification().createValues( entry, values );
            }
        }
    }
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

        {
            IValue oldValue = ( IValue ) element;

            if ( EntryEditorWidgetTableMetadata.VALUE_COLUMN_NAME.equals( property ) )
            {
                new CompoundModification().modifyValue( oldValue, newRawValue );
            }
        }
    }
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

                newValues[v] = new Value( attribute, values[v].getRawValue() );
            }

            // only modify the model
            // the modification at the directory is done by SearchResultEditor.entryUpdateListener
            new CompoundModification().createValues( entry, newValues );
        }
    }
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

     * @param values
     *      the Values to delete
     */
    protected void deleteValues( Collection<IValue> values )
    {
        new CompoundModification().deleteValues( values );
    }
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.