org.argouml.model.uml
Class AbstractWellformednessRule
java.lang.Object
|
+--org.argouml.model.uml.AbstractWellformednessRule
- Direct Known Subclasses:
- AssociationEndAggregationWellformednessRule, AssociationEndNamespaceWellformednessRule, AssociationEndNameWellformednessRule, AssociationNamespaceWellformednessRule
- public abstract class AbstractWellformednessRule
- extends java.lang.Object
Rule definition for wellformedness of some modelelement. In the UML 1.3 spec
so called wellformednessrules are defined. This class is the abstract superclass
of implementations of these rules.
In several build methods in the uml factories these rules are used. Furthermore
they are used in the proppanels to veto some changes.
- Since:
- argouml 0.11.3
Method Summary |
java.lang.String |
getUserMessage()
Returns the localized user message |
abstract boolean |
isWellformed(ru.novosoft.uml.MBase element,
java.lang.Object newValue)
Checks if the combination of the element and the newValue give a wellformed
result |
void |
setUserMessageKey(java.lang.String key)
sets the message key. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractWellformednessRule
public AbstractWellformednessRule(java.lang.String key)
AbstractWellformednessRule
public AbstractWellformednessRule()
isWellformed
public abstract boolean isWellformed(ru.novosoft.uml.MBase element,
java.lang.Object newValue)
- Checks if the combination of the element and the newValue give a wellformed
result
getUserMessage
public java.lang.String getUserMessage()
- Returns the localized user message
setUserMessageKey
public void setUserMessageKey(java.lang.String key)
- sets the message key. The message key here is of the form elementname.propertytocheck
Example:
Say you want to check the namespace of an association. The key will be here
association.namespace
Keys are looked up in UMLResourceBundle for the time being. Keys start with
wellformednessrule. over there. This is added to the key entered here.