Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


org.eclipse.emf.validation.service
Class AbstractConstraintDescriptor

java.lang.Object
  extended by 
org.eclipse.emf.validation.service.AbstractConstraintDescriptor
All Implemented Interfaces:
IConstraintDescriptor
Direct Known Subclasses:
AbstractXmlConstraintDescriptor

public abstract class AbstractConstraintDescriptor
extends Object
implements IConstraintDescriptor

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 IDs.
  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

AbstractConstraintDescriptor

protected AbstractConstraintDescriptor()
Default initialization.

Method Detail

isError

public final boolean isError()
Description copied from interface: IConstraintDescriptor
Queries whether the constraint is errored, i.e., not executable because of some error in initializing it.

Specified by:
isError in interface IConstraintDescriptor
Returns:
whether I represent an errored constraint

getException

public final 
Throwable getException()
Description copied from interface: IConstraintDescriptor
If I am an error constraint, obtains the exception that caused me not to be initialized.

Specified by:
getException in interface IConstraintDescriptor
Returns:
my exception

setError

public final void setError(
Throwable exception)
Description copied from interface: IConstraintDescriptor

Sets my error status.

This method should not be called outside of the validation framework.

Specified by:
setError in interface IConstraintDescriptor
Parameters:
exception - the exception that causes me to be an error constraint

isEnabled

public final boolean isEnabled()
Description copied from interface: IConstraintDescriptor
Queries whether the constraint is enabled. Errored constraints are never enabled; other constraints may be disabled by the user.

Specified by:
isEnabled in interface IConstraintDescriptor
Returns:
whether the constraint that I represent is enabled

setEnabled

public final void setEnabled(boolean enabled)
Description copied from interface: IConstraintDescriptor
Sets whether the constraint is enabled. Note that this only has any effect on constraints that are not errored and are not in a mandatory category.

Specified by:
setEnabled in interface IConstraintDescriptor
Parameters:
enabled - whether the constraint that I represent is enabled
See Also:
IConstraintDescriptor.isEnabled()

getCategories

public 
Set<
Category> getCategories()
Description copied from interface: IConstraintDescriptor
Queries the categories that I am a member of.

Specified by:
getCategories in interface IConstraintDescriptor
Returns:
an unmodifiable set of Categorys

addCategory

public void addCategory(
Category category)
Description copied from interface: IConstraintDescriptor
Adds a category to me. If, previously, I was in the default category, then I will no longer be in the default category when this method returns.

Specified by:
addCategory in interface IConstraintDescriptor
Parameters:
category - my category

removeCategory

public void removeCategory(
Category category)
Description copied from interface: IConstraintDescriptor
Removes a category from me.

Specified by:
removeCategory in interface IConstraintDescriptor
Parameters:
category - a category

isBatch

public boolean isBatch()
Description copied from interface: IConstraintDescriptor
Queries whether I may be applied in "batch" mode, i.e., outside of any particular editing action context.

Specified by:
isBatch in interface IConstraintDescriptor
Returns:
true if I support "batch" (contextless) invocation; false, otherwise
See Also:
IConstraintDescriptor.getEvaluationMode()

isLive

public boolean isLive()
Description copied from interface: IConstraintDescriptor
Queries whether I may be applied in "live" mode, i.e., within some particular editing action context.

Specified by:
isLive in interface IConstraintDescriptor
Returns:
true if I support "live" (contextful) invocation; false, otherwise
See Also:
IConstraintDescriptor.getEvaluationMode()

getDescriptor

public final 
IConstraintDescriptor getDescriptor()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(
Object other)
Equality is defined by equality of IDs.

Overrides:
equals in class Object
See Also:
IConstraintDescriptor.getId()

toString

public 
String toString()
Overrides:
toString in class Object

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire