Package uk.gov.nationalarchives.droid.results.handlers

Examples of uk.gov.nationalarchives.droid.results.handlers.ProgressObserver


        destination = new File(tmpDir, "saved.drd");
  }

  @Test
    public void testSaveProfileToFile() throws Exception {
        ProgressObserver callback = mock(ProgressObserver.class);
        ProfileDiskAction action = new ProfileDiskAction();
        action.saveProfile("profiles/" + "profileToSave", destination, callback);
        //assertTrue(destination.exists());

        /* check the destination is a zip file with the following entries:
View Full Code Here


        assertTrue(source.exists());

        //File destination = new File(profilesDir, "myProfile");
        //FileUtils.deleteQuietly(destination);

        ProgressObserver observer = mock(ProgressObserver.class);

        ProfileDiskAction profileDiskAction = new ProfileDiskAction();
        profileDiskAction.load(source, profileToLoadDir, observer);

        assertTrue(profileToLoadDir.isDirectory());
View Full Code Here

            }
        };
       
        String profileUuid = profileForm.getProfile().getUuid();
       
        final ProgressObserver observer = new ProgressObserver() {
            @Override
            public void onProgress(Integer progress) {
                setProgress(progress);
            }
        };
View Full Code Here

        statusProgressBar.setVisible(true);
        statusProgressBar.setIndeterminate(false);
        statusProgressBar.setIndeterminate(false);
        statusLabel.setText("Loading profile...");

        observer = new ProgressObserver() {
            @Override
            public void onProgress(Integer progress) {
                setProgress(progress);
            }
        };
View Full Code Here

        this.profileForm = profileForm;
        ProfileInstance profile = profileForm.getProfile();
       
        profileId = profile.getUuid();

        callback = new ProgressObserver() {
            @Override
            public void onProgress(Integer progress) {
                setProgress(progress);
            }
        };
View Full Code Here

   
   
    private void unpackProfileTemplate(File profileTemplate, File copyToDirectory) throws IOException {
        copyToDirectory.mkdir();
        ProfileDiskAction unpacker = new ProfileDiskAction();
        ProgressObserver observe = new ProgressObserver() {
            @Override
            public void onProgress(Integer progress) {
            }
        };
        unpacker.load(profileTemplate, copyToDirectory, observe);
View Full Code Here

    }
   
   
    private void packProfileTemplate(File databaseDir, File profileTemplate)  {
        ProfileDiskAction packer = new ProfileDiskAction();
        ProgressObserver observe = new ProgressObserver() {
            @Override
            public void onProgress(Integer progress) {
            }
        };
        try {
View Full Code Here

        this.reportManager = reportManager;
    }

    @Override
    protected Integer doInBackground() {
        final ProgressObserver observer = new ProgressObserver() {
            @Override
            public void onProgress(Integer progress) {
                setProgress(progress);
            }
        };
View Full Code Here

      Collection<ProfileResourceNode> rootNodes = profileManager.findRootNodes(profile.getUuid());
      assertEquals(1, rootNodes.size());
      assertEquals(testFile.toURI(), rootNodes.iterator().next().getUri());

      ProgressObserver progressObserver = mock(ProgressObserver.class);
      profileManager.setProgressObserver(profile.getUuid(), progressObserver);
      profile.changeState(ProfileState.VIRGIN);

      Future<?> submission = profileManager.start(profile.getUuid());
      submission.get();
View Full Code Here

     
      String profileId = profile.getUuid();
      profileManager.updateProfileSpec(profileId, profileSpec);
      profileManager.setResultsObserver(profileId, myObserver);

      ProgressObserver progressObserver = mock(ProgressObserver.class);
      profileManager.setProgressObserver(profileId, progressObserver);

      Future<?> submission = profileManager.start(profileId);
      submission.get();
View Full Code Here

TOP

Related Classes of uk.gov.nationalarchives.droid.results.handlers.ProgressObserver

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.