Package com.tnsai.annotations
Enum Class KnowledgePolicy.Presence
- All Implemented Interfaces:
Serializable,Comparable<KnowledgePolicy.Presence>,Constable
- Enclosing class:
KnowledgePolicy
Whether a source must load when nothing configures it.
- Since:
- 0.18.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe source loads from its declared path: a missing file fails the load, and an empty one loads as no content.The source is read only when a configuration points it elsewhere. -
Method Summary
Modifier and TypeMethodDescriptionstatic KnowledgePolicy.PresenceReturns the enum constant of this class with the specified name.static KnowledgePolicy.Presence[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
MUST_LOAD
The source loads from its declared path: a missing file fails the load, and an empty one loads as no content. The default. -
WHEN_CONFIGURED
The source is read only when a configuration points it elsewhere.A source is configured when a
Configfile or a run-time location moves its path to another file than the one its compiledKnowledge.path()names, both resolved against the working directory. A source only a configuration file declares is configured, and so is one whose path a configuration blanks: it reaches the loader, which refuses it. A source compiled with a blank path cannot be unconfigured, so it cannot be WHEN_CONFIGURED.- Unconfigured: the source loads as no content, and its file is never read, whether it is absent, empty or present.
- Configured: the source loads as
MUST_LOADdoes. A host that checks readiness before a run (for exampleSCOPBridge.requireReady) also requires at least one unit from it.
Valid for a
FILEsource only, and not for one readDIRECT, at role level or by an action: a DIRECT source is prompt text with nothing to fall back on.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-