directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r592082 [8/20] - in /directory/sandbox/felixk/studio-ldapbrowser-core: ./ META-INF/ src/ src/main/ src/main/java/ src/main/java/org/ src/main/java/org/apache/ src/main/java/org/apache/directory/ src/main/java/org/apache/directory/studio/ sr...
Date Mon, 05 Nov 2007 16:52:07 GMT
Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DN.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DN.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DN.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DN.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,411 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+
+
+/**
+ * A DN represents a LDAP distinguished name.
+ *
+ * @deprecated This class will be removed in the next version. The DN/RDN/RDNPart 
+ * classes are replaced with the shared-ldap LdapDN/Rdn/ATAV. This class just 
+ * remains to provide backward compatibility of the old browserconnections.xml
+ * file that stores searches and bookmarks.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class DN implements Serializable
+{
+
+    /** The generated serialVersionUID. */
+    private static final long serialVersionUID = 2343676941769163982L;
+
+    /** The rdns */
+    private RDN[] rdns;
+
+
+    /**
+     * Creates an empty DN.
+     *
+     */
+    public DN()
+    {
+        this.rdns = new RDN[0];
+    }
+
+
+    /**
+     * Creates a new instance of DN containing only on RDN.
+     * The given RDN is cloned.
+     *
+     * @param rdn the rdn
+     */
+    public DN( RDN rdn )
+    {
+        if ( rdn == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_rdn );
+        }
+
+        this.rdns = new RDN[1];
+        this.rdns[0] = new RDN( rdn );
+    }
+
+
+    /**
+     * Creates a new instance of DN. The given string is parsed.
+     *
+     * @param dn the dn
+     * @throws NameException if parsing fails.
+     */
+    public DN( String dn ) throws NameException
+    {
+        if ( dn == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_dn );
+        }
+
+        // this.parseDn(dn.trim());
+        this.parseDn( dn );
+    }
+
+
+    /**
+     * Creates a clone of the given DN.
+     *
+     * @param dn the DN
+     */
+    public DN( DN dn )
+    {
+        if ( dn == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_dn );
+        }
+
+        this.rdns = new RDN[dn.getRdns().length];
+        for ( int i = 0; i < dn.getRdns().length; i++ )
+        {
+            this.rdns[i] = new RDN( dn.getRdns()[i] );
+        }
+    }
+
+
+    /**
+     * Creates a new instance of DN using the given RDN and parent.
+     * The given RDN and parent are cloned.
+     *
+     * @param rdn the RDN
+     * @param parent the parent DN
+     */
+    public DN( RDN rdn, DN parent )
+    {
+        if ( rdn == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_rdn );
+        }
+        if ( parent == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_dn );
+        }
+
+        this.rdns = new RDN[parent.getRdns().length + 1];
+        this.rdns[0] = new RDN( rdn );
+        for ( int i = 0; i < parent.getRdns().length; i++ )
+        {
+            this.rdns[i + 1] = new RDN( parent.getRdns()[i] );
+        }
+    }
+
+
+    /**
+     * Creates a new instance of DN using the given local name and suffix.
+     * The given local name and suffix are cloned.
+     *
+     * @param localName the local name
+     * @param suffix the suffix
+     */
+    public DN( DN localName, DN suffix )
+    {
+        if ( localName == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_dn );
+        }
+        if ( suffix == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_dn );
+        }
+
+        this.rdns = new RDN[localName.getRdns().length + suffix.getRdns().length];
+        for ( int i = 0; i < localName.getRdns().length; i++ )
+        {
+            this.rdns[i] = new RDN( localName.getRdns()[i] );
+        }
+        for ( int i = 0; i < suffix.getRdns().length; i++ )
+        {
+            this.rdns[i + localName.getRdns().length] = new RDN( suffix.getRdns()[i] );
+        }
+    }
+
+
+    /**
+     * Creates a new instance of DN. The given strings are parsed.
+     *
+     * @param rdn the rdn
+     * @param parent the parent dn
+     * @throws NameException if parsing fails
+     */
+    public DN( String rdn, String parent ) throws NameException
+    {
+
+        if ( rdn == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_rdn );
+        }
+        if ( parent == null )
+        {
+            throw new IllegalArgumentException( BrowserCoreMessages.model__empty_dn );
+        }
+
+        // this.parseDn(parent.trim());
+        this.parseDn( parent );
+
+        RDN[] rdns = this.rdns;
+        this.rdns = new RDN[rdns.length + 1];
+        this.rdns[0] = new RDN( rdn );
+        System.arraycopy( rdns, 0, this.rdns, 1, rdns.length );
+    }
+
+
+    /**
+     * Gets the RDN of this DN.
+     *
+     * @return the RDN
+     */
+    public RDN getRdn()
+    {
+        if ( this.rdns.length > 0 )
+        {
+            return this.rdns[0];
+        }
+        else
+        {
+            return new RDN();
+        }
+    }
+
+
+    /**
+     * Gets the parent DN.
+     * 
+     * @return the parent DN
+     */
+    public DN getParentDn()
+    {
+        if ( this.rdns.length < 1 )
+        {
+            return null;
+        }
+        else
+        {
+            RDN[] parentRdns = new RDN[this.rdns.length - 1];
+            for ( int i = 1; i < this.rdns.length; i++ )
+            {
+                parentRdns[i - 1] = new RDN( this.rdns[i] );
+            }
+            DN parent = new DN();
+            parent.rdns = parentRdns;
+            return parent;
+        }
+    }
+
+
+    /**
+     * Extracts the local name by stripping the given
+     * suffix from this DN.
+     *
+     * @param suffix the suffix to strip
+     *
+     * @return the local name
+     */
+    public DN getLocalName( DN suffix )
+    {
+        if ( suffix != null && suffix.getRdns().length > 0 )
+        {
+            DN localName = new DN();
+            for ( int i = getRdns().length - suffix.getRdns().length - 1; i >= 0; i-- )
+            {
+                localName = new DN( getRdns()[i], localName );
+            }
+            return localName;
+        }
+        else
+        {
+            return this;
+        }
+    }
+
+
+    /**
+     * Returns the string representation of this DN.
+     * 
+     * @see java.lang.Object#toString()
+     */
+    public String toString()
+    {
+        StringBuffer sb = new StringBuffer();
+
+        for ( int i = 0; i < this.rdns.length; i++ )
+        {
+            sb.append( this.rdns[i].toString() );
+            if ( i + 1 < rdns.length )
+            {
+                sb.append( "," ); //$NON-NLS-1$
+            }
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * Returns the string representation of this DN, but 
+     * lowercased and with the numerid OIDs instead of the types.
+     *
+     * @param schema the schema
+     * @return the lowercased and OID-fizied string representation of this DN
+     */
+    public String toOidString( Schema schema )
+    {
+        StringBuffer sb = new StringBuffer();
+
+        for ( int i = 0; i < this.rdns.length; i++ )
+        {
+            sb.append( this.rdns[i].toOidString( schema ) );
+            if ( i + 1 < rdns.length )
+            {
+                sb.append( "," ); //$NON-NLS-1$
+            }
+        }
+
+        return sb.toString();
+    }
+
+
+    /**
+     * Parses the dn.
+     *
+     * @param dn the dn
+     * @throws NameException if parsing fails
+     */
+    private void parseDn( String dn ) throws NameException
+    {
+        List<RDN> rdnList = new ArrayList<RDN>( 3 );
+
+        boolean backslash = false;
+        int start = 0;
+        for ( int i = 0; i < dn.length(); i++ )
+        {
+            if ( dn.charAt( i ) == '\\' && !backslash )
+            {
+                backslash = true;
+            }
+            else
+            {
+                String rdn = null;
+                if ( dn.charAt( i ) == ',' && !backslash )
+                {
+                    rdn = dn.substring( start, i );
+                }
+                else if ( i == dn.length() - 1 )
+                {
+                    rdn = dn.substring( start );
+                }
+                if ( rdn != null )
+                {
+                    rdnList.add( new RDN( rdn ) );
+                    start = i + 1;
+
+                    // remove spaces between RDNs
+                    for ( ; start < dn.length() && dn.charAt( start ) == ' '; i++ )
+                    {
+                        start++;
+                    }
+                }
+                backslash = false;
+            }
+        }
+
+        this.rdns = rdnList.toArray( new RDN[rdnList.size()] );
+    }
+
+
+    /**
+     * Gets the RDNs.
+     * 
+     * @return the RDNs
+     */
+    public RDN[] getRdns()
+    {
+        return rdns;
+    }
+
+
+    /**
+     * Sets the RDNs.
+     * 
+     * @param rdns the RDNs
+     */
+    public void setRdns( RDN[] rdns )
+    {
+        this.rdns = rdns;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean equals( Object o ) throws ClassCastException
+    {
+        if ( o instanceof DN )
+        {
+            return this.toString().equals( ( ( DN ) o ).toString() );
+        }
+        return false;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public int hashCode()
+    {
+        return this.toString().hashCode();
+    }
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DN.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DirectoryTypeDetector.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DirectoryTypeDetector.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DirectoryTypeDetector.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DirectoryTypeDetector.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,38 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+/**
+ * A DirectoryTypeDetector detects the directory type.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface DirectoryTypeDetector
+{
+    /**
+     * Tries to detect the directory type from the given Root DSE.
+     * 
+     * @param rootDSE the Root DSE
+     * @return the directory type or null if unknown
+     */
+    public String detectDirectoryType( IRootDSE rootDSE );
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/DirectoryTypeDetector.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,370 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.AttributeTypeDescription;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.AttributePropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * An IAttribute represents an LDAP attribute.
+ */
+public interface IAttribute extends Serializable, IAdaptable, AttributePropertyPageProvider, EntryPropertyPageProvider,
+    ConnectionPropertyPageProvider
+{
+
+    /**
+     * ( 2.5.18.3 NAME 'creatorsName' EQUALITY distinguishedNameMatch SYNTAX
+     * 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE NO-USER-MODIFICATION USAGE
+     * directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_CREATORS_NAME = "creatorsName"; //$NON-NLS-1$
+
+    /**
+     * ( 2.5.18.1 NAME 'createTimestamp' EQUALITY generalizedTimeMatch
+     * ORDERING generalizedTimeOrderingMatch SYNTAX
+     * 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE NO-USER-MODIFICATION USAGE
+     * directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_CREATE_TIMESTAMP = "createTimestamp"; //$NON-NLS-1$
+
+    /**
+     * ( 2.5.18.4 NAME 'modifiersName' EQUALITY distinguishedNameMatch
+     * SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE
+     * NO-USER-MODIFICATION USAGE directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_MODIFIERS_NAME = "modifiersName"; //$NON-NLS-1$
+
+    /**
+     * ( 2.5.18.2 NAME 'modifyTimestamp' EQUALITY generalizedTimeMatch
+     * ORDERING generalizedTimeOrderingMatch SYNTAX
+     * 1.3.6.1.4.1.1466.115.121.1.24 SINGLE-VALUE NO-USER-MODIFICATION USAGE
+     * directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_MODIFY_TIMESTAMP = "modifyTimestamp"; //$NON-NLS-1$
+
+    /**
+     * ( 2.5.21.9 NAME 'structuralObjectClass' EQUALITY
+     * objectIdentifierMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.38
+     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_STRUCTURAL_OBJECT_CLASS = "structuralObjectClass"; //$NON-NLS-1$
+
+    /**
+     * ( 2.5.21.10 NAME 'governingStructureRule' EQUALITY integerMatch
+     * SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE
+     * NO-USER-MODIFICATION USAGE directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_GOVERNING_STRUCTURE_RULE = "governingStructureRule"; //$NON-NLS-1$
+
+    /**
+     * ( 1.3.6.1.1.16.4 NAME 'entryUUID' DESC 'UUID of the entry' EQUALITY
+     * uuidMatch ORDERING uuidOrderingMatch SYNTAX 1.3.6.1.1.16.1
+     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_ENTRY_UUID = "entryUUID"; //$NON-NLS-1$
+
+    /**
+     * ( 2.5.18.10 NAME 'subschemaSubentry' EQUALITY distinguishedNameMatch
+     * SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 SINGLE-VALUE
+     * NO-USER-MODIFICATION USAGE directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_SUBSCHEMA_SUBENTRY = "subschemaSubentry"; //$NON-NLS-1$
+
+    /**
+     * ( 2.5.18.9 NAME 'hasSubordinates' DESC 'X.501: entry has children'
+     * EQUALITY booleanMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.7
+     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_HAS_SUBORDINATES = "hasSubordinates"; //$NON-NLS-1$
+
+    /**
+     * ( 1.3.1.1.4.1.453.16.2.103 NAME 'numSubordinates' DESC 'count of
+     * immediate subordinates' EQUALITY integerMatch ORDERING
+     * integerOrderingMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
+     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation X-ORIGIN
+     * 'numSubordinates Internet Draft' )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_NUM_SUBORDINATES = "numSubordinates"; //$NON-NLS-1$
+
+    /**
+     * ( 2.16.840.1.113719.1.27.4.49 NAME 'subordinateCount' DESC
+     * 'Operational Attribute' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
+     * SINGLE-VALUE NO-USER-MODIFICATION USAGE directoryOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_SUBORDINATE_COUNT = "subordinateCount"; //$NON-NLS-1$
+
+    /**
+     * ( 1.3.6.1.1.4 NAME 'vendorName' EQUALITY caseExactIA5Match SYNTAX
+     * 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE NO-USER-MODIFICATION USAGE
+     * dSAOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_VENDOR_NAME = "vendorName"; //$NON-NLS-1$
+
+    /**
+     * ( 1.3.6.1.1.5 NAME 'vendorVersion' EQUALITY caseExactIA5Match SYNTAX
+     * 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE NO-USER-MODIFICATION USAGE
+     * dSAOperation )
+     */
+    public static final String OPERATIONAL_ATTRIBUTE_VENDOR_VERSION = "vendorVersion"; //$NON-NLS-1$
+
+    /** The attribute type objectClass */
+    public static final String OBJECTCLASS_ATTRIBUTE = "objectClass"; //$NON-NLS-1$
+
+    /** The OID of the objectClass attribute, 2.5.4.0 */
+    public static final String OBJECTCLASS_ATTRIBUTE_OID = "2.5.4.0"; //$NON-NLS-1$
+
+    /** The attribute type ref */
+    public static final String REFERRAL_ATTRIBUTE = "ref"; //$NON-NLS-1$
+
+    /** The attribute type aliasedObjectName */
+    public static final String ALIAS_ATTRIBUTE = "aliasedObjectName"; //$NON-NLS-1$
+
+    /** The options delimiter ';' */
+    public static final String OPTION_DELIMITER = ";"; //$NON-NLS-1$
+
+    /** The language tag prefix 'lang-' */
+    public static final String OPTION_LANG_PREFIX = "lang-"; //$NON-NLS-1$
+
+
+    /**
+     * Gets the entry of this attribute.
+     * 
+     * @return the entry of this attribute, never null
+     */
+    public abstract IEntry getEntry();
+
+
+    /**
+     * Returns true if this attribute is consistent. The following
+     * conditions must be fulfilled:
+     * 
+     * <ul>
+     * <li>The attribute must contain at least one value</li>
+     * <li>The attribute mustn't contain any empty value</li>
+     * </ul>
+     * 
+     * @return true if the attribute ist consistent
+     */
+    public abstract boolean isConsistent();
+
+
+    /**
+     * Returns true if this attribute is a must attribute of its entry
+     * according to the schema and the entry's object classes.
+     * 
+     * @return true if this attribute is a must attribute of its entry.
+     */
+    public abstract boolean isMustAttribute();
+
+
+    /**
+     * Returns true if this attribute is a may attribute of its entry
+     * according to the schema and the entry's object classes.
+     * 
+     * @return true if this attribute is a may attribute of its entry.
+     */
+    public abstract boolean isMayAttribute();
+
+
+    /**
+     * Returns true if this attribute is an operational attribute according
+     * to the schema.
+     * 
+     * @return true if this attribute is an operational attribute.
+     */
+    public abstract boolean isOperationalAttribute();
+
+
+    /**
+     * Return true if this attribute is the objeCtclass attribute.
+     * 
+     * @return true if this attribute is the objectClass attribute.
+     */
+    public abstract boolean isObjectClassAttribute();
+
+
+    /**
+     * Return true if the attribute is of type String.
+     * 
+     * @return true if the attribute is of type String.
+     */
+    public abstract boolean isString();
+
+
+    /**
+     * Return true if the attribute is of type byte[].
+     * 
+     * @return true if the attribute is of type byte[].
+     */
+    public abstract boolean isBinary();
+
+
+    /**
+     * Adds an empty value.
+     * 
+     */
+    public abstract void addEmptyValue();
+
+
+    /**
+     * Removes one empty value if one is present.
+     * 
+     */
+    public abstract void deleteEmptyValue();
+
+
+    /**
+     * Adds the given value to this attribute. The value's attribute must be
+     * this attribute.
+     * 
+     * @param valueToAdd
+     *                the value to add
+     * @throws IllegalArgumentException
+     *                 if the value is null or if the value's attribute
+     *                 isn't this attribute.
+     */
+    public abstract void addValue( IValue valueToAdd ) throws IllegalArgumentException;
+
+
+    /**
+     * Deletes the given value from this attribute.
+     * 
+     * @param valueToDelete
+     *                the value to delete
+     * @throws IllegalArgumentException
+     *                 if the value is null or if the value's attribute
+     *                 isn't this attribute.
+     */
+    public abstract void deleteValue( IValue valueToDelete ) throws IllegalArgumentException;
+
+
+    /**
+     * Replaces the old value with the new value.
+     * 
+     * @param oldValue
+     *                the value that should be replaced
+     * @param newValue
+     *                the value that should be added
+     * @throws IllegalArgumentException
+     *                 if the value is null or if the value's attribute
+     *                 isn't this attribute.
+     */
+    public abstract void modifyValue( IValue oldValue, IValue newValue )
+        throws IllegalArgumentException;
+
+
+    /**
+     * Gets the values of this attribute.
+     * 
+     * @return the values of this attribute, may be an empty array, never null.
+     */
+    public abstract IValue[] getValues();
+
+
+    /**
+     * Gets the number of values in this attribute.
+     * 
+     * @return the number of values in this attribute.
+     */
+    public abstract int getValueSize();
+
+
+    /**
+     * Gets the description of this attribute. The description 
+     * consists of the attribute type and optional options.
+     * 
+     * @return the description of this attribute.
+     */
+    public abstract String getDescription();
+
+
+    /**
+     * Gets the type of this attribute (description without options).
+     * 
+     * @return the attribute type.
+     */
+    public abstract String getType();
+
+
+    /**
+     * Gets all values as byte[]. If the values aren't binary they are
+     * converted to byte[] using UTF-8 encoding.
+     * 
+     * @return The binary values
+     */
+    public abstract byte[][] getBinaryValues();
+
+
+    /**
+     * Gets the first value as string if one is present, null otherwise
+     * 
+     * @return The first value if one present, null otherwise
+     */
+    public abstract String getStringValue();
+
+
+    /**
+     * Gets all values as String. If the values aren't strings they are
+     * converted using UTF-8 encoding.
+     * 
+     * @return The string values
+     */
+    public abstract String[] getStringValues();
+
+
+    /**
+     * Returns true if the argument is also of type IAttribute and they are
+     * equal.
+     * 
+     * IAttributes are equal if there entries and there attribute
+     * description are equal.
+     * 
+     * @param o
+     *                The attribute to compare, must be of type IAttribute
+     * @return true if the argument is equal to this.
+     */
+    public abstract boolean equals( Object o );
+
+
+    /**
+     * Gets the AttributeTypeDescription of this attribute.
+     * 
+     * @return the AttributeTypeDescription of this attribute, may be the
+     *         default or a dummy
+     */
+    public abstract AttributeTypeDescription getAttributeTypeDescription();
+
+
+    /**
+     * Gets the AttributeDescription of this attribute.
+     * 
+     * @return the AttributeDescription of this attribute,.
+     */
+    public abstract AttributeDescription getAttributeDescription();
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IAttribute.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,107 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.BookmarkPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * An IBookmark is used as shortcut to an entry in the DIT.
+ * The target entry is defined by a connection a DN.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IBookmark extends Serializable, IAdaptable, BookmarkPropertyPageProvider, EntryPropertyPageProvider,
+    ConnectionPropertyPageProvider
+{
+
+    /**
+     * Gets the target DN.
+     * 
+     * @return the DN
+     */
+    public LdapDN getDn();
+
+
+    /**
+     * Sets the target DN.
+     * 
+     * @param dn the DN
+     */
+    public void setDn( LdapDN dn );
+
+
+    /**
+     * Gets the symbolic name.
+     * 
+     * @return the name
+     */
+    public String getName();
+
+
+    /**
+     * Sets the symbolic name.
+     * 
+     * @param name the name
+     */
+    public void setName( String name );
+
+
+    /**
+     * Gets the browser connection.
+     * 
+     * @return the browser connection
+     */
+    public IBrowserConnection getBrowserConnection();
+
+
+    /**
+     * Gets the entry.
+     * 
+     * @return the entry
+     */
+    public IEntry getEntry();
+
+
+    /**
+     * Gets the bookmark parameter.
+     * 
+     * @return the bookmark parameter
+     */
+    public BookmarkParameter getBookmarkParameter();
+
+
+    /**
+     * Sets the bookmark parameter.
+     * 
+     * @param bookmarkParameter the bookmark parameter
+     */
+    public void setBookmarkParameter( BookmarkParameter bookmarkParameter );
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBookmark.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,385 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.studio.connection.core.Connection;
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.BookmarkManager;
+import org.apache.directory.studio.ldapbrowser.core.SearchManager;
+import org.apache.directory.studio.ldapbrowser.core.model.impl.ModificationLogger;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Schema;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * An IBrowserConnection represents a connection for the LDAP browser.
+ * It holds an instance to the underlying connection of the connection plugin,
+ * additional it includes advanced connection parameters for the LDAP browser. 
+ * It also provides an entry cache.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IBrowserConnection extends Serializable, IAdaptable, ConnectionPropertyPageProvider
+{
+
+    /** The key for the connection parameter "Get Base DNs from Root DSE". */
+    public static String CONNECTION_PARAMETER_FETCH_BASE_DNS = "ldapbrowser.fetchBaseDns";
+
+    /** The key for the connection parameter "Base DN". */
+    public static String CONNECTION_PARAMETER_BASE_DN = "ldapbrowser.baseDn";
+
+    /** The key for the connection parameter "Count Limit". */
+    public static String CONNECTION_PARAMETER_COUNT_LIMIT = "ldapbrowser.countLimit";
+
+    /** The key for the connection parameter "Time Limit". */
+    public static String CONNECTION_PARAMETER_TIME_LIMIT = "ldapbrowser.timeLimit";
+
+    /** The key for the connection parameter "Alias Dereferencing". */
+    public static String CONNECTION_PARAMETER_ALIASES_DEREFERENCING_METHOD = "ldapbrowser.aliasesDereferencingMethod";
+
+    /** The key for the connection parameter "Referrals Handling". */
+    public static String CONNECTION_PARAMETER_REFERRALS_HANDLING_METHOD = "ldapbrowser.referralsHandlingMethod";
+
+    /**
+     * Enum for alias dereferencing method.
+     * 
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
+    public enum AliasDereferencingMethod
+    {
+
+        /** Never. */
+        NEVER(0),
+
+        /** Always. */
+        ALWAYS(1),
+
+        /** Finding. */
+        FINDING(2),
+
+        /** Search. */
+        SEARCH(3);
+
+        private final int ordinal;
+
+
+        private AliasDereferencingMethod( int ordinal )
+        {
+            this.ordinal = ordinal;
+        }
+
+
+        /**
+         * Gets the ordinal.
+         * 
+         * @return the ordinal
+         */
+        public int getOrdinal()
+        {
+            return ordinal;
+        }
+
+
+        /**
+         * Gets the AliasDereferencingMethod by ordinal.
+         * 
+         * @param ordinal the ordinal
+         * 
+         * @return the AliasDereferencingMethod
+         */
+        public static AliasDereferencingMethod getByOrdinal( int ordinal )
+        {
+            switch ( ordinal )
+            {
+                case 0:
+                    return NEVER;
+                case 1:
+                    return ALWAYS;
+                case 2:
+                    return FINDING;
+                case 3:
+                    return SEARCH;
+                default:
+                    return null;
+            }
+        }
+    }
+
+    /**
+     * Enum for referral handling method.
+     * 
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
+    public enum ReferralHandlingMethod
+    {
+
+        /** Ignore. */
+        IGNORE(0),
+
+        /** Follow. */
+        FOLLOW(1),
+
+        /** Manual. */
+        MANUAL(2);
+
+        private final int ordinal;
+
+
+        private ReferralHandlingMethod( int ordinal )
+        {
+            this.ordinal = ordinal;
+        }
+
+
+        /**
+         * Gets the ordinal.
+         * 
+         * @return the ordinal
+         */
+        public int getOrdinal()
+        {
+            return ordinal;
+        }
+
+
+        /**
+         * Gets the ReferralHandlingMethod by ordinal.
+         * 
+         * @param ordinal the ordinal
+         * 
+         * @return the ReferralHandlingMethod
+         */
+        public static ReferralHandlingMethod getByOrdinal( int ordinal )
+        {
+            switch ( ordinal )
+            {
+                case 0:
+                    return IGNORE;
+                case 1:
+                    return FOLLOW;
+                case 2:
+                    return MANUAL;
+                default:
+                    return null;
+            }
+        }
+    }
+
+    /** The MangageDsaIT control OID. */
+    public static final String CONTROL_MANAGEDSAIT = "2.16.840.1.113730.3.4.2"; //$NON-NLS-1$
+
+
+    /**
+     * Gets the URL of this connection.
+     * 
+     * @return the URL of this connection
+     */
+    public abstract URL getUrl();
+
+
+    /**
+     * Gets the flag whether the base DNs is retrieved
+     * from Root DSE or whether the base DN is defined manually.
+     * 
+     * @return true, if the base DNs are fetched from Root DSE, 
+     *         false, if the base DN is defined manually
+     */
+    public abstract boolean isFetchBaseDNs();
+
+
+    /**
+     * Sets the flag whether the base DNs should be retrieved
+     * from Root DSE or whether the base DN is defined manually.
+     * 
+     * @param fetchBaseDNs true to get the base DNs from Root DSE,
+     *                     false to define one manually
+     */
+    public abstract void setFetchBaseDNs( boolean fetchBaseDNs );
+
+
+    /**
+     * Gets the manually defined base DN.
+     * 
+     * @return the manually defined base ND
+     */
+    public abstract LdapDN getBaseDN();
+
+
+    /**
+     * Sets the manually defined base DN.
+     * 
+     * @param baseDN the new base DN
+     */
+    public abstract void setBaseDN( LdapDN baseDN );
+
+
+    /**
+     * Gets the count limit.
+     * 
+     * @return the count limit
+     */
+    public abstract int getCountLimit();
+
+
+    /**
+     * Sets the count limit.
+     * 
+     * @param countLimit the new count limit
+     */
+    public abstract void setCountLimit( int countLimit );
+
+
+    /**
+     * Gets the aliases dereferencing method.
+     * 
+     * @return the aliases dereferencing method
+     */
+    public abstract AliasDereferencingMethod getAliasesDereferencingMethod();
+
+
+    /**
+     * Sets the aliases dereferencing method.
+     * 
+     * @param aliasesDereferencingMethod the new aliases dereferencing method
+     */
+    public abstract void setAliasesDereferencingMethod( AliasDereferencingMethod aliasesDereferencingMethod );
+
+
+    /**
+     * Gets the referrals handling method.
+     * 
+     * @return the referrals handling method
+     */
+    public abstract ReferralHandlingMethod getReferralsHandlingMethod();
+
+
+    /**
+     * Sets the referrals handling method.
+     * 
+     * @param referralsHandlingMethod the new referrals handling method
+     */
+    public abstract void setReferralsHandlingMethod( ReferralHandlingMethod referralsHandlingMethod );
+
+
+    /**
+     * Gets the time limit.
+     * 
+     * @return the time limit
+     */
+    public abstract int getTimeLimit();
+
+
+    /**
+     * Sets the time limit.
+     * 
+     * @param timeLimit the new time limit
+     */
+    public abstract void setTimeLimit( int timeLimit );
+
+
+    /**
+     * Gets the root DSE.
+     * 
+     * @return the root DSE
+     */
+    public abstract IRootDSE getRootDSE();
+
+
+    /**
+     * Gets the schema.
+     * 
+     * @return the schema, never null
+     */
+    public abstract Schema getSchema();
+
+
+    /**
+     * Sets the schema.
+     * 
+     * @param schema the new schema
+     */
+    public abstract void setSchema( Schema schema );
+
+
+    /**
+     * Gets the search manager.
+     * 
+     * @return the search manager
+     */
+    public abstract SearchManager getSearchManager();
+
+
+    /**
+     * Gets the bookmark manager.
+     * 
+     * @return the bookmark manager
+     */
+    public abstract BookmarkManager getBookmarkManager();
+
+
+    /**
+     * Gets the modification logger.
+     * 
+     * @return the modification logger
+     */
+    public abstract ModificationLogger getModificationLogger();
+
+
+    /**
+     * Gets the entry from cache.
+     * 
+     * @param dn the DN of the entry
+     * 
+     * @return the entry from cache or null if the entry isn't cached
+     */
+    public abstract IEntry getEntryFromCache( LdapDN dn );
+
+
+    /**
+     * Gets the connection.
+     * 
+     * @return the connection
+     */
+    public abstract Connection getConnection();
+
+
+    /**
+     * Puts the entry to the cache.
+     * 
+     * @param entry the entry to cache
+     */
+    public void cacheEntry( IEntry entry );
+
+
+    /**
+     * Removes the entry and all children recursively from the cache.
+     * 
+     * @param entry the entry to remove from cache
+     */
+    public abstract void uncacheEntryRecursive( IEntry entry );
+}
\ No newline at end of file

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IBrowserConnection.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,394 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.name.Rdn;
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.model.schema.Subschema;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * An IEntry represents an LDAP entry.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IEntry extends Serializable, IAdaptable, EntryPropertyPageProvider, ConnectionPropertyPageProvider
+{
+
+    /**
+     * Adds the given child to this entry.
+     * 
+     * @param childToAdd
+     *                the child to add
+     */
+    public abstract void addChild( IEntry childToAdd );
+
+
+    /**
+     * Deletes the given child and all its children from this entry.
+     * 
+     * @param childToDelete
+     *                the child to delete
+     */
+    public abstract void deleteChild( IEntry childToDelete );
+
+
+    /**
+     * Adds the given attribute to this entry. The attribute's entry must be
+     * this entry.
+     * 
+     * @param attributeToAdd
+     *                the attribute to add
+     * @throws IllegalArgumentException
+     *                 if the attribute is already present in this entry or
+     *                 if the attribute's entry isn't this entry.
+     */
+    public abstract void addAttribute( IAttribute attributeToAdd ) throws IllegalArgumentException;
+
+
+    /**
+     * Deletes the given attribute from this entry.
+     * 
+     * @param attributeToDelete
+     *                the attribute to delete
+     * @throws IllegalArgumentException
+     *                 if the attribute isn't present in this entry.
+     */
+    public abstract void deleteAttribute( IAttribute attributeToDelete ) throws IllegalArgumentException;
+
+
+    /**
+     * Checks if this entry with its attributes is consistent. The following
+     * conditions must be fulfilled:
+     * 
+     * <ul>
+     * <li>The objectClass attribute must be present</li>
+     * <li>All must attributes must be present</li>
+     * <li>There mustn't be any empty value</li>
+     * </ul>
+     * 
+     * @return true if this entry is consistent
+     */
+    public abstract boolean isConsistent();
+
+
+    /**
+     * Indicates whether this entry exists in directory. Otherwise it
+     * is a new entry created from the user and not still written to directory.
+     * 
+     * @return true it this entry is a directory entry
+     */
+    public abstract boolean isDirectoryEntry();
+
+
+    /**
+     * Sets whether this entry exists in directory.
+     * 
+     * @param isDirectoryEntry
+     *                true if this entry exists in directory.
+     */
+    public abstract void setDirectoryEntry( boolean isDirectoryEntry );
+
+
+    /**
+     * Indicates whether this entry is an alias entry.
+     * 
+     * An entry is an alias entry if it has the object class 'alias'.
+     * 
+     * Even if the object class attribute is not initialized an entry
+     * is supposed to be an alias entry if the alias flag is set.
+     * 
+     * @return true, if this entry is an alias entry
+     */
+    public abstract boolean isAlias();
+
+
+    /**
+     * Sets a flag wheter this entry is an alias entry.
+     * 
+     * This method is called during a search if the initialization
+     * of the alias flag is requested. 
+     * 
+     * @param b the alias flag
+     */
+    public abstract void setAlias( boolean b );
+
+
+    /**
+     * Indicates wheter this entry is a referral entry.
+     * 
+     * An entry is a referral entry if it has the objectClass 'referral'.
+     * 
+     * Even if the object class attribute is not initialized an entry
+     * is supposed to be a referral entry if the referral flag is set.
+     * 
+     * @return true, if this entry is a referral entry
+     */
+    public abstract boolean isReferral();
+
+
+    /**
+     * Sets a flag wheter this entry is a referral entry.
+     * 
+     * This method is called during a search if the initialization
+     * fo the referral hint is requested. 
+     * 
+     * @param b the referral flag
+     */
+    public abstract void setReferral( boolean b );
+
+
+    /**
+     * Indicates wheter this entry is a subentry.
+     * 
+     * An entry is a subentry if it has the objectClass 'subentry'.
+     * 
+     * Even if the object class attribute is not initialized an entry
+     * is supposed to be a subentry if the subentry flag is set.
+     * 
+     * @return true, if this entry is a subentry entry
+     */
+    public abstract boolean isSubentry();
+
+
+    /**
+     * Sets a flag wheter this entry is a subentry.
+     * 
+     * This method is called during a search if the initialization
+     * fo the subentry is requested. 
+     * 
+     * @param b the subentry flag
+     */
+    public abstract void setSubentry( boolean b );
+
+
+    /**
+     * Gets the DN of this entry, never null.
+     * 
+     * @return the DN of this entry, never null.
+     */
+    public abstract LdapDN getDn();
+    
+    
+    /**
+     * Gets the RDN of this entry, never null.
+     * 
+     * @return the RDN of this entry, never null.
+     */
+    public abstract Rdn getRdn();
+
+
+    /**
+     * Indicates wheater this entry's attributes are initialized.
+     * 
+     * True means that the entry's attributes are completely initialized
+     * and getAttributes() will return all attributes.
+     * 
+     * False means that the attributes are not or only partially
+     * initialized. The getAttributes() method will return null
+     * or only a part of the entry's attributes.  
+     * 
+     * @return true if this entry's attributes are initialized
+     */
+    public abstract boolean isAttributesInitialized();
+
+
+    /**
+     * Sets a flag wheter this entry's attributes are initialized.
+     * 
+     * @param b the attributes initialized flag
+     */
+    public abstract void setAttributesInitialized( boolean b );
+
+
+    /**
+     * Gets the attributes of the entry.
+     * 
+     * If isAttributesInitialized() returns false the returned attributes 
+     * may only be a subset of the attributes in directory.
+     * 
+     * @return The attributes of the entry or null if no attribute was added yet
+     */
+    public abstract IAttribute[] getAttributes();
+
+
+    /**
+     * Gets the attribute of the entry.
+     * 
+     * @param attributeDescription the attribute description
+     * @return The attributes of the entry or null if the attribute doesn't
+     *         exist or if the attributes aren't initialized
+     */
+    public abstract IAttribute getAttribute( String attributeDescription );
+
+
+    /**
+     * Gets a AttributeHierachie containing the requested attribute and
+     * all its subtypes.
+     * 
+     * @param attributeDescription the attribute description
+     * @return The attributes of the entry or null if the attribute doesn't
+     *         exist or if the attributes aren't initialized
+     */
+    public abstract AttributeHierarchy getAttributeWithSubtypes( String attributeDescription );
+
+
+    /**
+     * Returns the subschema of the entry.
+     * 
+     * @return The subschema of the entry or null if the attributes aren't
+     *         initialized
+     */
+    public abstract Subschema getSubschema();
+
+
+    /**
+     * Indicates wheater the entry's children are initialized.
+     * 
+     * True means that the entry's children are completely initialized
+     * and getChildren() will return all children.
+     * 
+     * False means that the children are not or only partially
+     * initialized. The getChildren() method will return null
+     * or only a part of the entry's children.  
+     * 
+     * @return true if this entry's children are initialized
+     */
+    public abstract boolean isChildrenInitialized();
+
+
+    /**
+     * Sets a flag wheter this entry's children are initialized..
+     * 
+     * @param b the children initialized flag
+     */
+    public abstract void setChildrenInitialized( boolean b );
+
+
+    /**
+     * Returns true if the entry has children.
+     * 
+     * @return true if the entry has children.
+     */
+    public abstract boolean hasChildren();
+
+
+    /**
+     * Sets a hint wheter this entry has children.
+     * 
+     * @param b the has children hint
+     */
+    public abstract void setHasChildrenHint( boolean b );
+
+
+    /**
+     * Gets the children of the entry.
+     * 
+     * If isChildrenInitialized() returns false the returned children 
+     * may only be a subset of the children in directory.
+     * 
+     * @return The children of the entry or null if no child was added yet.
+     */
+    public abstract IEntry[] getChildren();
+
+
+    /**
+     * Gets the number of children of the entry.
+     * 
+     * @return The number of children of the entry or -1 if no child was added yet
+     */
+    public abstract int getChildrenCount();
+
+
+    /**
+     * Indicates wheather this entry has more children than
+     * getChildrenCount() returns. This occurs if the count or time limit
+     * was exceeded while fetching children.
+     * 
+     * @return true if this entry has (maybe) more children.
+     */
+    public abstract boolean hasMoreChildren();
+
+
+    /**
+     * Sets a flag wheter this entry more children.
+     * 
+     * @param b the has more children flag
+     */
+    public abstract void setHasMoreChildren( boolean b );
+
+
+    /**
+     * Indicates wheather this entry has a parent entry. Each entry except
+     * the root DSE and the base entries should have a parent entry.
+     * 
+     * @return true if the entry has a parent entry.
+     */
+    public abstract boolean hasParententry();
+
+
+    /**
+     * Gets the parent entry.
+     * 
+     * @return the parent entry or null if this entry hasn't a parent.
+     */
+    public abstract IEntry getParententry();
+
+
+    /**
+     * Gets the children filter or null if none is set
+     *
+     * @return the children filter or null if none is set
+     */
+    public abstract String getChildrenFilter();
+
+
+    /**
+     * Sets the children filter. Null clears the filter.
+     * 
+     * @param filter the children filter
+     */
+    public abstract void setChildrenFilter( String filter );
+
+
+    /**
+     * Gets the browser connection of this entry.
+     * 
+     * @return the browser connection of this entry, never null.
+     */
+    public abstract IBrowserConnection getBrowserConnection();
+
+
+    /**
+     * Gets the LDAP URL of this entry.
+     * 
+     * @return the  LDAP URL of this entry
+     */
+    public abstract URL getUrl();
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IEntry.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IReferralHandler.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IReferralHandler.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IReferralHandler.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IReferralHandler.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,45 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+/**
+ * Callback interface to request the target connection 
+ * of a referral from a higher-level layer (from the UI plugin).
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IReferralHandler
+{
+
+    /**
+     * Gets the connection from this referral handler.
+     * The connection is used to continue a LDAP request.
+     * The referral handler may display a dialog to the user
+     * to select a proper connection.
+     * 
+     * @param referralURL the referral URL
+     * @return the target connection
+     */
+    public IBrowserConnection getReferralConnection( URL referralURL );
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IReferralHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IRootDSE.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IRootDSE.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IRootDSE.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IRootDSE.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,90 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+/**
+ * An IRootDSE represents a Root DSE of an LDAP server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IRootDSE extends IEntry
+{
+
+    /** The namingContexts attribute */
+    public static final String ROOTDSE_ATTRIBUTE_NAMINGCONTEXTS = "namingContexts"; //$NON-NLS-1$
+
+    /** The subschemaSubentry attribute */
+    public static final String ROOTDSE_ATTRIBUTE_SUBSCHEMASUBENTRY = "subschemaSubentry"; //$NON-NLS-1$
+
+    /** The monitorContext attribute */
+    public static final String ROOTDSE_ATTRIBUTE_MONITORCONTEXT = "monitorContext"; //$NON-NLS-1$
+
+    /** The configContext attribute */
+    public static final String ROOTDSE_ATTRIBUTE_CONFIGCONTEXT = "configContext"; //$NON-NLS-1$
+
+    /** The dsaName attribute */
+    public static final String ROOTDSE_ATTRIBUTE_DSANAME = "dsaName"; //$NON-NLS-1$
+
+    /** The supportedExtension attribute */
+    public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDEXTENSION = "supportedExtension"; //$NON-NLS-1$
+
+    /** The supportedControl attribute */
+    public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDCONTROL = "supportedControl"; //$NON-NLS-1$
+
+    /** The supportedFeatures attribute */
+    public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDFEATURES = "supportedFeatures"; //$NON-NLS-1$
+
+    /** The supportedLDAPVersion attribute */
+    public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDLDAPVERSION = "supportedLDAPVersion"; //$NON-NLS-1$
+
+    /** The altServer attribute */
+    public static final String ROOTDSE_ATTRIBUTE_ALTSERVER = "altServer"; //$NON-NLS-1$
+
+    /** The supportedSASLMechanisms attribute */
+    public static final String ROOTDSE_ATTRIBUTE_SUPPORTEDSASLMECHANISM = "supportedSASLMechanisms"; //$NON-NLS-1$
+
+
+    /**
+     * Gets the supported extensions.
+     * 
+     * @return the OIDs of the supported extensions
+     */
+    public String[] getSupportedExtensions();
+
+
+    /**
+     * Gets the supported controls.
+     * 
+     * @return the OIDs of the the supported controls
+     */
+    public String[] getSupportedControls();
+
+
+    /**
+     * Gets the supported features.
+     * 
+     * @return the OIDs of the the supported features
+     */
+    public String[] getSupportedFeatures();
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IRootDSE.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,401 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.AliasDereferencingMethod;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection.ReferralHandlingMethod;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.SearchPropertyPageProvider;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * An ISearch holds all search parameters and search results of an
+ * LDAP search.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ISearch extends Serializable, IAdaptable, SearchPropertyPageProvider, ConnectionPropertyPageProvider
+{
+
+    /** Constant for empty search base */
+    public static final LdapDN EMPTY_SEARCH_BASE = new LdapDN(); //$NON-NLS-1$
+
+    /** The returning attribute shortcut for all user attributes '*' */
+    public static final String ALL_USER_ATTRIBUTES = "*"; //$NON-NLS-1$
+
+    /** The returning attribute shortcut for all operational attributes '+' */
+    public static final String ALL_OPERATIONAL_ATTRIBUTES = "+"; //$NON-NLS-1$
+
+    /** Constant for no returning attributes, an empty array */
+    public static final String[] NO_ATTRIBUTES = new String[0];
+
+    /** True filter (objectClass=*) */
+    public static final String FILTER_TRUE = "(objectClass=*)"; //$NON-NLS-1$
+
+    /** False filter (!(objectClass=*)) */
+    public static final String FILTER_FALSE = "(!(objectClass=*))"; //$NON-NLS-1$
+
+    /** Filter for fetching subentries (|(objectClass=subentry)(objectClass=ldapSubentry)) */
+    public static final String FILTER_SUBENTRY = "(|(objectClass=subentry)(objectClass=ldapSubentry))"; //$NON-NLS-1$
+
+    /**
+     * Enum for the used search scope.
+     * 
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
+    public enum SearchScope
+    {
+
+        /** Object. */
+        OBJECT(0),
+
+        /** Onelevel. */
+        ONELEVEL(1),
+
+        /** Subtree. */
+        SUBTREE(2);
+
+        private final int ordinal;
+
+
+        private SearchScope( int ordinal )
+        {
+            this.ordinal = ordinal;
+        }
+
+
+        /**
+         * Gets the ordinal.
+         * 
+         * @return the ordinal
+         */
+        public int getOrdinal()
+        {
+            return ordinal;
+        }
+
+
+        /**
+         * Gets the SearchScope by ordinal.
+         * 
+         * @param ordinal the ordinal
+         * 
+         * @return the SearchScope
+         */
+        public static SearchScope getByOrdinal( int ordinal )
+        {
+            switch ( ordinal )
+            {
+                case 0:
+                    return OBJECT;
+                case 1:
+                    return ONELEVEL;
+                case 2:
+                    return SUBTREE;
+                default:
+                    return null;
+            }
+        }
+    }
+
+
+    /**
+     * Gets the LDAP URL of this search.
+     * 
+     * @return the LDAP URL of this search
+     */
+    public abstract URL getUrl();
+
+
+    /**
+     * Checks if the hasChildren flag should be initialized.
+     * 
+     * @return true, if the hasChildren flag should be initialized
+     */
+    public abstract boolean isInitHasChildrenFlag();
+
+
+    /**
+     * Checks if the isAlias and isReferral flags should be initialized.
+     * 
+     * @return true, if the isAlias and isReferral flags should be initialized
+     */
+    public abstract boolean isInitAliasAndReferralFlag();
+
+
+    /**
+     * Gets the controls.
+     * 
+     * @return the controls
+     */
+    public abstract Control[] getControls();
+
+
+    /**
+     * Gets the count limit, 0 means no limit.
+     * 
+     * @return the count limit
+     */
+    public abstract int getCountLimit();
+
+
+    /**
+     * Sets the count limit, 0 means no limit.
+     * 
+     * @param countLimit the count limit
+     */
+    public abstract void setCountLimit( int countLimit );
+
+
+    /**
+     * Gets the filter.
+     * 
+     * @return the filter
+     */
+    public abstract String getFilter();
+
+
+    /**
+     * Sets the filter, a null or empty filter will be
+     * transformed to (objectClass=*).
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param filter the filter
+     */
+    public abstract void setFilter( String filter );
+
+
+    /**
+     * Gets the returning attributes.
+     * 
+     * @return the returning attributes
+     */
+    public abstract String[] getReturningAttributes();
+
+
+    /**
+     * Sets the returning attributes, an empty array indicates none,
+     * null will be transformed to '*' (all user attributes).
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param returningAttributes the returning attributes
+     */
+    public abstract void setReturningAttributes( String[] returningAttributes );
+
+
+    /**
+     * Gets the search scope.
+     * 
+     * @return the search scope
+     */
+    public abstract SearchScope getScope();
+
+
+    /**
+     * Sets the search scope.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param scope the search scope
+     */
+    public abstract void setScope( SearchScope scope );
+
+
+    /**
+     * Gets the aliases dereferencing method.
+     * 
+     * 
+     * @return the aliases dereferencing method
+     */
+    public abstract AliasDereferencingMethod getAliasesDereferencingMethod();
+
+
+    /**
+     * Sets the aliases dereferencing method.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param aliasesDereferencingMethod the aliases dereferencing method
+     */
+    public abstract void setAliasesDereferencingMethod( AliasDereferencingMethod aliasesDereferencingMethod );
+
+
+    /**
+     * Gets the referrals handling method.
+     *  
+     * @return the referrals handling method
+     */
+    public abstract ReferralHandlingMethod getReferralsHandlingMethod();
+
+
+    /**
+     * Sets the referrals handling method.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param referralsHandlingMethod the referrals handling method
+     */
+    public abstract void setReferralsHandlingMethod( ReferralHandlingMethod referralsHandlingMethod );
+
+
+    /**
+     * Gets the search base.
+     * 
+     * @return the search base
+     */
+    public abstract LdapDN getSearchBase();
+
+
+    /**
+     * Sets the search base, a null search base will be
+     * transformed to an empty DN.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param searchBase the search base
+     */
+    public abstract void setSearchBase( LdapDN searchBase );
+
+
+    /**
+     * Gets the time limit in milliseconds, 0 means no limit.
+     * 
+     * @return the time limit
+     */
+    public abstract int getTimeLimit();
+
+
+    /**
+     * Sets the time limit in milliseconds, 0 means no limit.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param timeLimit the time limit
+     */
+    public abstract void setTimeLimit( int timeLimit );
+
+
+    /**
+     * Gets the symbolic name.
+     * 
+     * @return the name
+     */
+    public abstract String getName();
+
+
+    /**
+     * Sets the symbolic name.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param name the name
+     */
+    public abstract void setName( String name );
+
+
+    /**
+     * Gets the search results, null indicates that the
+     * search wasn't performed yet.
+     * 
+     * @return the search results
+     */
+    public abstract ISearchResult[] getSearchResults();
+
+
+    /**
+     * Sets the search results.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param searchResults the search results
+     */
+    public abstract void setSearchResults( ISearchResult[] searchResults );
+
+
+    /**
+     * Checks if the count limit exceeded.
+     * 
+     * @return true, if the count limit exceeded
+     */
+    public abstract boolean isCountLimitExceeded();
+
+
+    /**
+     * Sets the count limit exceeded flag.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param countLimitExceeded the count limit exceeded flag
+     */
+    public abstract void setCountLimitExceeded( boolean countLimitExceeded );
+
+
+    /**
+     * Gets the browser connection.
+     * 
+     * @return the browser connection
+     */
+    public abstract IBrowserConnection getBrowserConnection();
+
+
+    /**
+     * Sets the browser connection.
+     * 
+     * Calling this method causes firing a search update event.
+     * 
+     * @param browserConnection the browser connection
+     */
+    public abstract void setBrowserConnection( IBrowserConnection browserConnection );
+
+
+    /**
+     * Clones this search.
+     * 
+     * @return the cloned search
+     */
+    public abstract Object clone();
+
+
+    /**
+     * Gets the search parameter.
+     * 
+     * @return the search parameter
+     */
+    public abstract SearchParameter getSearchParameter();
+
+
+    /**
+     * Sets the search parameter.
+     * 
+     * @param searchParameter the search parameter
+     */
+    public abstract void setSearchParameter( SearchParameter searchParameter );
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearch.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,101 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * The ISearchResult represents a single search result.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface ISearchResult extends Serializable, IAdaptable, EntryPropertyPageProvider,
+    ConnectionPropertyPageProvider
+{
+
+    /**
+     * Returns the DN of the search result entry.
+     * 
+     * @return the DN of the search result entry.
+     */
+    public LdapDN getDn();
+
+
+    /**
+     * Returns the attributes of the search result entry.
+     * 
+     * @return the attributes of the search result entry.
+     */
+    public IAttribute[] getAttributes();
+
+
+    /**
+     * Returns the attribute of the search result entry.
+     * 
+     * @param attributeDescription
+     *                the attribute description of the attribute to return
+     * @return the attribute with the given description or null.
+     */
+    public IAttribute getAttribute( String attributeDescription );
+
+
+    /**
+     * Returns the AttributeHierachie of the search result entry.
+     * 
+     * @param attributeDescription
+     *                the description of the attribute to return
+     * @return the AttributeHierachie with the given description or null.
+     */
+    public AttributeHierarchy getAttributeWithSubtypes( String attributeDescription );
+
+
+    /**
+     * Returns the entry of the search result.
+     * 
+     * @return the entry
+     */
+    public IEntry getEntry();
+
+
+    /**
+     * Return the search, the parent of this search result.
+     * 
+     * @return the search
+     */
+    public ISearch getSearch();
+
+
+    /**
+     * Sets the search.
+     * 
+     * @param search the search
+     */
+    public void setSearch( ISearch search );
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/ISearchResult.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IValue.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IValue.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IValue.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IValue.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,273 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+import java.io.Serializable;
+
+import org.apache.directory.studio.connection.core.ConnectionPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.BrowserCoreMessages;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.AttributePropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.EntryPropertyPageProvider;
+import org.apache.directory.studio.ldapbrowser.core.propertypageproviders.ValuePropertyPageProvider;
+import org.eclipse.core.runtime.IAdaptable;
+
+
+/**
+ * An IValue represents a value of a LDAP attribute.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public interface IValue extends Serializable, IAdaptable, ValuePropertyPageProvider, AttributePropertyPageProvider,
+    EntryPropertyPageProvider, ConnectionPropertyPageProvider
+{
+
+    /**
+     * EmptyValue is used to indicate an empty value.
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
+    interface EmptyValue
+    {
+
+        /**
+         * Gets the string value.
+         *
+         * @return the string value
+         */
+        public String getStringValue();
+
+
+        /**
+         * Gets the binary value.
+         * 
+         * @return the binary value
+         */
+        public byte[] getBinaryValue();
+
+
+        /**
+         * Checks if is string.
+         * 
+         * @return true, if is string
+         */
+        public boolean isString();
+
+
+        /**
+         * Checks if is binary.
+         * 
+         * @return true, if is binary
+         */
+        public boolean isBinary();
+    }
+
+    /**
+     * This object represents the empty string value.
+     */
+    public static final EmptyValue EMPTY_STRING_VALUE = new EmptyValue()
+    {
+
+        /**
+         * {@inheritDoc}
+         */
+        public String toString()
+        {
+            return BrowserCoreMessages.model__empty_string_value;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean isString()
+        {
+            return true;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean isBinary()
+        {
+            return false;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public byte[] getBinaryValue()
+        {
+            return new byte[0];
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public String getStringValue()
+        {
+            return ""; //$NON-NLS-1$
+        }
+    };
+
+    /**
+     * This object represents the empty binary value.
+     */
+    public static final EmptyValue EMPTY_BINARY_VALUE = new EmptyValue()
+    {
+
+        /**
+         * {@inheritDoc}
+         */
+        public String toString()
+        {
+            return BrowserCoreMessages.model__empty_binary_value;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean isString()
+        {
+            return false;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean isBinary()
+        {
+            return true;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public byte[] getBinaryValue()
+        {
+            return new byte[0];
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public String getStringValue()
+        {
+            return ""; //$NON-NLS-1$
+        }
+    };
+
+
+    /**
+     * The attribute of this value.
+     * 
+     * @return The attribute of this value, never null.
+     */
+    public abstract IAttribute getAttribute();
+
+
+    /**
+     * Gets the raw value or an EmptyValue
+     * 
+     * @return The raw value or an EmptyValue, never null.
+     */
+    public abstract Object getRawValue();
+
+
+    /**
+     * Gets the string value of this value.
+     * 
+     * If the value is binary a String with UTF-8 decoded
+     * byte[] is returned. 
+     * 
+     * @return the String value
+     */
+    public abstract String getStringValue();
+
+
+    /**
+     * Gets the binary value of this value.
+     * 
+     * If the value is string a byte[] with the 
+     * UTF-8 encoded String is returned. 
+     * 
+     * @return the binary value
+     */
+    public abstract byte[] getBinaryValue();
+
+
+    /**
+     * Returns true if the value is empty.
+     * 
+     * A value is empty if its raw value is an EmptyValue.
+     * 
+     * @return true if the value is empty.
+     */
+    public abstract boolean isEmpty();
+
+
+    /**
+     * Convinience method to getAttribute().isString().
+     * 
+     * @return true if the values attribute is string.
+     */
+    public abstract boolean isString();
+
+
+    /**
+     * Convinience method to getAttribute().isBinary()
+     * 
+     * @return true if the values attribute is binary.
+     */
+    public abstract boolean isBinary();
+
+
+    /**
+     * Returns true if this value is part of its entry's RDN.
+     * 
+     * @return true if this value is part of its entry's RDN.
+     */
+    public abstract boolean isRdnPart();
+
+
+    /**
+     * Return true if the argument is also of type IValue and they are
+     * equal.
+     * 
+     * IValues are equal if there entries, there attributes and there raw
+     * values are equal.
+     * 
+     * @param o
+     *                The value to compare, must be of type IValue
+     * @return true if the argument is equal to this.
+     */
+    public abstract boolean equals( Object o );
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/IValue.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java
URL: http://svn.apache.org/viewvc/directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java?rev=592082&view=auto
==============================================================================
--- directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java (added)
+++ directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java Mon Nov  5 08:51:43 2007
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapbrowser.core.model;
+
+
+/**
+ * @deprecated This class will be removed in the next version. The DN/RDN/RDNPart 
+ * classes are replaced with the shared-ldap LdapDN/Rdn/ATAV. This class just 
+ * remains to provide backward compatibility of the old browserconnections.xml
+ * file that stores searches and bookmarks.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NameException extends Exception
+{
+
+    private static final long serialVersionUID = 1L;
+
+
+    /**
+     * Creates a new instance of NameException.
+     * 
+     * @param message the message
+     */
+    public NameException( String message )
+    {
+        super( message );
+    }
+
+}

Propchange: directory/sandbox/felixk/studio-ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/NameException.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message