Package org.jitterbit.integration.debug.client.file

Examples of org.jitterbit.integration.debug.client.file.DataFilesInfo


     */
    public void retrieveDataFile(DataFileIdentifier fileId, Receiver<Result> callback) {
        KongaGuid processGuid = null;
        TransformationDataFile localFile = TransformationDataFile.NULL;
        synchronized (localFiles) {
            DataFilesInfo filesInfo = localFiles.getCurrentFilesInfo();
            if (filesInfo == null || !filesInfo.contains(fileId)) {
                boolean unknownFile = true;
                callback.handle(Result.error(unknownFile));
                return;
            }
            processGuid = filesInfo.getGuid();
            localFile = localFiles.getFile(fileId);
        }
        if (localFile == TransformationDataFile.NULL) {
            // We recognize the file ID, but the requested file has not yet been downloaded from the server.
            downloadFile(processGuid, fileId, callback);
View Full Code Here


        public void fileWasDownloaded(DataFileIdentifier fileId, DataFile dataFile) {
            setCanBeCancelled(false);
            setMayBeInterrupted(false);
            TransformationDataFile txFile = TransformationDataFile.NULL;
            synchronized (localFiles) {
                DataFilesInfo filesInfo = localFiles.getCurrentFilesInfo();
                // Must guard against the case where the user has chosen to remove the
                // test data before this call completes,
                if (filesInfo != null) {
                    txFile = localFiles.addDataFile(guid, fileId, dataFile);
                }
View Full Code Here

    }

    @Override
    public boolean containsFile(DataFileIdentifier fileId) {
        synchronized (tx) {
            DataFilesInfo info = getCurrentFilesInfo();
            return info != null && info.contains(fileId);
        }
    }
View Full Code Here

    }

    @Override
    public DataFilesInfo storeSourceData(LoadSourceDataResult result) {
        checkLoadSourceDataResult(result);
        DataFilesInfo info;
        KongaGuid guid = null;
        if (result != null) {
            SourceDataIdentifier identifier = result.getIdentifier();
            guid = identifier.getGuid();
            DataFilesInfoBuilder infoBuilder = new DataFilesInfoBuilder(identifier.getServerInfo());
View Full Code Here

    }

    @Override
    public SourceDataIdentifier getSourceDataIdentifier() {
        synchronized (this) {
            DataFilesInfo info = getCurrentFilesInfo();
            if (info != null) {
                // TODO: At the moment we alway use the same identifier, which in practice
                // amounts to the first source chunk. In the case where the user has done a
                // Test Operation, however, and is currently viewing the data for another
                // chunk (the second, say), and does a Test Transformation (maybe after
                // having changed a mapping), we really need to use that chunk number in order
                // for the displayed result to make sense.
                OperationId opId = info.getOperationId();
                DataFileIdentifier fileId = new DataFileIdentifier(opId, tx.getID(), DataFileType.SOURCE, 1, 1);
                if (info.contains(fileId)) {
                    return new SourceDataIdentifier(info.getServerInfo(), info.getGuid());
                }
            }
            return null;
        }
    }
View Full Code Here

    }

    @Override
    public DataFilesInfo storeTestTransformationResult(TestTransformationResult result) {
        checkTestTransformationResult(result);
        DataFilesInfo info;
        KongaGuid guid = null;
        if (result != null) {
            info = DataFilesInfoBuilder.buildForTestTransformation(result);
            guid = info.getGuid();
        } else {
            info = null;
        }
        synchronized (this) {
            removeTargetFiles();
View Full Code Here

    }

    @Override
    public DataFilesInfo storeTestOperationResult(TestOperationResult result) {
        Map<TransformationId, DataFilesInfo> allFiles = result.getDataFilesInfo();
        DataFilesInfo filesForThisTransformation = allFiles.get(tx.getID());
        if (filesForThisTransformation == null) {
            // TODO: What does this mean? Can this even happen?
        } else {
            synchronized (this) {
                deleteAllDataFiles();
View Full Code Here

        page.addPostPageLoadingJob(new Runnable() {

            @Override
            public void run() {
                listenToFileStore();
                DataFilesInfo info = getCurrentFileInfo();
                updateEnabledState(info);
            }
        });
    }
View Full Code Here

    }

    private DataFilesInfo getCurrentFileInfo() {
        MappingTreeDataService treeDataService = page.getTreeDataService();
        TransformationFileStore fileStore = treeDataService.getDataFileStore();
        DataFilesInfo info = fileStore.getCurrentFilesInfo();
        return info;
    }
View Full Code Here

        EditorService editors = page.getWindow().getEditorService();
        TransformationFileStore fileStore = page.getTreeDataService().getDataFileStore();
        FileViewer fileViewer = new FileViewer(editors, page.getObject(), fileStore, fileType);
        String charset = getCharset(page.getObject());
        fileViewer.setCharset(charset);
        DataFilesInfo info = fileStore.getCurrentFilesInfo();
        fileViewer.openFile(info);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.debug.client.file.DataFilesInfo

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.