directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r820942 - in /directory/studio/trunk: ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/ ldapbrowser-...
Date Fri, 02 Oct 2009 09:35:12 GMT
Author: seelmann
Date: Fri Oct  2 09:35:09 2009
New Revision: 820942

URL: http://svn.apache.org/viewvc?rev=820942&view=rev
Log:
DIRSTUDIO-515: changed the way how operational attributes are loaded

Modified:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AttributeInfo.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/FetchOperationalAttributesAction.java
Fri Oct  2 09:35:09 2009
@@ -99,7 +99,7 @@
         {
             for ( IEntry entry : entries )
             {
-                if ( !entry.isOperationalAttributesInitialized() )
+                if ( !entry.isInitOperationalAttributes() )
                 {
                     checked = false;
                 }
@@ -113,14 +113,12 @@
     public void run()
     {
         IEntry[] entries = getEntries().toArray( new IEntry[0] );
-        if ( isChecked() )
+        boolean init = !isChecked();
+        for ( IEntry entry : entries )
         {
-            new StudioBrowserJob( new InitializeAttributesRunnable( entries, false ) ).execute();
-        }
-        else
-        {
-            new StudioBrowserJob( new InitializeAttributesRunnable( entries, true ) ).execute();
+            entry.setInitOperationalAttributes( init );
         }
+        new StudioBrowserJob( new InitializeAttributesRunnable( entries ) ).execute();
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/actions/RefreshAction.java
Fri Oct  2 09:35:09 2009
@@ -151,10 +151,7 @@
         {
             // the entry input is usually a cloned entry, lookup the real entry from connection
             IEntry entry = entryInput.getBrowserConnection().getEntryFromCache( entryInput.getDn()
);
-            boolean foa = entry.getBrowserConnection().isFetchOperationalAttributes()
-                || entry.isOperationalAttributesInitialized();
-            new StudioBrowserJob( new InitializeAttributesRunnable( new IEntry[]
-                { entry }, foa ) ).execute();
+            new StudioBrowserJob( new InitializeAttributesRunnable( entry ) ).execute();
         }
         if ( searchInput != null )
         {

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetContentProvider.java
Fri Oct  2 09:35:09 2009
@@ -134,13 +134,10 @@
         {
             IEntry entry = ( IEntry ) inputElement;
 
-            boolean fetchOperationalAttributes = entry.getBrowserConnection().isFetchOperationalAttributes();

-            boolean oai = entry.isOperationalAttributesInitialized();
             boolean ai = entry.isAttributesInitialized();
-            if ( ( !ai || ( !oai && fetchOperationalAttributes ) ) && entry.isDirectoryEntry()
)
+            if ( !ai && entry.isDirectoryEntry() )
             {
-                InitializeAttributesRunnable runnable = new InitializeAttributesRunnable(
new IEntry[]
-                    { entry }, fetchOperationalAttributes );
+                InitializeAttributesRunnable runnable = new InitializeAttributesRunnable(
entry );
                 StudioBrowserJob job = new StudioBrowserJob( runnable );
                 job.execute();
                 return new Object[0];

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryTypeWizardPage.java
Fri Oct  2 09:35:09 2009
@@ -143,7 +143,7 @@
         {
             final IBrowserConnection browserConnection = entryWidget.getBrowserConnection();
             final LdapDN dn = entryWidget.getDn();
-            final IEntry[] templateEntries = new IEntry[1];
+            IEntry templateEntry = null;
 
             if ( browserConnection == null )
             {
@@ -171,8 +171,8 @@
             // check if selected DN exists
             ReadEntryRunnable readEntryRunnable = new ReadEntryRunnable( browserConnection,
dn );
             RunnableContextRunner.execute( readEntryRunnable, getContainer(), false );
-            templateEntries[0] = readEntryRunnable.getReadEntry();
-            if ( templateEntries[0] == null )
+            templateEntry = readEntryRunnable.getReadEntry();
+            if ( templateEntry == null )
             {
                 getShell().getDisplay().syncExec( new Runnable()
                 {
@@ -185,11 +185,10 @@
             }
 
             // init attributes
-            if ( !templateEntries[0].isAttributesInitialized() )
+            if ( !templateEntry.isAttributesInitialized() )
             {
-                InitializeAttributesRunnable initializeAttributesRunnable = new InitializeAttributesRunnable(
-                    templateEntries, false );
-                RunnableContextRunner.execute( initializeAttributesRunnable, getContainer(),
true );
+                InitializeAttributesRunnable runnable = new InitializeAttributesRunnable(
templateEntry );
+                RunnableContextRunner.execute( runnable, getContainer(), true );
             }
 
             // clone entry and remove non-modifiable attributes
@@ -197,7 +196,7 @@
             {
                 EventRegistry.suspendEventFiringInCurrentThread();
 
-                LdifContentRecord record = ModelConverter.entryToLdifContentRecord( templateEntries[0]
);
+                LdifContentRecord record = ModelConverter.entryToLdifContentRecord( templateEntry
);
                 DummyEntry prototypeEntry = ModelConverter.ldifContentRecordToEntry( record,
browserConnection );
                 IAttribute[] attributes = prototypeEntry.getAttributes();
                 for ( int i = 0; i < attributes.length; i++ )

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/BrowserConnectionListener.java
Fri Oct  2 09:35:09 2009
@@ -115,7 +115,7 @@
         ReloadSchemaRunnable.reloadSchema( false, browserConnection, monitor );
 
         IRootDSE rootDSE = browserConnection.getRootDSE();
-        InitializeAttributesRunnable.initializeAttributes( rootDSE, true, monitor );
+        InitializeAttributesRunnable.initializeAttributes( rootDSE, monitor );
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeAttributesRunnable.java
Fri Oct  2 09:35:09 2009
@@ -58,9 +58,6 @@
     /** The entries. */
     private IEntry[] entries;
 
-    /** The flag if operational attributes should be initialized. */
-    private boolean initOperationalAttributes;
-
 
     /**
      * Creates a new instance of InitializeAttributesRunnable.
@@ -68,10 +65,9 @@
      * @param entries the entries
      * @param initOperationalAttributes true if operational attributes should be initialized
      */
-    public InitializeAttributesRunnable( IEntry[] entries, boolean initOperationalAttributes
)
+    public InitializeAttributesRunnable( IEntry... entries )
     {
         this.entries = entries;
-        this.initOperationalAttributes = initOperationalAttributes;
     }
 
 
@@ -134,7 +130,7 @@
             monitor.worked( 1 );
             if ( entries[pi].getBrowserConnection() != null && entries[pi].isDirectoryEntry()
)
             {
-                initializeAttributes( entries[pi], initOperationalAttributes, monitor );
+                initializeAttributes( entries[pi], monitor );
             }
         }
     }
@@ -159,16 +155,16 @@
      * Initializes the attributes.
      * 
      * @param entry the entry
-     * @param initOperationalAttributes true if operational attributes should be initialized
      * @param monitor the progress monitor
      */
-    public static synchronized void initializeAttributes( IEntry entry, boolean initOperationalAttributes,
-        StudioProgressMonitor monitor )
+    public static synchronized void initializeAttributes( IEntry entry, StudioProgressMonitor
monitor )
     {
         // get user attributes or both user and operational attributes
         String[] returningAttributes = null;
         LinkedHashSet<String> raSet = new LinkedHashSet<String>();
         raSet.add( SchemaConstants.ALL_USER_ATTRIBUTES );
+        boolean initOperationalAttributes = entry.getBrowserConnection().isFetchOperationalAttributes()
+            || entry.isInitOperationalAttributes();
         if ( initOperationalAttributes )
         {
             if ( entry.getBrowserConnection().getRootDSE().isFeatureSupported(
@@ -191,8 +187,6 @@
         returningAttributes = ( String[] ) raSet.toArray( new String[raSet.size()] );
 
         initializeAttributes( entry, returningAttributes, true, monitor );
-
-        entry.setOperationalAttributesInitialized( initOperationalAttributes );
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/jobs/InitializeRootDSERunnable.java
Fri Oct  2 09:35:09 2009
@@ -294,7 +294,7 @@
         // set flags
         browserConnection.getRootDSE().setHasMoreChildren( false );
         browserConnection.getRootDSE().setAttributesInitialized( true );
-        browserConnection.getRootDSE().setOperationalAttributesInitialized( true );
+        browserConnection.getRootDSE().setInitOperationalAttributes( true );
         browserConnection.getRootDSE().setChildrenInitialized( true );
         browserConnection.getRootDSE().setHasChildrenHint( true );
         browserConnection.getRootDSE().setDirectoryEntry( true );

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
Fri Oct  2 09:35:09 2009
@@ -215,27 +215,19 @@
 
 
     /**
-     * Indicates whether this entry's operational attributes are initialized.
+     * Indicates whether this entry's operational attributes should be initialized.
      * 
-     * True means that the entry's operational attributes are completely 
-     * initialized and getAttributes() will return all operational attributes 
-     * (additionally to the non-operational attributes).
-     * 
-     * False means that the operational attributes are not or only partially
-     * initialized. The getAttributes() method will return none
-     * or only a part of the entry's operational attributes.  
-     * 
-     * @return true if this entry's attributes are initialized
+     * @return true if this entry's attributes should be initialized
      */
-    public abstract boolean isOperationalAttributesInitialized();
+    public abstract boolean isInitOperationalAttributes();
 
 
     /**
-     * Sets a flag whether this entry's operational attributes are initialized.
+     * Sets a flag whether this entry's operational attributes should be initialized.
      * 
-     * @param b the operational attributes initialized flag
+     * @param b the initialize operational attributes flag
      */
-    public abstract void setOperationalAttributesInitialized( boolean b );
+    public abstract void setInitOperationalAttributes( boolean b );
 
 
     /**

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AbstractEntry.java
Fri Oct  2 09:35:09 2009
@@ -78,6 +78,8 @@
     private static final int IS_REFERRAL_FLAG = 8;
 
     private static final int IS_SUBENTRY_FLAG = 16;
+    
+    private static final int IS_INIT_OPERATIONAL_ATTRIBUTES_FLAG = 32;
 
     private volatile int flags;
 
@@ -371,7 +373,7 @@
 
 
     /**
-     * Triggers firering of the modification event.
+     * Triggers firing of the modification event.
      * 
      * @param event
      */
@@ -431,28 +433,24 @@
     /**
      * {@inheritDoc}
      */
-    public boolean isOperationalAttributesInitialized()
+    public boolean isInitOperationalAttributes()
     {
-        AttributeInfo ai = getBrowserConnectionImpl().getAttributeInfo( this );
-        return ai != null && ai.operationalAttributesInitialized;
+        return ( flags & IS_INIT_OPERATIONAL_ATTRIBUTES_FLAG ) != 0;
     }
 
 
     /**
      * {@inheritDoc}
      */
-    public void setOperationalAttributesInitialized( boolean b )
+    public void setInitOperationalAttributes( boolean b )
     {
-        AttributeInfo ai = getBrowserConnectionImpl().getAttributeInfo( this );
-        if ( ai == null && b )
+        if ( b )
         {
-            ai = new AttributeInfo();
-            getBrowserConnectionImpl().setAttributeInfo( this, ai );
+            flags = flags | IS_INIT_OPERATIONAL_ATTRIBUTES_FLAG;
         }
-
-        if ( ai != null )
+        else
         {
-            ai.operationalAttributesInitialized = b;
+            flags = flags & ~IS_INIT_OPERATIONAL_ATTRIBUTES_FLAG;
         }
     }
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AttributeInfo.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AttributeInfo.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AttributeInfo.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/AttributeInfo.java
Fri Oct  2 09:35:09 2009
@@ -42,9 +42,6 @@
     /** The attributes initialized flag. */
     protected volatile boolean attributesInitialized = false;
 
-    /** The operational attributes initialized flag. */
-    protected volatile boolean operationalAttributesInitialized = false;
-    
     /** The attribute map. */
     protected volatile Map<String, IAttribute> attributeMap = new LinkedHashMap<String,
IAttribute>();
 

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DelegateEntry.java
Fri Oct  2 09:35:09 2009
@@ -215,11 +215,11 @@
     /**
      * {@inheritDoc}
      */
-    public boolean isOperationalAttributesInitialized()
+    public boolean isInitOperationalAttributes()
     {
         if ( getDelegate() != null )
         {
-            return getDelegate().isOperationalAttributesInitialized();
+            return getDelegate().isInitOperationalAttributes();
         }
         else if ( entryDoesNotExist )
         {
@@ -561,13 +561,13 @@
     /**
      * {@inheritDoc}
      */
-    public void setOperationalAttributesInitialized( boolean b )
+    public void setInitOperationalAttributes( boolean b )
     {
         if ( !b )
         {
             if ( getDelegate() != null )
             {
-                getDelegate().setOperationalAttributesInitialized( b );
+                getDelegate().setInitOperationalAttributes( b );
             }
             setDelegate( null );
             entryDoesNotExist = false;
@@ -585,7 +585,7 @@
             }
             if ( getDelegate() != null )
             {
-                getDelegate().setOperationalAttributesInitialized( b );
+                getDelegate().setInitOperationalAttributes( b );
             }
         }
     }

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
(original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/impl/DummyEntry.java
Fri Oct  2 09:35:09 2009
@@ -336,7 +336,7 @@
     /**
      * This implementation always returns true.
      */
-    public boolean isOperationalAttributesInitialized()
+    public boolean isInitOperationalAttributes()
     {
         return true;
     }
@@ -399,7 +399,7 @@
     /**
      * This implementation does nothing.
      */
-    public void setOperationalAttributesInitialized( boolean b )
+    public void setInitOperationalAttributes( boolean b )
     {
     }
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
Fri Oct  2 09:35:09 2009
@@ -627,11 +627,11 @@
                 oscEditor.workingCopyModified( source );
             }
         }
-        else
-        {
-            // only update the reference copy
-            updateOscSharedReferenceCopy( originalEntry );
-        }
+//        else
+//        {
+//            // only update the reference copy
+//            updateOscSharedReferenceCopy( originalEntry );
+//        }
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorUtils.java
Fri Oct  2 09:35:09 2009
@@ -42,10 +42,7 @@
     {
         if ( !entry.isAttributesInitialized() )
         {
-            boolean foa = entry.getBrowserConnection().isFetchOperationalAttributes()
-                || entry.isOperationalAttributesInitialized();
-            InitializeAttributesRunnable iar = new InitializeAttributesRunnable( new IEntry[]
-                { entry }, foa );
+            InitializeAttributesRunnable iar = new InitializeAttributesRunnable( entry );
             RunnableContextRunner.execute( iar, null, true );
         }
     }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsAction.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/CopyEntryAsAction.java
Fri Oct  2 09:35:09 2009
@@ -202,7 +202,7 @@
             IEntry[] uninitializedEntries = ( IEntry[] ) uninitializedEntryList
                 .toArray( new IEntry[uninitializedEntryList.size()] );
 
-            InitializeAttributesRunnable runnable = new InitializeAttributesRunnable( uninitializedEntries,
false );
+            InitializeAttributesRunnable runnable = new InitializeAttributesRunnable( uninitializedEntries
);
             RunnableContextRunner.execute( runnable, null, true );
 
             // SyncInitializeEntryJob job = new

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java?rev=820942&r1=820941&r2=820942&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/dialogs/properties/EntryPropertyPage.java
Fri Oct  2 09:35:09 2009
@@ -244,8 +244,8 @@
     private void reloadOperationalAttributes()
     {
         IEntry entry = EntryPropertyPage.getEntry( getElement() );
-        InitializeAttributesRunnable runnable = new InitializeAttributesRunnable( new IEntry[]
-            { entry }, true );
+        entry.setInitOperationalAttributes( true );
+        InitializeAttributesRunnable runnable = new InitializeAttributesRunnable( entry );
         RunnableContextRunner.execute( runnable, null, true );
         entryUpdated( entry );
     }
@@ -257,10 +257,10 @@
     private void reloadEntry()
     {
         IEntry entry = EntryPropertyPage.getEntry( getElement() );
+        entry.setInitOperationalAttributes( true );
         InitializeChildrenRunnable runnable1 = new InitializeChildrenRunnable( new IEntry[]
             { entry }, false );
-        InitializeAttributesRunnable runnable2 = new InitializeAttributesRunnable( new IEntry[]
-            { entry }, true );
+        InitializeAttributesRunnable runnable2 = new InitializeAttributesRunnable( entry
);
         RunnableContextRunner.execute( runnable1, null, true );
         RunnableContextRunner.execute( runnable2, null, true );
         entryUpdated( entry );



Mime
View raw message