Package com.ultikits.ultitools.utils
Class ModuleIds
java.lang.Object
com.ultikits.ultitools.utils.ModuleIds
The one derivation of a module's UltiCloud identifier; internal, not for module use.
UltiCloud addresses a module by its catalogue identifier: the <id> a
hello declares in modules:<id>@X.Y.Z, the module of a module.request, the
moduleName of an error.report and the :moduleRef of every catalogue route
must all be that identifier, lower-case, in the contract's ModuleIdentifier syntax (a
lower-case letter first, segments of lower-case letters and digits joined by a single . or
-, at most 64 characters). The framework derives it from the module's
identify-string, never from its plugin.yml name: the two differ for some modules (for
example name UltiTools-Chat, identify-string ultichat), and the name is free text the
server does not match.
- Since:
- 6.3.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe contract's bound on a module identifier. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringof(UltiToolsPlugin module) A loaded module's identifier, from its identify-string.static StringA module's identifier from its identify-string: trimmed and lower-cased;nullwhen the result is empty, longer thanMAX_LENGTHor not in the contract's identifier syntax.
-
Field Details
-
MAX_LENGTH
public static final int MAX_LENGTHThe contract's bound on a module identifier.- See Also:
-
-
Constructor Details
-
ModuleIds
private ModuleIds()
-
-
Method Details
-
of
A module's identifier from its identify-string: trimmed and lower-cased;nullwhen the result is empty, longer thanMAX_LENGTHor not in the contract's identifier syntax.- Parameters:
identifyString- an identify-string, possiblynull- Returns:
- the identifier, or
nullwhen it cannot be one
-
of
A loaded module's identifier, from its identify-string.- Parameters:
module- the module, possiblynull- Returns:
- the identifier, or
nullwhen there is no module or its identify-string cannot be one
-