Class AbstractComponentDescriptor
java.lang.Object
com.zfabrik.components.provider.util.AbstractComponentDescriptor
- All Implemented Interfaces:
IComponentDescriptor,Serializable
- Direct Known Subclasses:
FSCRDBComponent
public abstract class AbstractComponentDescriptor
extends Object
implements IComponentDescriptor, Serializable
Abstract implementation of a component descriptor. Useful in component repository implementations
This implementation supports the switch board development mode feature. That is, in development mode,
component properties may be overwritten by system properties following the naming scheme:
< component name >/ < property name > = < new value >
IComponentDescriptorProcessor implementations, such as
the built-in JEXL3 support.- See Also:
-
Field Summary
Fields inherited from interface com.zfabrik.components.IComponentDescriptor
ANY_COMPONENT_TYPE, COMPONENT_ALIAS, COMPONENT_CLZ, COMPONENT_DESCRIPTOR_STYLE_PLAIN, COMPONENT_NAME, COMPONENT_TYPE, DEPENDENCIES, EXTENSION_POINTS, LINK_COMPONENT_TYPE, LINK_TARGET_COMPONENT, REVISION_INFO -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCopy constructor -
Method Summary
Modifier and TypeMethodDescriptionbooleangetName()Gets the name of the component.Get the properties of this component.getProperty(String name) Just a short hand forgetProperties().getProperty(String)Get the raw properties of this component.longGet the revision of the component.getType()Gets the type of the component.inthashCode()static PropertiesThis method uses the to process properties to their target representation using none or some resolvable expression processing facility.static PropertiesprocessProperties(Properties raw, Function<String, IComponentDescriptorProcessor> getProcessor) Processing with custom retrieval of processors.voidvoidsetProperties(Properties properties) voidsetRevision(long revision)
-
Constructor Details
-
AbstractComponentDescriptor
public AbstractComponentDescriptor()Default constructor -
AbstractComponentDescriptor
Copy constructor
-
-
Method Details
-
setProperties
-
getRawProperties
Description copied from interface:IComponentDescriptorGet the raw properties of this component. Note that unlikeIComponentDescriptor.getProperties()the result of this method is data as defined in persistent component configuration-- Specified by:
getRawPropertiesin interfaceIComponentDescriptor
-
setName
-
setRevision
public void setRevision(long revision) -
getName
Description copied from interface:IComponentDescriptorGets the name of the component.- Specified by:
getNamein interfaceIComponentDescriptor
-
getProperties
Description copied from interface:IComponentDescriptorGet the properties of this component. Note that these differ from the original configuration in these may be processed by some expression language evaluator.- Specified by:
getPropertiesin interfaceIComponentDescriptor
-
processProperties
This method uses the to process properties to their target representation using none or some resolvable expression processing facility. -
processProperties
public static Properties processProperties(Properties raw, Function<String, IComponentDescriptorProcessor> getProcessor) Processing with custom retrieval of processors. See alsoIComponentDescriptor. -
getRevision
public long getRevision()Description copied from interface:IComponentDescriptorGet the revision of the component. Minimum revision is zero. Revisions may not necessarily be strictly increasing, as components may be provided by different repositories over time.- Specified by:
getRevisionin interfaceIComponentDescriptor
-
getType
Description copied from interface:IComponentDescriptorGets the type of the component. A short-hand forgetProperty(COMPONENT_TYPE).- Specified by:
getTypein interfaceIComponentDescriptor
-
getProperty
Description copied from interface:IComponentDescriptorJust a short hand forgetProperties().getProperty(String)- Specified by:
getPropertyin interfaceIComponentDescriptor
-
hashCode
public int hashCode() -
equals
-