Package org.jitterbit.integration.data.entity

Examples of org.jitterbit.integration.data.entity.Folder


   
    @Test
    public void testIncompatibleItems() {
        DefaultEntityMover mover = new DefaultEntityMover();
        mover.setItemsToMove(Arrays.asList(new Schedule("S"), new EmailMessage()));
        assertFalse(mover.isAllowedTarget(new Folder("F", EntityType.Schedule)));
        assertFalse(mover.isAllowedTarget(new Folder("F", EntityType.EmailMessage)));
        mover.setItemsToMove(Arrays.asList(new Schedule("S"), new Folder("F", EntityType.Schedule)));
        assertFalse(mover.isAllowedTarget(new Folder("F", EntityType.Schedule)));
        mover.setItemsToMove(Arrays.asList(new Folder("F", EntityType.Operation)));
        assertFalse(mover.isAllowedTarget(new Folder("F", EntityType.Schedule)));
    }
View Full Code Here


        assertFalse(mover.isAllowedTarget(new Folder("F", EntityType.Schedule)));
    }
   
    @Test
    public void testTargetAlreadyParentItem() {
        testTargetAlreadyParent(new Folder("F", EntityType.EmailMessage), new EmailMessage());
    }
View Full Code Here

        testTargetAlreadyParent(new Folder("F", EntityType.EmailMessage), new EmailMessage());
    }
   
    @Test
    public void testTargetAlreadyParentForFolder() {
        testTargetAlreadyParent(new Folder("F", EntityType.EmailMessage), new Folder("F2", EntityType.EmailMessage));
    }
View Full Code Here

        assertFalse(mover.isAllowedTarget(parent));
    }
   
    @Test
    public void testCyclicFoldersGuard() {
        Folder grandParent = new Folder("GP", EntityType.Operation);
        Folder parent = new Folder("P", EntityType.Operation);
        Folder child = new Folder("C", EntityType.Operation);
        grandParent.addSubFolder(parent);
        parent.addSubFolder(child);
        DefaultEntityMover mover = new DefaultEntityMover();
        mover.setItemsToMove(Arrays.asList(grandParent));
        assertFalse(mover.isAllowedTarget(parent));
View Full Code Here

        assertTrue(mover.isAllowedTarget(grandParent));
    }
   
    @Test
    public void testResolveConflictByNotMoving() {
        Folder originalParent = new Folder("F1", EntityType.Schedule);
        Folder newParent = new Folder("F2", EntityType.Schedule);
        String name = "S";
        Schedule scheduleToMove = new Schedule(name);
        originalParent.addItem(scheduleToMove);
        newParent.addItem(new Schedule(name));
        DefaultEntityMover mover = new DefaultEntityMover();
        mover.setConflictResolver(ConflictResolver.DO_NOT_MOVE);
        mover.setItemsToMove(Arrays.asList(scheduleToMove));
        assertTrue(mover.isAllowedTarget(newParent));
        assertTrue(mover.executeMove(newParent).isEmpty());
View Full Code Here

   
    public void run() {
        installNameValidator();
        Schedule moved = new Schedule("S");
        Schedule existing = new Schedule("S");
        Folder parent = new Folder("F", EntityType.Schedule);
        parent.addItem(existing);
        DialogConflictResolver resolver = createResolver();
        resolver.resolve(moved, parent, existing);
    }
View Full Code Here

    /**
     * Creates the new project item and inserts it into the project under the target type's root
     * folder.
     */
    public final void doTransform(F template) {
        Folder parent = findParent(template);
        doTransform(template, parent);
    }
View Full Code Here

    protected final void createData() {
        NameValidatorStore nameValidators = NameValidatorStore.getInstance();
        nameValidators.put(Schedule.class, new DefaultIntegrationNameValidator());
        moved = new Schedule("S");
        existing = new Schedule("S");
        parent = new Folder("F", EntityType.Schedule);
        parent.addItem(existing);
    }
View Full Code Here

        QuickFrame frame = createFrame(selector);
        frame.publish();
    }
   
    private EntityTreeSelector<Source> createSelector() {
        Folder secret = new Folder("Secret", EntityType.Source);
        secret.addItem(new Source("Deep Throat"));
        project.insertEntityUnderRoot(secret);
        Folder amusement = new Folder("Of Amusement", EntityType.Source);
        amusement.addItem(new Source("Jerry's Apartment"));
        project.insertEntityUnderRoot(amusement);
        Source toSelect = new Source("www.jitterbit.com");
        project.insertEntityUnderRoot(toSelect);
        project.insertEntityUnderRoot(new Source("Incoming FTP on Linuxqa"));
        final EntityTreeSelector<Source> selector = new EntityTreeSelector<Source>(project, EntityType.Source, Source.class);
View Full Code Here

        }

        private void restoreFolder(Folder parent, EntityType type, Persistor child) {
            String name = restoreName(child);
            FolderId id = restoreId(child, FolderId.class);
            Folder folder = new Folder(id, name, type);
            parent.addItem(folder);
            populateFolder(folder, child, type);
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.entity.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.