public class RuleImpl extends ObjectImpl implements Rule
validation rule
.Rule.MessageKey, Rule.PropertyRestriction, Rule.RuleType, Rule.ValidationType
index, path
EMPTY_ARRAY
AMPERSAND, AT, BR, CLASS, CLOSE_ANGLE_BRACKET, CLOSE_BRACE, CLOSE_BRACKET, CLOSE_PRE_CMT, CLOSE_PRE_TAG, CLOSE_SQUARE_BRACKET, COLON, COMMA, CONNECTION_SUFFIX, CURRENT_FOLDER_SYMBOL, DDL, DEFAULT_LOCAL_WORKSPACE_NAME, DIVIDE, DOLLAR_SIGN, DOT, DOT_CHAR, DOT_DOT, DOT_KOMODO, DOUBLE_BACK_SLASH, DRIVE_SEPARATOR, EMPTY_ARRAY, EMPTY_STRING, ENUM, EQUALS, FILE_EXTENSION_SEPARATOR, FILE_NAME_WILDCARD, FINAL, FORWARD_SLASH, HASH, HYPHEN, INTERFACE, JAR, JAVA, JAVA_IO_TMPDIR, JBOSS_SERVER_TMP_DIR, KOMODO, LINE_SEPARATOR, LINE_SEPARATOR_PROPERTY_NAME, LOG, MINUS, MULTIPLY, NBSP, NEW_LINE, OPEN_ANGLE_BRACKET, OPEN_BRACE, OPEN_BRACKET, OPEN_PRE_CMT, OPEN_PRE_TAG, OPEN_SQUARE_BRACKET, PARENT_FOLDER_SYMBOL, PERCENT, PIPE, PLUS, PREFIX_PATTERN, PRIVATE, PUBLIC, QUESTION_MARK, QUOTE_MARK, SEMI_COLON, SERVICE_VDB_SUFFIX, SERVICE_VDB_VIEW_MODEL, SERVICE_VDB_VIEW_SUFFIX, SOURCES, SPACE, SPEECH_MARK, SRC, STAR, STATIC, TAB, TARGET, UNDERSCORE, UNDERSCORE_CHAR, VDB_DEPLOYMENT_SUFFIX, VDB_PREFIX, XML, XML_SUFFIX, ZIP, ZIP_SUFFIX
Constructor and Description |
---|
RuleImpl(Repository.UnitOfWork uow,
Repository repository,
String path)
Constructs a validation rule.
|
accept, addChild, addDescriptor, equals, getAbsolutePath, getAllDescriptors, getChild, getChild, getChildren, getChildrenOfType, getChildTypes, getDescriptor, getDescriptors, getIndex, getName, getObjectFactory, getObjectProperty, getParent, getPrimaryType, getProperty, getPropertyDescriptor, getPropertyDescriptors, getPropertyFactory, getPropertyNames, getRawChildren, getRawDescriptors, getRawParent, getRawProperty, getRawPropertyDescriptors, getRawPropertyNames, getRepository, getTypeId, getTypeIdentifier, handleError, hasChild, hasChild, hasChildren, hasDescriptor, hashCode, hasProperties, hasProperty, hasRawChild, hasRawChild, hasRawChildren, hasRawProperty, isChildRestricted, print, provision, remove, removeChild, removeDescriptor, rename, setObjectProperty, setPrimaryType, setProperty, toString, validatePropertyValue, validateType
public RuleImpl(Repository.UnitOfWork uow, Repository repository, String path) throws KException
uow
- the transaction (can be null
if update should be automatically committed)repository
- the repository where the relational object exists (cannot be null
)path
- the path (cannot be empty but assumed to be a path to a rule)KException
- if an error occurspublic Result evaluate(Repository.UnitOfWork transaction, KomodoObject kobject) throws KException
evaluate
in interface Rule
KException
Rule.evaluate(org.komodo.spi.repository.Repository.UnitOfWork,
org.komodo.spi.repository.KomodoObject)
public String getDescription(Repository.UnitOfWork transaction) throws KException
getDescription
in interface Rule
KException
Rule.getDescription(org.komodo.spi.repository.Repository.UnitOfWork)
public String getJcrName(Repository.UnitOfWork transaction) throws KException
getJcrName
in interface Rule
KException
Rule.getJcrName(org.komodo.spi.repository.Repository.UnitOfWork)
public String getMessage(Repository.UnitOfWork transaction, String key) throws KException
getMessage
in interface Rule
KException
Rule.getMessage(org.komodo.spi.repository.Repository.UnitOfWork,
java.lang.String)
public String getNodeType(Repository.UnitOfWork transaction) throws KException
getNodeType
in interface Rule
KException
Rule.getNodeType(org.komodo.spi.repository.Repository.UnitOfWork)
public Map<String,String> getPropRestrictions(Repository.UnitOfWork transaction, Rule.PropertyRestriction restrictionType) throws KException
getPropRestrictions
in interface Rule
KException
Rule.getPropRestrictions(org.komodo.spi.repository.Repository.UnitOfWork,org.komodo.spi.repository.validation.Rule.PropertyRestriction)
public Rule.RuleType getRuleType(Repository.UnitOfWork transaction) throws KException
getRuleType
in interface Rule
KException
Rule.getRuleType(org.komodo.spi.repository.Repository.UnitOfWork)
public Outcome.Level getSeverity(Repository.UnitOfWork transaction) throws KException
getSeverity
in interface Rule
KException
Rule.getSeverity(org.komodo.spi.repository.Repository.UnitOfWork)
public Rule.ValidationType getValidationType(Repository.UnitOfWork transaction) throws KException
getValidationType
in interface Rule
KException
Rule.getValidationType(org.komodo.spi.repository.Repository.UnitOfWork)
public boolean isRequired(Repository.UnitOfWork transaction) throws KException
isRequired
in interface Rule
KException
Rule.isRequired(org.komodo.spi.repository.Repository.UnitOfWork)
public void setRequired(Repository.UnitOfWork transaction, boolean newRequired) throws KException
setRequired
in interface Rule
KException
Rule.setRequired(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public boolean isApplicable(Repository.UnitOfWork transaction, KomodoObject kObject) throws KException
isApplicable
in interface Rule
KException
Rule.isApplicable(org.komodo.spi.repository.Repository.UnitOfWork, org.komodo.spi.repository.KomodoObject)
public boolean isEnabled(Repository.UnitOfWork transaction) throws KException
isEnabled
in interface Rule
KException
Rule.isEnabled(org.komodo.spi.repository.Repository.UnitOfWork)
public void setEnabled(Repository.UnitOfWork transaction, boolean newEnabled) throws KException
setEnabled
in interface Rule
KException
Rule.setEnabled(org.komodo.spi.repository.Repository.UnitOfWork, boolean)
public void setSeverity(Repository.UnitOfWork transaction, Outcome.Level newLevel) throws KException
setSeverity
in interface Rule
KException
Rule.setSeverity(org.komodo.spi.repository.Repository.UnitOfWork,
org.komodo.spi.outcome.Outcome.Level)
Copyright © 2013–2019. All rights reserved.