Class Validator
- java.lang.Object
-
- org.neotropic.kuwaiba.core.apis.persistence.application.Validator
-
public class Validator extends Object
Validators are flags indicating things about objects. Of course, every instance may have something to expose or not. For instance, a port has an indicator to mark it as "connected physically", but a Building (so far) has nothing to "indicate". This is done in order to avoid a second call to query for a particular information that could affect the performance. I.e: Call 1: getPort (retrieving a LocalObjectLight)
Call 2: isThisPortConnected (retrieving a boolean according to a condition)
With this method there's only one call getPort (a LocalObjectLight with a flag to indicate that the port is connected)
Why not use getPort retrieving a LocalObject? Well, because the condition might be complicated, and it's easier to compute its value at server side. Besides, it can involve complex queries that would require more calls to the web service- Author:
- Charles Edward Bedon Cortazar <charles.bedon@kuwaiba.org>
-
-
Field Summary
Fields Modifier and Type Field Description static String
PROPERTY_COLOR
One of the built-in properties indicating the color that should be used to render the display name (it is recommended to be the text color, but it depends on the renderer) of the object related to this validator.static String
PROPERTY_FILLCOLOR
One of the built-in properties indicating the color that should be used to render the display name (it is recommended to be the background color, but it depends on the renderer) of the object related to this validator.static String
PROPERTY_PREFIX
One of the built-in properties indicating the text that should be prepended to the display name of the object related to this validator.static String
PROPERTY_SUFFIX
One of the built-in properties indicating the text that should be appended to the display name of the object related to this validator.
-
Constructor Summary
Constructors Constructor Description Validator(String name, Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getName()
Properties
getProperties()
void
setName(String name)
void
setProperties(Properties properties)
-
-
-
Field Detail
-
PROPERTY_COLOR
public static final String PROPERTY_COLOR
One of the built-in properties indicating the color that should be used to render the display name (it is recommended to be the text color, but it depends on the renderer) of the object related to this validator.- See Also:
- Constant Field Values
-
PROPERTY_FILLCOLOR
public static final String PROPERTY_FILLCOLOR
One of the built-in properties indicating the color that should be used to render the display name (it is recommended to be the background color, but it depends on the renderer) of the object related to this validator.- See Also:
- Constant Field Values
-
PROPERTY_PREFIX
public static final String PROPERTY_PREFIX
One of the built-in properties indicating the text that should be prepended to the display name of the object related to this validator.- See Also:
- Constant Field Values
-
PROPERTY_SUFFIX
public static final String PROPERTY_SUFFIX
One of the built-in properties indicating the text that should be appended to the display name of the object related to this validator.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Validator
public Validator(String name, Properties properties)
-
-
Method Detail
-
getName
public String getName()
-
setName
public void setName(String name)
-
getProperties
public Properties getProperties()
-
setProperties
public void setProperties(Properties properties)
-
-