public final class ServiceStatusRule extends Object
All class attributes are immutable and have a value (they are never null
).
Modifier and Type | Class and Description |
---|---|
static class |
ServiceStatusRule.CodeRule
How is the status code for the determined.
|
static class |
ServiceStatusRule.SelectType
How the generator should be selected.
|
Modifier and Type | Field and Description |
---|---|
protected static ServiceStatusRule |
DEFAULT_RULE
The default rule to use when none is specified.
|
Modifier | Constructor and Description |
---|---|
protected |
ServiceStatusRule(ServiceStatusRule.SelectType use,
List<String> items,
ServiceStatusRule.CodeRule rule)
Create a new rule.
|
Modifier and Type | Method and Description |
---|---|
boolean |
appliesTo(String nameOrTarget)
Indicates whether this rule applies to the generator name or target.
|
boolean |
appliesToAll()
Indicates whether this rule applies to all the generators.
|
List<String> |
items() |
static ServiceStatusRule |
newInstance(String use,
String rule)
Create a new rule instance.
|
ServiceStatusRule.CodeRule |
rule() |
String |
toString() |
ServiceStatusRule.SelectType |
use() |
protected static final ServiceStatusRule DEFAULT_RULE
protected ServiceStatusRule(ServiceStatusRule.SelectType use, List<String> items, ServiceStatusRule.CodeRule rule)
use
- How the generator should be selected.items
- The names or targets of the generators to select.rule
- How is the status code for the determined.public ServiceStatusRule.SelectType use()
public boolean appliesTo(String nameOrTarget)
nameOrTarget
- The name or target of the generator.true
if this rule applies to all the generators;
false
otherwise.public boolean appliesToAll()
true
if this rule applies to all the generators;
false
otherwise.public ServiceStatusRule.CodeRule rule()
public static ServiceStatusRule newInstance(String use, String rule)
use
- the use definitionrule
- the code rule.NullPointerException
- If the use parameter is null
.IllegalArgumentException
- If either argument is invalid.Copyright © 2016 Allette Systems. All rights reserved.