|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.validation.service.AbstractConstraintDescriptor
public abstract class AbstractConstraintDescriptor
A partial implementation of the IConstraintDescriptor
interface
that is useful for subclassing.
This class may be extended by constraint providers.
Constructor Summary | |
---|---|
protected |
AbstractConstraintDescriptor()
Default initialization. |
Method Summary | |
---|---|
void |
addCategory(Category category)
Adds a category to me. |
boolean |
equals(Object other)
Equality is defined by equality of ID s. |
Set<Category> |
getCategories()
Queries the categories that I am a member of. |
IConstraintDescriptor |
getDescriptor()
|
Throwable |
getException()
If I am an error constraint, obtains the exception
that caused me not to be initialized. |
int |
hashCode()
|
boolean |
isBatch()
Queries whether I may be applied in "batch" mode, i.e., outside of any particular editing action context. |
boolean |
isEnabled()
Queries whether the constraint is enabled. |
boolean |
isError()
Queries whether the constraint is errored, i.e., not executable because of some error in initializing it. |
boolean |
isLive()
Queries whether I may be applied in "live" mode, i.e., within some particular editing action context. |
void |
removeCategory(Category category)
Removes a category from me. |
void |
setEnabled(boolean enabled)
Sets whether the constraint is enabled. |
void |
setError(Throwable exception)
Sets my error status. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.emf.validation.service.IConstraintDescriptor |
---|
getBody, getDescription, getEvaluationMode, getId, getMessagePattern, getName, getPluginId, getSeverity, getStatusCode, targetsEvent, targetsTypeOf |
Constructor Detail |
---|
protected AbstractConstraintDescriptor()
Method Detail |
---|
public final boolean isError()
IConstraintDescriptor
isError
in interface IConstraintDescriptor
public final Throwable getException()
IConstraintDescriptor
error
constraint, obtains the exception
that caused me not to be initialized.
getException
in interface IConstraintDescriptor
public final void setError(Throwable exception)
IConstraintDescriptor
Sets my error status.
This method should not be called outside of the validation framework.
setError
in interface IConstraintDescriptor
exception
- the exception that causes me to be an error constraintpublic final boolean isEnabled()
IConstraintDescriptor
Errored
constraints are never enabled; other constraints may be disabled
by the user.
isEnabled
in interface IConstraintDescriptor
public final void setEnabled(boolean enabled)
IConstraintDescriptor
errored
and are
not in a mandatory
category.
setEnabled
in interface IConstraintDescriptor
enabled
- whether the constraint that I represent is enabledIConstraintDescriptor.isEnabled()
public Set<Category> getCategories()
IConstraintDescriptor
getCategories
in interface IConstraintDescriptor
Category
spublic void addCategory(Category category)
IConstraintDescriptor
addCategory
in interface IConstraintDescriptor
category
- my categorypublic void removeCategory(Category category)
IConstraintDescriptor
removeCategory
in interface IConstraintDescriptor
category
- a categorypublic boolean isBatch()
IConstraintDescriptor
isBatch
in interface IConstraintDescriptor
true
if I support "batch" (contextless)
invocation; false
, otherwiseIConstraintDescriptor.getEvaluationMode()
public boolean isLive()
IConstraintDescriptor
isLive
in interface IConstraintDescriptor
true
if I support "live" (contextful) invocation;
false
, otherwiseIConstraintDescriptor.getEvaluationMode()
public final IConstraintDescriptor getDescriptor()
public int hashCode()
hashCode
in class Object
public boolean equals(Object other)
ID
s.
equals
in class Object
IConstraintDescriptor.getId()
public String toString()
toString
in class Object
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |