Package org.apache.directory.server.protocol.shared.store

Examples of org.apache.directory.server.protocol.shared.store.LdifFileLoader.execute()


  public void loadLdif( URL url ) throws URISyntaxException {
    File file = new File( url.toURI() );
    LdifFileLoader loader = new LdifFileLoader(
        directory.getAdminSession(), file, null, Thread.currentThread().getContextClassLoader() );
    loader.execute();
  }

  private static boolean deleteDir( File dir ) {
    if( dir.isDirectory() ) {
      String[] children = dir.list();
View Full Code Here


                    + "' skipped.  It has already been loaded on " + time + "." );
        }
        else
        {
            LdifFileLoader loader = new LdifFileLoader( directoryService.getAdminSession(), ldifFile, ldifFilters );
            int count = loader.execute();
            LOG.info( "Loaded " + count + " entries from LDIF file '" + getCanonical( ldifFile ) + "'" );
            addFileEntry( ldifFile );
        }
    }
   
View Full Code Here

                + "' skipped.  It has already been loaded on " + time + "." );
        }
        else
        {
            LdifFileLoader loader = new LdifFileLoader( directoryService.getAdminSession(), ldifFile, ldifFilters );
            int count = loader.execute();
            LOG.info( "Loaded " + count + " entries from LDIF file '" + getCanonical( ldifFile ) + "'" );
            addFileEntry( ldifFile );
        }
    }
View Full Code Here

        if(ldifs != null && ldifs.length > 0) {
            String ldifFile = ldifs[0].getFile().getAbsolutePath();
            logger.info("Loading LDIF file: " + ldifFile);
            LdifFileLoader loader = new LdifFileLoader(service.getAdminSession(), ldifFile);
            loader.execute();
        }
    }

    private boolean deleteDir(File dir) {
        if (dir.isDirectory()) {
View Full Code Here

                + "' skipped.  It has already been loaded on " + time + "." );
        }
        else
        {
            LdifFileLoader loader = new LdifFileLoader( directoryService.getAdminSession(), ldifFile, ldifFilters );
            int count = loader.execute();
            LOG.info( "Loaded " + count + " entries from LDIF file '" + getCanonical( ldifFile ) + "'" );
            addFileEntry( ldifFile );
        }
    }
View Full Code Here

                    + "' skipped.  It has already been loaded on " + time + "." );
        }
        else
        {
            LdifFileLoader loader = new LdifFileLoader( directoryService.getAdminSession(), ldifFile, ldifFilters );
            int count = loader.execute();
            LOG.info( "Loaded " + count + " entries from LDIF file '" + getCanonical( ldifFile ) + "'" );
            addFileEntry( ldifFile );
        }
    }
   
View Full Code Here

     *
     * @throws Exception If there was an error.
     */
    private void loadLdifFile() throws Exception {
        final LdifFileLoader loader = new LdifFileLoader(service.getAdminSession(), ldifFile.getAbsolutePath());
        loader.execute();
    }
}
View Full Code Here

            {
                InputStream inputStream = ldifFiles[i].getInputStream();
                IOUtils.copy(inputStream, new FileOutputStream(tempFile));
                LdifFileLoader fileLoader = new LdifFileLoader(context,
                        tempFile.getAbsolutePath());
                fileLoader.execute();
            } finally
            {
                try
                {
                    tempFile.delete();
View Full Code Here

    }
   
    public void loadLdif(File ldif) throws Exception
    {
        LdifFileLoader loader = new  LdifFileLoader(service.getAdminSession(), ldif.getAbsolutePath());
        loader.execute();
    }
   
    public void revert() throws Exception
    {
        if (changeLogRevision < service.getChangeLog().getCurrentRevision())
View Full Code Here

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