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()
IMetadata
public String getDescription()
IMetadata
getDescription
in interface IMetadata<T,U>
public IFieldFactory getFieldFactory()
IMetadata
getFieldFactory
in interface IMetadata<T,U>
public IFactoryInstantiator<?> getCommandFactory()
IMetadata
getCommandFactory
in interface IMetadata<T,U>
public ModelCategory<U> getCategory()
IMetadata
getCategory
in interface IMetadata<T,U>
public ValidationError validate(U model, T value)
IMetadata
Copyright © 2018. All Rights Reserved.