Package org.eclipse.jgit.api
Class RemoteSetUrlCommand
- All Implemented Interfaces:
Callable<RemoteConfig>
Used to change the URL of a remote.
This class has setters for all supported options and arguments of this
command and a
call()
method to finally execute the command.- Since:
- 4.2
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
The available URI types for the remote. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private URIish
private RemoteSetUrlCommand.UriType
Fields inherited from class org.eclipse.jgit.api.GitCommand
repo
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Constructor for RemoteSetUrlCommand. -
Method Summary
Modifier and TypeMethodDescriptioncall()
void
Deprecated.void
setPush
(boolean push) Deprecated.setRemoteName
(String remoteName) The name of the remote to change the URL for.setRemoteUri
(URIish remoteUri) The new URL for the remote.void
Deprecated.usesetRemoteUri(org.eclipse.jgit.transport.URIish)
insteadWhether to change the push URL of the remote instead of the fetch URL.Methods inherited from class org.eclipse.jgit.api.GitCommand
checkCallable, getRepository, setCallable
-
Field Details
-
remoteName
-
remoteUri
-
type
-
-
Constructor Details
-
RemoteSetUrlCommand
Constructor for RemoteSetUrlCommand.
- Parameters:
repo
- theRepository
-
-
Method Details
-
setName
Deprecated.usesetRemoteName(java.lang.String)
insteadThe name of the remote to change the URL for.- Parameters:
name
- a remote name
-
setRemoteName
The name of the remote to change the URL for.- Parameters:
remoteName
- a remote remoteName- Returns:
this
- Since:
- 5.3
-
setUri
Deprecated.usesetRemoteUri(org.eclipse.jgit.transport.URIish)
insteadThe new URL for the remote.- Parameters:
uri
- an URL for the remote
-
setRemoteUri
The new URL for the remote.- Parameters:
remoteUri
- an URL for the remote- Returns:
this
- Since:
- 5.3
-
setPush
Deprecated.Whether to change the push URL of the remote instead of the fetch URL.- Parameters:
push
-true
to set the push url,false
to set the fetch url
-
setUriType
Whether to change the push URL of the remote instead of the fetch URL.- Parameters:
type
- theUriType
value to set- Returns:
this
- Since:
- 5.3
-
call
Execute the command
Executes the
remote
command with all the options and parameters collected by the setter methods of this class.- Specified by:
call
in interfaceCallable<RemoteConfig>
- Specified by:
call
in classGitCommand<RemoteConfig>
- Throws:
GitAPIException
-
setRemoteName(java.lang.String)
instead