public class FilterCommandRegistry extends Object
Constructor and Description |
---|
FilterCommandRegistry() |
Modifier and Type | Method and Description |
---|---|
static FilterCommand |
createFilterCommand(String filterCommandName,
Repository db,
InputStream in,
OutputStream out)
Creates a new
FilterCommand for the given name. |
static Set<String> |
getRegisteredFilterCommands() |
static boolean |
isRegistered(String filterCommandName)
Checks whether any
FilterCommandFactory is registered for a given
command name |
static FilterCommandFactory |
register(String filterCommandName,
FilterCommandFactory factory)
Registers a
FilterCommandFactory responsible for creating
FilterCommand s for a certain command name. |
static FilterCommandFactory |
unregister(String filterCommandName)
Unregisters the
FilterCommandFactory registered for the given
command name |
public static FilterCommandFactory register(String filterCommandName, FilterCommandFactory factory)
FilterCommandFactory
responsible for creating
FilterCommand
s for a certain command name. If the factory f1 is
registered for the name "jgit://builtin/x" then a call to
getCommand("jgit://builtin/x", ...)
will call
f1(...)
to create a new instance of FilterCommand
filterCommandName
- the command name for which this factory is registeredfactory
- the factory responsible for creating FilterCommand
s
for the specified namepublic static FilterCommandFactory unregister(String filterCommandName)
FilterCommandFactory
registered for the given
command namefilterCommandName
- the FilterCommandFactory's filter command namepublic static boolean isRegistered(String filterCommandName)
FilterCommandFactory
is registered for a given
command namefilterCommandName
- the name for which the registry should be checkedtrue
if any factory was registered for the namepublic static Set<String> getRegisteredFilterCommands()
FilterCommandFactory
is
registeredpublic static FilterCommand createFilterCommand(String filterCommandName, Repository db, InputStream in, OutputStream out) throws IOException
FilterCommand
for the given name. A factory must be
registered for the name in advance.filterCommandName
- The name for which a new FilterCommand
should be
createddb
- the repository this command should work onin
- the InputStream
this FilterCommand
should read
fromout
- the OutputStream
this FilterCommand
should
write tonull
if
there was no factory registered for that nameIOException
Copyright © 2017 Eclipse JGit Project. All rights reserved.