Package org.jitterbit.integration.activity.client.history

Examples of org.jitterbit.integration.activity.client.history.SourceHistoryEntry


    }

    @Override
    protected Object[] getColumnDataFromObject(Object o) {
        if (o instanceof SourceHistoryEntry) {
            SourceHistoryEntry e = (SourceHistoryEntry) o;
            return new Object[] { Boolean.FALSE, e.getOperationName(), e.getSourceFiles(), e.getFileSizeInBytes(),
                            e.getFileTimestamp() };
        }
        throwIllegalRowObject(o, SourceHistoryEntry.class);
        return null;
    }
View Full Code Here


    private void onRowSelected(int rowIndex) {
        notifyDeleteSelectionListeners(rowIndex, true);
    }

    private void notifyDeleteSelectionListeners(int rowIndex, boolean selected) {
        SourceHistoryEntry e = getHistoryEntry(rowIndex);
        if (e != null) {
            for (DeleteSelectionListener lst : deleteSelectionListeners) {
                lst.selectionChanged(e, selected);
            }
        }
View Full Code Here

        return entries;
    }
   
    private void parseLine(String line) {
        SourceHistoryEntryLineParser lineParser = new SourceHistoryEntryLineParser();
        SourceHistoryEntry entry = lineParser.parse(line);
        if (entry != null) {
            entries.add(entry);
        } else if (lineParser.getNextSql() != null) {
            nextSql = lineParser.getNextSql();
        }
View Full Code Here

    public void setTimeStamp(Date when) {
        this.timestamp = when;
    }

    public SourceHistoryEntry getEntry() {
        return new SourceHistoryEntry(entryId, operationId, operationName, sourceFiles, fileSizeInBytes, timestamp);
    }
View Full Code Here

    public void testValidResponse() {
        SourceHistoryResponseParser parser = new SourceHistoryResponseParser();
        List<SourceHistoryEntry> entries = parser.parse(VALID_RESPONSE);
        assertEquals(2, entries.size());
        assertEquals(WHERE, parser.getNextSql());
        SourceHistoryEntry e = entries.get(0);
        mustEqualFirstEntry(e);
        e = entries.get(1);
        assertEquals(27, e.getID());
        assertEquals(new OperationId("93f0da04-8398-4e9c-b24d-7d857626cd09"), e.getOperationId());
        assertEquals("FindValue()", e.getOperationName());
        assertEquals("\\\\linuxdoc\\source\\torgil\\xml\\InstanceFunctions\\IntegerCapsule_Advanced.xml", e.getSourceFiles());
        assertEquals(564, e.getFileSizeInBytes());
        assertEquals(ServerConversionUtils.fromServerDateFormat("2009-07-24 10:53:47"), e.getFileTimestamp());
    }
View Full Code Here

    @Test
    public void testPartlyInvalidResponse() {
        SourceHistoryResponseParser parser = new SourceHistoryResponseParser();
        List<SourceHistoryEntry> entries = parser.parse(PARTLY_INVALID_RESPONSE);
        assertEquals(1, entries.size());
        SourceHistoryEntry e = entries.get(0);
        mustEqualFirstEntry(e);
        assertNull(parser.getNextSql());
    }
View Full Code Here

    private static final String INVALID_ENTRY = "It was a dark and stormy night...";

    @Test
    public void testValidEntry() {
        SourceHistoryEntryLineParser parser = new SourceHistoryEntryLineParser();
        SourceHistoryEntry e = parser.parse(VALID_ENTRY);
        assertEquals(28, e.getID());
        assertEquals(new OperationId("1520ead5-2a7a-43b3-93f2-5aa8b9c1832f"), e.getOperationId());
        assertEquals("Text > Text", e.getOperationName());
        assertEquals("\\\\linuxdoc\\source\\torgil\\tsc_1.txt", e.getSourceFiles());
        assertEquals(12, e.getFileSizeInBytes());
        assertEquals(ServerConversionUtils.fromServerDateFormat("2009-07-24 15:03:58"), e.getFileTimestamp());
        assertNull(parser.getNextSql());
    }
View Full Code Here

    }

    @Test
    public void testWhereEntry() {
        SourceHistoryEntryLineParser parser = new SourceHistoryEntryLineParser();
        SourceHistoryEntry e = parser.parse(WHERE_ENTRY);
        assertNull(e);
        assertEquals(WHERE_ENTRY, parser.getNextSql());
    }
View Full Code Here

    }

    @Test
    public void testInvalidEntry() {
        SourceHistoryEntryLineParser parser = new SourceHistoryEntryLineParser();
        SourceHistoryEntry e = parser.parse(INVALID_ENTRY);
        assertNull(e);
        assertNull(parser.getNextSql());
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.activity.client.history.SourceHistoryEntry

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.