Package com.mooltiverse.oss.nyx.state
Interface Root
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getBump()
Returns the version identifier bumped on the previous release to produce the new release, if any.Configuration
getConfiguration()
Returns the configuration object.File
getDirectory()
Returns the directory used as the working directory as it's defined by the configuration.Map<String,String>
getInternals()
Returns the live map of internal attributes.ReleaseScope
getReleaseScope()
Returns the object modelling the attributes defining the scope of the release.Scheme
getScheme()
Returns the versioning scheme used as it's defined by the configuration.Long
getTimestamp()
Returns the current timestamp.String
getVersion()
Returns the version inferred by Nyx, if any.
-
-
-
Method Detail
-
getBump
String getBump() throws DataAccessException, IllegalPropertyException
Returns the version identifier bumped on the previous release to produce the new release, if any. This value is only available afterNyx.infer()
has run.- Returns:
- the version identifier bumped on the previous release to produce the new release, if any.
It may be
null
if no identifier has been bumped (i.e. because no significant changes have been detected in the release scope or because inference was inhibited by values overridden by user). - Throws:
DataAccessException
- in case the attribute cannot be read or accessed.IllegalPropertyException
- in case the attribute has been defined but has incorrect values or it can't be resolved.- See Also:
getReleaseScope()
,ReleaseScope.getSignificant()
-
getConfiguration
Configuration getConfiguration()
Returns the configuration object. The configuration is a live reference.- Returns:
- the configuration object.
-
getDirectory
File getDirectory() throws DataAccessException, IllegalPropertyException
Returns the directory used as the working directory as it's defined by the configuration.- Returns:
- the current value for this attribute.
- Throws:
DataAccessException
- in case the attribute cannot be read or accessed.IllegalPropertyException
- in case the attribute has been defined but has incorrect values or it can't be resolved.- See Also:
Configuration.getDirectory()
-
getInternals
Map<String,String> getInternals()
Returns the live map of internal attributes. Internal attributes are not documented so they must not be used by users as the implementation may change them at any time. Commands and other implementation objects are free to store and remove their own attributes here (i.e. for caching or store their internal state). When handling these attributes, entities must make sure the names (keys) do not overlap, unless for shared attributes. This object takes no control over the values stored in this map. Sensitive informations must not be stored here as they would be exposed when marshalling the attributes to files.- Returns:
- the live map of internal attributes. The returned map is never
null
-
getReleaseScope
ReleaseScope getReleaseScope() throws DataAccessException, IllegalPropertyException
Returns the object modelling the attributes defining the scope of the release.- Returns:
- the current value for this attribute.
- Throws:
DataAccessException
- in case the attribute cannot be read or accessed.IllegalPropertyException
- in case the attribute has been defined but has incorrect values or it can't be resolved.
-
getScheme
Scheme getScheme() throws DataAccessException, IllegalPropertyException
Returns the versioning scheme used as it's defined by the configuration.- Returns:
- the current value for this attribute.
- Throws:
DataAccessException
- in case the attribute cannot be read or accessed.IllegalPropertyException
- in case the attribute has been defined but has incorrect values or it can't be resolved.
-
getTimestamp
Long getTimestamp()
Returns the current timestamp.- Returns:
- the current timestamp.
-
getVersion
String getVersion() throws DataAccessException, IllegalPropertyException
Returns the version inferred by Nyx, if any. If the version was overridden by configuration this will be the same asConfiguration.getVersion()
. This value is only available afterNyx.infer()
has run.
The returned version also has the configured prefix, if any.- Returns:
- the current version inferred by Nyx. This is
null
untilNyx.infer()
has run. - Throws:
DataAccessException
- in case the attribute cannot be read or accessed.IllegalPropertyException
- in case the attribute has been defined but has incorrect values or it can't be resolved.- See Also:
Configuration.getVersion()
,Nyx.infer()
,Infer
-
-