org.eclipse.jgit.api
Class SubmoduleUpdateCommand

java.lang.Object
  extended by org.eclipse.jgit.api.GitCommand<T>
      extended by org.eclipse.jgit.api.TransportCommand<SubmoduleUpdateCommand,Collection<String>>
          extended by org.eclipse.jgit.api.SubmoduleUpdateCommand
All Implemented Interfaces:
Callable<Collection<String>>

public class SubmoduleUpdateCommand
extends TransportCommand<SubmoduleUpdateCommand,Collection<String>>

A class used to execute a submodule update command.

See Also:
Git documentation about submodules

Field Summary
 
Fields inherited from class org.eclipse.jgit.api.TransportCommand
credentialsProvider, timeout, transportConfigCallback
 
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
 
Constructor Summary
SubmoduleUpdateCommand(Repository repo)
           
 
Method Summary
 SubmoduleUpdateCommand addPath(String path)
          Add repository-relative submodule path to initialize
 Collection<String> call()
          Execute the SubmoduleUpdateCommand command.
 SubmoduleUpdateCommand setProgressMonitor(ProgressMonitor monitor)
          The progress monitor associated with the clone operation.
 
Methods inherited from class org.eclipse.jgit.api.TransportCommand
configure, configure, self, setCredentialsProvider, setTimeout, setTransportConfigCallback
 
Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubmoduleUpdateCommand

public SubmoduleUpdateCommand(Repository repo)
Parameters:
repo -
Method Detail

setProgressMonitor

public SubmoduleUpdateCommand setProgressMonitor(ProgressMonitor monitor)
The progress monitor associated with the clone operation. By default, this is set to NullProgressMonitor

Parameters:
monitor -
Returns:
this command
See Also:
NullProgressMonitor

addPath

public SubmoduleUpdateCommand addPath(String path)
Add repository-relative submodule path to initialize

Parameters:
path -
Returns:
this command

call

public Collection<String> call()
                        throws InvalidConfigurationException,
                               NoHeadException,
                               ConcurrentRefUpdateException,
                               CheckoutConflictException,
                               InvalidMergeHeadsException,
                               WrongRepositoryStateException,
                               NoMessageException,
                               NoHeadException,
                               RefNotFoundException,
                               GitAPIException
Execute the SubmoduleUpdateCommand command.

Specified by:
call in interface Callable<Collection<String>>
Specified by:
call in class GitCommand<Collection<String>>
Returns:
a collection of updated submodule paths
Throws:
ConcurrentRefUpdateException
CheckoutConflictException
InvalidMergeHeadsException
InvalidConfigurationException
NoHeadException
NoMessageException
RefNotFoundException
WrongRepositoryStateException
GitAPIException


Copyright © 2012. All Rights Reserved.