Modifier and Type | Field and Description |
---|---|
static String |
VALIDATION_ROOT
The root path of the Komodo environment validation area.
|
Modifier and Type | Method and Description |
---|---|
static Rule |
createChildCountValidationRule(Repository.UnitOfWork transaction,
Repository repository,
String name,
String nodeType,
Map<String,String> nodePropRestrictionMap,
String childType,
Map<String,String> childPropRestrictionMap,
boolean childRequired,
Number minValue,
boolean minInclusive,
Number maxValue,
boolean maxInclusive,
Outcome.Level severity,
List<LocalizedMessage> descriptions,
List<LocalizedMessage> messages)
The error message and description list elements must be 2 element arrays with the first element being the locale and the
second element being the translated text.
|
static Rule |
createChildRelationshipValidationRule(Repository.UnitOfWork transaction,
Repository repository,
String name,
String nodeType,
Map<String,String> nodePropRestrictionMap,
String childType,
Map<String,String> childPropRestrictionMap,
boolean childRequired,
List<String> propsThatMustExist,
List<String> propsThatMustNotExist,
List<String> childTypesThatMustExist,
List<String> childTypesThatMustNotExist,
Outcome.Level severity,
List<LocalizedMessage> descriptions,
List<LocalizedMessage> messages)
The error message and description list elements must be 2 element arrays with the first element being the locale and the
second element being the translated text.
|
static Rule |
createNodeNameRule(Repository.UnitOfWork transaction,
Repository repository,
String name,
String nodeType,
Map<String,String> nodePropRestrictionMap,
String pattern,
Outcome.Level severity,
List<LocalizedMessage> descriptions,
List<LocalizedMessage> messages)
The error message and description list elements must be 2 element arrays with the first element being the locale and the
second element being the translated text.
|
static Rule |
createPropertyPatternRule(Repository.UnitOfWork transaction,
Repository repository,
String name,
String nodeType,
Map<String,String> nodePropRestrictionMap,
String propertyName,
boolean propertyRequired,
String pattern,
Outcome.Level severity,
List<LocalizedMessage> descriptions,
List<LocalizedMessage> messages)
The error message and description list elements must be 2 element arrays with the first element being the locale and the
second element being the translated text.
|
static Rule |
createPropertyRelationshipValidationRule(Repository.UnitOfWork transaction,
Repository repository,
String name,
String nodeType,
Map<String,String> nodePropRestrictionMap,
String propertyName,
boolean propertyRequired,
List<String> propsThatMustExist,
List<String> propsThatMustNotExist,
List<String> childTypesThatMustExist,
List<String> childTypesThatMustNotExist,
Outcome.Level severity,
List<LocalizedMessage> descriptions,
List<LocalizedMessage> messages)
The error message and description list elements must be 2 element arrays with the first element being the locale and the
second element being the translated text.
|
static Rule |
createPropertyValueNumberValidationRule(Repository.UnitOfWork transaction,
Repository repository,
String name,
String nodeType,
Map<String,String> nodePropRestrictionMap,
String propertyName,
boolean propertyRequired,
Number minValue,
boolean minInclusive,
Number maxValue,
boolean maxInclusive,
Outcome.Level severity,
List<LocalizedMessage> descriptions,
List<LocalizedMessage> messages)
The error message and description list elements must be 2 element arrays with the first element being the locale and the
second element being the translated text.
|
static Rule |
createSameNameSiblingValidationRule(Repository.UnitOfWork transaction,
Repository repository,
String name,
String nodeType,
Map<String,String> nodePropRestrictionMap,
String childType,
Map<String,String> childPropRestrictionMap,
boolean childRequired,
boolean matchType,
Outcome.Level severity,
List<LocalizedMessage> descriptions,
List<LocalizedMessage> messages)
The error message and description list elements must be 2 element arrays with the first element being the locale and the
second element being the translated text.
|
static KomodoObject |
getValidationDefaultAreaNode(Repository.UnitOfWork transaction,
Repository repository)
Get the Validation defaults location from the repository
|
public static String VALIDATION_ROOT
public static Rule createChildCountValidationRule(Repository.UnitOfWork transaction, Repository repository, String name, String nodeType, Map<String,String> nodePropRestrictionMap, String childType, Map<String,String> childPropRestrictionMap, boolean childRequired, Number minValue, boolean minInclusive, Number maxValue, boolean maxInclusive, Outcome.Level severity, List<LocalizedMessage> descriptions, List<LocalizedMessage> messages) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)name
- the unique rule name (cannot be empty)nodeType
- the node type name this rule is validating (cannot be empty)nodePropRestrictionMap
- the additional property restrictions for this rule (cannot be null
)childType
- the name of the child type whose child count range is being validated (cannot be empty)childPropRestrictionMap
- the additional child property restrictions for this rule (cannot be null
)childRequired
- true
if a child of this type must exist.minValue
- the minimum allowed number of children with the specified type (cannot be null
)minInclusive
- true
if the number of children can equal the minimum valuemaxValue
- the maximum allowed number of children with the specified type (cannot be null
)maxInclusive
- true
if the number of children can equal the maximum valueseverity
- the severity of the rule.descriptions
- the localized descriptions (cannot be null
, include empty elements, or be empty)messages
- the localized error messages (cannot be null
, include empty elements, or be empty)null
)KException
- if an error occurspublic static Rule createChildRelationshipValidationRule(Repository.UnitOfWork transaction, Repository repository, String name, String nodeType, Map<String,String> nodePropRestrictionMap, String childType, Map<String,String> childPropRestrictionMap, boolean childRequired, List<String> propsThatMustExist, List<String> propsThatMustNotExist, List<String> childTypesThatMustExist, List<String> childTypesThatMustNotExist, Outcome.Level severity, List<LocalizedMessage> descriptions, List<LocalizedMessage> messages) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)name
- the unique rule name (cannot be empty)nodeType
- the node type name this rule is validating (cannot be empty)nodePropRestrictionMap
- the additional property restrictions for this rule (cannot be null
)childType
- the node type whose relationships are being validated (cannot be empty)childPropRestrictionMap
- the additional child property restrictions for this rule (cannot be null
)childRequired
- true
if a child of this type must exist.propsThatMustExist
- a list of properties that must exist if a child with the specified type exists (can be null
or empty)propsThatMustNotExist
- a list of properties that must NOT exist if a child with the specified type exists (can be null
or
empty)childTypesThatMustExist
- a list of node types that at least one child must have if a child with the specified type exists (can be
null
or empty)childTypesThatMustNotExist
- a list of node types that no child must have if a child with the specified type exists (can be null
or
empty)severity
- the severity of the rule.descriptions
- the localized descriptions (cannot be null
, include empty elements, or be empty)messages
- the localized error messages (cannot be null
, include empty elements, or be empty)null
)KException
- if an error occurspublic static Rule createNodeNameRule(Repository.UnitOfWork transaction, Repository repository, String name, String nodeType, Map<String,String> nodePropRestrictionMap, String pattern, Outcome.Level severity, List<LocalizedMessage> descriptions, List<LocalizedMessage> messages) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)name
- the unique rule name (cannot be empty)nodeType
- the node type name this rule is validating (cannot be empty)nodePropRestrictionMap
- the additional property restrictions for this rule (cannot be null
)pattern
- the regular expression that the child node name must match (cannot be empty)severity
- the severity of the rule.descriptions
- the localized descriptions (cannot be null
, include empty elements, or be empty)messages
- the localized error messages (cannot be null
, include empty elements, or be empty)null
)KException
- if an error occurspublic static Rule createPropertyPatternRule(Repository.UnitOfWork transaction, Repository repository, String name, String nodeType, Map<String,String> nodePropRestrictionMap, String propertyName, boolean propertyRequired, String pattern, Outcome.Level severity, List<LocalizedMessage> descriptions, List<LocalizedMessage> messages) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)name
- the unique rule name (cannot be empty)nodeType
- the node type name this rule is validating (cannot be empty)nodePropRestrictionMap
- the additional property restrictions for this rule (cannot be null
)propertyName
- the name of the property whose value is being validated (cannot be empty)propertyRequired
- true
if the property is required.pattern
- the regular expression that the property value must match (cannot be empty)severity
- the severity of the rule.descriptions
- the localized descriptions (cannot be null
, include empty elements, or be empty)messages
- the localized error messages (cannot be null
, include empty elements, or be empty)null
)KException
- if an error occurspublic static Rule createPropertyRelationshipValidationRule(Repository.UnitOfWork transaction, Repository repository, String name, String nodeType, Map<String,String> nodePropRestrictionMap, String propertyName, boolean propertyRequired, List<String> propsThatMustExist, List<String> propsThatMustNotExist, List<String> childTypesThatMustExist, List<String> childTypesThatMustNotExist, Outcome.Level severity, List<LocalizedMessage> descriptions, List<LocalizedMessage> messages) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)name
- the unique rule name (cannot be empty)nodeType
- the node type name this rule is validating (cannot be empty)nodePropRestrictionMap
- the additional property restrictions for this rule (cannot be null
)propertyName
- the property whose relationships are being validated (cannot be empty)propertyRequired
- true
if the property must exist.propsThatMustExist
- a list of properties that must exist (can be null
or empty)propsThatMustNotExist
- a list of properties that must NOT exist (can be null
or empty)childTypesThatMustExist
- a list of node types that at least one child must have (can be null
or empty)childTypesThatMustNotExist
- a list of node types that no child must have (can be null
or empty)severity
- the severity of the rule.descriptions
- the localized descriptions (cannot be null
, include empty elements, or be empty)messages
- the localized error messages (cannot be null
, include empty elements, or be empty)null
)KException
- if an error occurspublic static Rule createPropertyValueNumberValidationRule(Repository.UnitOfWork transaction, Repository repository, String name, String nodeType, Map<String,String> nodePropRestrictionMap, String propertyName, boolean propertyRequired, Number minValue, boolean minInclusive, Number maxValue, boolean maxInclusive, Outcome.Level severity, List<LocalizedMessage> descriptions, List<LocalizedMessage> messages) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)name
- the unique rule name (cannot be empty)nodeType
- the node type name this rule is validating (cannot be empty)nodePropRestrictionMap
- the additional property restrictions for this rule (cannot be null
)propertyName
- the name of the property whose value range is being validated (cannot be empty)propertyRequired
- true
if the property must exist.minValue
- the minimum allowed value (cannot be null
)minInclusive
- true
if the property value can equal the minimum valuemaxValue
- the maximum allowed value (cannot be null
)maxInclusive
- true
if the property value can equal the maximum valueseverity
- the severity of the rule.descriptions
- the localized descriptions (cannot be null
, include empty elements, or be empty)messages
- the localized error messages (cannot be null
, include empty elements, or be empty)null
)KException
- if an error occurspublic static Rule createSameNameSiblingValidationRule(Repository.UnitOfWork transaction, Repository repository, String name, String nodeType, Map<String,String> nodePropRestrictionMap, String childType, Map<String,String> childPropRestrictionMap, boolean childRequired, boolean matchType, Outcome.Level severity, List<LocalizedMessage> descriptions, List<LocalizedMessage> messages) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)name
- the unique rule name (cannot be empty)nodeType
- the node type name this rule is validating (cannot be empty)nodePropRestrictionMap
- the additional property restrictions for this rule (cannot be null
)childType
- the child type whose names are being validated (cannot be empty)childPropRestrictionMap
- the additional child property restrictions for this rule (cannot be null
)childRequired
- true
if a child of this type must exist.matchType
- true
if only children of the same type can't have the same nameseverity
- the severity of the rule.descriptions
- the localized descriptions (cannot be null
, include empty elements, or be empty)messages
- the localized error messages (cannot be null
, include empty elements, or be empty)null
)KException
- if an error occurspublic static KomodoObject getValidationDefaultAreaNode(Repository.UnitOfWork transaction, Repository repository) throws KException
transaction
- the transaction (cannot be null
or have a state that is not Repository.UnitOfWork.State.NOT_STARTED
)repository
- the repository (cannot be null
)KException
- if an error occursCopyright © 2013–2019. All rights reserved.