Package org.jitterbit.integration.data.location

Examples of org.jitterbit.integration.data.location.FileShareLocation


        if (loc instanceof FtpLocation) {
            FtpLocation ftp = (FtpLocation) loc;
            tt.addEntry("Host:", ftp.getHost());
            tt.addEntry("Path:", ftp.getHostPath());
        } else if (loc instanceof FileShareLocation) {
            FileShareLocation fs = (FileShareLocation) loc;
            tt.addEntry("Path:", fs.getPath());
        } else if (loc instanceof TemporaryStorageLocation) {
            TemporaryStorageLocation ts = (TemporaryStorageLocation) loc;
            tt.addEntry("Path:", ts.getPath());
        }
        tt.addEntry(st == SourceTarget.Source ? "File filter:" : "Filename:", loc.getFileFilter().getFilter());
View Full Code Here


            tearDown();
        }
    }
   
    private FileShareLocation createLocation(int n) {
        FileShareLocation loc = new FileShareLocation();
        loc.setPath(PATHS[n]);
        loc.setLogin(USERS[n]);
        return loc;
    }
View Full Code Here

public final class DataLocationPreparerJUnitTest {

    @Test
    public void ensurePasswordsAreBlankedOut() {
        PostExportManagerImpl mgr = new PostExportManagerImpl(true);
        FileShareLocation loc = createLocation();
        String oldPassword = loc.getPassword();
        DataLocationPreparer p = new DataLocationPreparer(loc);
        p.prepareItem(mgr);
        assertNull(loc.getPassword());
        mgr.runJobs(Condition.ALWAYS);
        assertEquals(oldPassword, loc.getPassword());
    }
View Full Code Here

        mgr.runJobs(Condition.ALWAYS);
        assertEquals(oldPassword, loc.getPassword());
    }

    private FileShareLocation createLocation() {
        FileShareLocation loc = new FileShareLocation();
        loc.setPath("\\test");
        loc.setLogin("user");
        loc.setPassword("password");
        return loc;
    }
View Full Code Here

    }

    @Test
    public void ensurePasswordsAreKept() {
        PostExportManagerImpl mgr = new PostExportManagerImpl(false);
        FileShareLocation loc = createLocation();
        String oldPassword = loc.getPassword();
        DataLocationPreparer p = new DataLocationPreparer(loc);
        p.prepareItem(mgr);
        assertEquals(oldPassword, loc.getPassword());
        mgr.runJobs(Condition.ALWAYS);
        assertEquals(oldPassword, loc.getPassword());
    }
View Full Code Here

    public static KList<String> collect(Locatable locatable) {
        DataLocation dl = locatable.getLocation();
        if (dl != null) {
            switch (dl.getDataLocationType()) {
            case FileShare:
                FileShareLocation fileShare = (FileShareLocation) dl;
                return KList.fromItems(fileShare.getLogin(), fileShare.getPath(),
                                fileShare.getFileFilter().getFilter(), fileShare.getRenameFileTo().getFileName());
            case TemporaryStorage:
                TemporaryStorageLocation tempStore = (TemporaryStorageLocation) dl;
                return KList.fromItems(tempStore.getPath(), tempStore.getFileFilter().getFilter(),
                                tempStore.getRenameFileTo().getFileName());
            case FTP:
View Full Code Here

        super.display();
    }

    @Override
    public void apply() {
        FileShareLocation loc = getDisplayedObject();
        loc.setPath(pathField.getValue().trim());
        fileLocationPanel.apply(loc);
        updatePathCache(loc);
    }
View Full Code Here

        updatePathCache(loc);
    }

    @Override
    public void reset() {
        FileShareLocation loc = getDisplayedObject();
        fileLocationPanel.reset(loc);
        updateFields(loc);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.location.FileShareLocation

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.