Package netscape.ldap

Examples of netscape.ldap.LDAPSchema


            throw new Exception(SOSClassUtil.getMethodName() +
                ": sorry, there is no successful connection established." +
                " may be the connect method was not called");
        }
         
          LDAPSchema dirSchema = new LDAPSchema();
     
          // Gib schemas.
          dirSchema.fetchSchema( connection);
          Enumeration ocs = dirSchema.getObjectClasses();
          while ( ocs.hasMoreElements() ) {
              LDAPObjectClassSchema oc = (LDAPObjectClassSchema)ocs.nextElement();
             
              if(logger != null){
                  logger.debug5(SOSClassUtil.getMethodName()+" Object = "+oc.getName());
View Full Code Here


            throw new Exception(SOSClassUtil.getMethodName() +
                ": sorry, there is no successful connection established." +
                " may be the connect method was not called");
        }
         
          LDAPSchema dirSchema = new LDAPSchema();
       
          // Get the schema from the directory.
          dirSchema.fetchSchema( connection );
         
          LDAPObjectClassSchema objClass = dirSchema.getObjectClass(object);
          if ( objClass == null ) {
              System.out.println("Object = "+object+" not found ");
          }
          else{
              System.out.println("-------------------------");
View Full Code Here

  throws ImportExportException
    {
  Enumeration enumeration;
  String[]    attrs;
  MozillaProducer  producer;
  LDAPSchema  schema;
  int         scope;

  if ( getSearchDescriptor() == null )
      throw new IllegalStateException( Messages.message( "dsml.searchDescriptorRequired" ) );

  attrs = getSearchDescriptor().getReturnAttrs();
  try {
      scope = getSearchDescriptor().getScope();
      switch ( scope ) {
      case SearchDescriptor.Scope.OneLevel:
    scope = LDAPv2.SCOPE_ONE;
    break;
      case SearchDescriptor.Scope.Base:
    scope = LDAPv2.SCOPE_BASE;
    break;
      case SearchDescriptor.Scope.SubTree:
    scope = LDAPv2.SCOPE_SUB;
    break;
      }
      enumeration = _conn.search( getSearchDescriptor().getBaseDN(), scope,
        getSearchDescriptor().getFilter(), attrs, false );
  } catch ( LDAPException except ) {
      // Object does not exist, was not removed, ignore.
      // Anything else, we must complain.
      if ( except.getLDAPResultCode() != LDAPException.NO_SUCH_OBJECT )
    throw new ImportExportException( except );
      enumeration = null;
  }

  try {
      producer = new MozillaProducer( docHandler, false );
      producer.startDocument();
      if ( serverSchema ) {
    schema = new LDAPSchema();
    schema.fetchSchema( _conn );
    producer.produce( schema );
      }
      if ( enumeration != null )
    producer.produce( enumeration );
      if ( importPolicy && getImportDescriptor() != null )
View Full Code Here

  throws ImportExportException
    {
  Enumeration enumeration;
  String[]    attrs;
  MozillaProducer  producer;
  LDAPSchema  schema;
  int         count;
  int         scope;

  if ( getSearchDescriptor() == null )
      throw new IllegalStateException( Messages.message( "dsml.searchDescriptorRequired" ) );

  attrs = getSearchDescriptor().getReturnAttrs();
  try {
      scope = getSearchDescriptor().getScope();
      switch ( scope ) {
      case SearchDescriptor.Scope.OneLevel:
    scope = LDAPv2.SCOPE_ONE;
    break;
      case SearchDescriptor.Scope.Base:
    scope = LDAPv2.SCOPE_BASE;
    break;
      case SearchDescriptor.Scope.SubTree:
    scope = LDAPv2.SCOPE_SUB;
    break;
      }
      enumeration = _conn.search( getSearchDescriptor().getBaseDN(), scope,
        getSearchDescriptor().getFilter(), attrs, false );
  } catch ( LDAPException except ) {
      // Object does not exist, was not removed, ignore.
      // Anything else, we must complain.
      if ( except.getLDAPResultCode() != LDAPException.NO_SUCH_OBJECT )
    throw new ImportExportException( except );
      enumeration = null;
  }

  try {
      producer = new MozillaProducer( docHandler, false );
      producer.startDocument();
      if ( serverSchema ) {
    schema = new LDAPSchema();
    schema.fetchSchema( _conn );
    producer.produce( schema );
      }
      if ( enumeration != null )
    producer.produce( enumeration );
      if ( importPolicy && getImportDescriptor() != null )
View Full Code Here

TOP

Related Classes of netscape.ldap.LDAPSchema

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.