T - The metadata typeU - The javascript type which provides the property or objectpublic abstract class MetadataBase<T,U> extends Object implements IMetadata<T,U>
| Modifier and Type | Field and Description |
|---|---|
protected ModelCategory<U> |
category |
protected String |
description |
protected IFactoryInstantiator<?> |
factory |
protected IFieldFactory |
fieldFactory |
protected String |
propertyName |
protected IValidator<T,U> |
validator |
| Constructor and Description |
|---|
MetadataBase(String propertyName,
String description,
IFieldFactory fieldFactory,
IFactoryInstantiator<?> factory,
IValidator<T,U> validator) |
| Modifier and Type | Method and Description |
|---|---|
ModelCategory<U> |
getCategory()
Returns the model category this metadata belongs to
|
IFactoryInstantiator<?> |
getCommandFactory()
Returns the instantiator for the factory which will record modifications
to this metadata
|
String |
getDescription()
Returns a human readable description of this
property.
|
IFieldFactory |
getFieldFactory()
Returns the field factory of this property.
|
String |
getName()
Returns the identifier of this property.
|
ValidationError |
validate(U model,
T value)
Validates the specified metadata.
|
protected String propertyName
protected String description
protected IFieldFactory fieldFactory
protected ModelCategory<U> category
protected IFactoryInstantiator<?> factory
protected IValidator<T,U> validator
public MetadataBase(String propertyName, String description, IFieldFactory fieldFactory, IFactoryInstantiator<?> factory, IValidator<T,U> validator)
public String getName()
IMetadatapublic String getDescription()
IMetadatagetDescription in interface IMetadata<T,U>public IFieldFactory getFieldFactory()
IMetadatagetFieldFactory in interface IMetadata<T,U>public IFactoryInstantiator<?> getCommandFactory()
IMetadatagetCommandFactory in interface IMetadata<T,U>public ModelCategory<U> getCategory()
IMetadatagetCategory in interface IMetadata<T,U>public ValidationError validate(U model, T value)
IMetadataCopyright © 2018. All Rights Reserved.