Package org.jitterbit.util.file

Examples of org.jitterbit.util.file.Folder


    }

    private void deleteDataFiles(FileFilter filter) {
        // HACK: There must be a better way of getting the name of the folder.
        FileResource tmp = rc.getFileResource(tx, "__dummy__");
        Folder parent = Folder.parentOf(tmp.toFile());
        parent.deleteFiles(filter);
    }
View Full Code Here


    private final LoginNameCacheParticle<LdapLocation> loginCache;

    LdapLocationFileCache(File location) {
        super(ID, LdapLocation.class);
        checkArgument(location.isDirectory(), "location must be a directory");
        Folder parent = createParent(location);
        serverCache = new ServerNameCache(parent);
        baseNameCache = new BaseNameCache(parent);
        loginCache = new LoginNameCacheParticle<LdapLocation>("LdapLocationLogin", parent, SIZE);
        addStringCache(serverCache);
        addStringCache(baseNameCache);
View Full Code Here

    private final LoginNameCacheParticle<DatabaseLocation> loginCache;

    DatabaseLocationFileCache(File location) {
        super(ID, DatabaseLocation.class);
        checkArgument(location.isDirectory(), "location must be a directory");
        Folder parent = createParent(location);
        serverCache = new ServerNameCache(parent);
        databaseCache = new DatabaseNameCache(parent);
        loginCache = new LoginNameCacheParticle<DatabaseLocation>("DatabaseLocationLogin", parent, SIZE);
        addStringCache(serverCache);
        addStringCache(databaseCache);
View Full Code Here

     * @param location
     *            the parent <code>File</code>
     * @return a <code>Folder</code> representing the location on disk
     */
    protected final Folder createParent(File location) {
        Folder parent = new Folder(location, id);
        if (!parent.createOnDisk()) {
            String message = "Could not create the local folder " + parent.getAbsolutePath();
            ErrorLog.log(getClass(), "Cache error.", new Exception(message));
        }
        return parent;
    }
View Full Code Here

     *            the directory on disk in which to store the cached data
     */
    public FileShareLocationFileCache(File location) {
        super(ID, FileShareLocation.class);
        checkArgument(location.isDirectory(), "location must be a directory");
        Folder parent = createParent(location);
        paths = new PathParticle(parent);
        logins = new LoginNameCacheParticle<FileShareLocation>("FileShareLocationLogin", parent, SIZE);
        addStringCache(paths);
        addStringCache(logins);
    }
View Full Code Here

    private final LoginNameCacheParticle<HttpLocation> loginCache;

    HttpLocationFileCache(File location) {
        super(ID, HttpLocation.class);
        checkArgument(location.isDirectory(), "location must be a directory");
        Folder parent = createParent(location);
        urlCache = new UrlCache(parent);
        loginCache = new LoginNameCacheParticle<HttpLocation>("HttpLocationLogin", parent, SIZE);
        addStringCache(urlCache);
        addStringCache(loginCache);
    }
View Full Code Here

    private final LoginNameCacheParticle<FtpLocation> loginCache;

    FtpLocationFileCache(File location) {
        super(ID, FtpLocation.class);
        checkArgument(location.isDirectory(), "location must be a directory");
        Folder parent = createParent(location);
        hostCache = new HostCache(parent);
        pathCache = new PathCache(parent);
        loginCache = new LoginNameCacheParticle<FtpLocation>("FtpLocationLogin", parent, SIZE);
        addStringCache(hostCache);
        addStringCache(pathCache);
View Full Code Here

    private final PathParticle paths;

    public TemporaryStorageLocationFileCache(File location) {
        super(ID, TemporaryStorageLocation.class);
        checkArgument(location.isDirectory(), "location must be a directory");
        Folder parent = createParent(location);
        paths = new PathParticle(parent);
        addStringCache(paths);
    }
View Full Code Here

        @Override
        public void actionPerformed(ActionEvent e) {
            File root = rootSelector.getSelectedFile();
            if (isLocationOk(root)) {
                Predicate<String> nameFilter = nameFilterField.getFilter();
                controller.startSearch(new Folder(root), nameFilter);
            }
        }
View Full Code Here

     *            the path to create
     * @return a <code>File</code> representing the deepest folder
     */
    public static File newFolderStructure(boolean deleteOnExit, String... path) {
        checkNotEmpty(path, "path");
        Folder root = null;
        Folder last = TEMP_DIR;
        for (String p : path) {
            Folder f = last.subFolder(p);
            if (root == null) {
                root = f;
                if (deleteOnExit) {
                    tempFolderDeleter.addFolder(root.asJavaFile());
                }
View Full Code Here

TOP

Related Classes of org.jitterbit.util.file.Folder

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.