Examples of IEntry


Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

     */
    public void openEntryEditor( EntryEditorExtension extension, IEntry[] entries, ISearchResult[] searchResults,
        IBookmark[] bookmarks )
    {
        EntryEditorInput input = null;
        IEntry entry;
        if ( entries.length == 1 )
        {
            input = new EntryEditorInput( entries[0], extension );
            entry = entries[0];
        }
        else if ( searchResults.length == 1 )
        {
            input = new EntryEditorInput( searchResults[0], extension );
            entry = searchResults[0].getEntry();
        }
        else if ( bookmarks.length == 1 )
        {
            input = new EntryEditorInput( bookmarks[0], extension );
            entry = bookmarks[0].getEntry();
            if ( entry.getBrowserConnection().getEntryFromCache( entry.getDn() ) == null )
            {
                EntryEditorUtils.ensureAttributesInitialized( entry );
            }
        }
        else
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

     *      an arrays of bookmarks
     */
    public void openEntryEditor( IEntry[] entries, ISearchResult[] searchResults, IBookmark[] bookmarks )
    {
        // Looking for the entry to test the editor on
        IEntry entry = null;
        if ( entries.length == 1 )
        {
            entry = entries[0];
        }
        else if ( searchResults.length == 1 )
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

    }


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

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

    }


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

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry


    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

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry


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

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

                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

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

        {
            return false;
        }
        else
        {
            IEntry referenceCopy = oscSharedReferenceCopies.get( originalEntry );
            IEntry workingCopy = oscSharedWorkingCopies.get( originalEntry );
            if ( referenceCopy != null && workingCopy != null )
            {
                LdifFile diff = Utils.computeDiff( referenceCopy, workingCopy );
                return diff != null;
            }
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

    IStatus saveSharedWorkingCopy( IEntry originalEntry, boolean handleError, IEntryEditor editor )
    {
        if ( editor == null || !editor.isAutoSave() )
        {
            IEntry referenceCopy = oscSharedReferenceCopies.get( originalEntry );
            IEntry workingCopy = oscSharedWorkingCopies.get( originalEntry );
            if ( referenceCopy != null && workingCopy != null )
            {
                // consistency check: don't save if there is an empty value, throw an exception as the user pressed 'save'
                for ( IAttribute attribute : workingCopy.getAttributes() )
                {
                    for ( IValue value : attribute.getValues() )
                    {
                        if ( value.isEmpty() )
                        {
View Full Code Here

Examples of org.apache.directory.studio.ldapbrowser.core.model.IEntry

    void resetSharedWorkingCopy( IEntry originalEntry, IEntryEditor editor )
    {
        if ( editor == null || !editor.isAutoSave() )
        {
            IEntry referenceCopy = oscSharedReferenceCopies.get( originalEntry );
            IEntry workingCopy = oscSharedWorkingCopies.get( originalEntry );
            if ( referenceCopy != null && workingCopy != null )
            {
                updateOscSharedReferenceCopy( originalEntry );
                updateOscSharedWorkingCopy( originalEntry );
            }
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.