Package ddf.catalog.data
Interface AttributeInjector
public interface AttributeInjector
Manages
InjectableAttribute services and injects the appropriate AttributeDescriptors into MetacardTypes and into Metacards.
This code is experimental. While this interface is functional and tested, it may change or be removed in a future version of the library.
-
Method Summary
Modifier and TypeMethodDescriptioninjectAttributes(Metacard original) 'Injects'AttributeDescriptors (represented by 'global'InjectableAttributes andInjectableAttributes specific tooriginal's metacard type) into the givenMetacardby returning a newMetacardwith the same data asoriginalbut with a newMetacardTypecontaining the additional injectedAttributeDescriptors.injectAttributes(MetacardType original) 'Injects'AttributeDescriptors (represented by 'global'InjectableAttributes andInjectableAttributes specific tooriginal) into the givenMetacardTypeby returning a newMetacardTypewith the same name asoriginaland containing the additional injectedAttributeDescriptors.
-
Method Details
-
injectAttributes
'Injects'AttributeDescriptors (represented by 'global'InjectableAttributes andInjectableAttributes specific tooriginal) into the givenMetacardTypeby returning a newMetacardTypewith the same name asoriginaland containing the additional injectedAttributeDescriptors.If there are no attributes to inject for the given
MetacardType,originalis returned.- Parameters:
original- the originalMetacardType, cannot be null- Returns:
- a new
MetacardTypewith the same name asoriginaland containing the additional injectedAttributeDescriptors, ororiginalif there are no attributes to inject - Throws:
IllegalArgumentException- iforiginalis null
-
injectAttributes
'Injects'AttributeDescriptors (represented by 'global'InjectableAttributes andInjectableAttributes specific tooriginal's metacard type) into the givenMetacardby returning a newMetacardwith the same data asoriginalbut with a newMetacardTypecontaining the additional injectedAttributeDescriptors.If there are no attributes to inject for the given
Metacard's metacard type,originalis returned.- Parameters:
original- the originalMetacard, cannot be null- Returns:
- a new
Metacardcontaining the same data asoriginalbut with a newMetacardTypecontaining the additional injectedAttributeDescriptors, ororiginalif there are no attributes to inject - Throws:
IllegalArgumentException- iforiginalis null
-