1 20 21 package org.apache.directory.ldapstudio.browser.core.internal.model; 22 23 24 import org.apache.directory.ldapstudio.browser.core.BrowserCoreMessages; 25 import org.apache.directory.ldapstudio.browser.core.model.DN; 26 import org.apache.directory.ldapstudio.browser.core.model.IConnection; 27 import org.apache.directory.ldapstudio.browser.core.model.IEntry; 28 import org.apache.directory.ldapstudio.browser.core.model.ModelModificationException; 29 import org.apache.directory.ldapstudio.browser.core.model.RDN; 30 31 32 public class BaseDNEntry extends AbstractEntry 33 { 34 35 private static final long serialVersionUID = -5444229580355372176L; 36 37 protected DN baseDn; 38 39 protected IConnection connection; 41 42 43 protected BaseDNEntry() 44 { 45 } 46 47 48 public BaseDNEntry( DN baseDn, IConnection connection ) throws ModelModificationException 49 { 50 super(); 51 52 if ( baseDn == null ) 53 { 54 throw new ModelModificationException( BrowserCoreMessages.model__empty_dn ); 55 } 56 if ( connection == null ) 57 { 58 throw new ModelModificationException( BrowserCoreMessages.model__empty_connection ); 59 } 60 61 this.setDirectoryEntry( true ); 62 this.baseDn = baseDn; 63 this.connection = connection; 65 } 66 67 68 public DN getDn() 69 { 70 return this.baseDn; 71 } 72 73 74 public IEntry getParententry() 75 { 76 return getConnection().getRootDSE(); 77 } 78 79 80 public IConnection getConnection() 81 { 82 return this.connection; 85 } 86 87 88 protected void setRdn( RDN newRdn ) 89 { 90 } 91 92 93 protected void setParent( IEntry newParent ) 94 { 95 } 96 97 } 98 | Popular Tags |