Package com.mooltiverse.oss.nyx
Class Nyx
- java.lang.Object
-
- com.mooltiverse.oss.nyx.Nyx
-
public class Nyx extends Object
The Nyx entry point and main class. This class is not meant to be used in multi-threaded environments.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description State
arrange()
Runs theArrange
command and returns the updated state.void
clean()
Runs theClean
command to restore the state of the workspace to ints initial state.Configuration
configuration()
Returns the configuration.State
infer()
Runs theInfer
command and returns the updated state.boolean
isUpToDate(Commands command)
Runstrue
if the given command has already run and is up to date,false
otherwise.State
make()
Runs theMake
command and returns the updated state.State
mark()
Runs theMark
command and returns the updated state.State
publish()
Runs thePublish
command and returns the updated state.Repository
repository()
Returns the repository.void
run(Commands command)
Runs the given command.State
state()
Returns the state.
-
-
-
Constructor Detail
-
Nyx
public Nyx()
Default constructor.
-
Nyx
public Nyx(File directory)
Creates a new Nyx instance using the given directory as the base directory.- Parameters:
directory
- the default directory. If notnull
this overrides the configuration (Configuration.getDirectory()
).- See Also:
Configuration.getDirectory()
-
-
Method Detail
-
configuration
public Configuration configuration() throws DataAccessException, IllegalPropertyException
Returns the configuration.- Returns:
- the configuration
- Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.
-
repository
public Repository repository() throws DataAccessException, IllegalPropertyException, GitException
Returns the repository.- Returns:
- the repository
- Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.
-
state
public State state() throws DataAccessException, IllegalPropertyException
Returns the state.- Returns:
- the state
- Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.
-
isUpToDate
public boolean isUpToDate(Commands command) throws DataAccessException, IllegalPropertyException, GitException
Runstrue
if the given command has already run and is up to date,false
otherwise.- Parameters:
command
- the command to query the status for- Returns:
true
if the given command has already run and is up to date,false
otherwise.- Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.
-
run
public void run(Commands command) throws DataAccessException, IllegalPropertyException, GitException, ReleaseException
Runs the given command.- Parameters:
command
- the identifier of the command to run.- Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.ReleaseException
- if the task is unable to complete for reasons due to the release process.- See Also:
arrange()
,clean()
,infer()
,make()
,mark()
,publish()
,state()
-
arrange
public State arrange() throws DataAccessException, IllegalPropertyException, GitException, ReleaseException
Runs theArrange
command and returns the updated state.- Returns:
- the same state object reference returned by
state()
, which might have been updated by this command - Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.ReleaseException
- if the task is unable to complete for reasons due to the release process.- See Also:
Arrange
,run(Commands)
-
clean
public void clean() throws DataAccessException, IllegalPropertyException, GitException, ReleaseException
Runs theClean
command to restore the state of the workspace to ints initial state.- Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.ReleaseException
- if the task is unable to complete for reasons due to the release process.- See Also:
Clean
,run(Commands)
-
infer
public State infer() throws DataAccessException, IllegalPropertyException, GitException, ReleaseException
Runs theInfer
command and returns the updated state.- Returns:
- the same state object reference returned by
state()
, which might have been updated by this command - Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.ReleaseException
- if the task is unable to complete for reasons due to the release process.- See Also:
Infer
,run(Commands)
-
make
public State make() throws DataAccessException, IllegalPropertyException, GitException, ReleaseException
Runs theMake
command and returns the updated state.- Returns:
- the same state object reference returned by
state()
, which might have been updated by this command - Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.ReleaseException
- if the task is unable to complete for reasons due to the release process.- See Also:
Make
,run(Commands)
-
mark
public State mark() throws DataAccessException, IllegalPropertyException, GitException, ReleaseException
Runs theMark
command and returns the updated state.- Returns:
- the same state object reference returned by
state()
, which might have been updated by this command - Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.ReleaseException
- if the task is unable to complete for reasons due to the release process.- See Also:
Mark
,run(Commands)
-
publish
public State publish() throws DataAccessException, IllegalPropertyException, GitException, ReleaseException
Runs thePublish
command and returns the updated state. Dependencies of this command are also executed first.- Returns:
- the same state object reference returned by
state()
, which might have been updated by this command - Throws:
DataAccessException
- in case the configuration can't be loaded for some reason.IllegalPropertyException
- in case the configuration has some illegal options.GitException
- in case of unexpected issues when accessing the Git repository.ReleaseException
- if the task is unable to complete for reasons due to the release process.- See Also:
Publish
,run(Commands)
-
-