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 TypeMethodDescriptionboolean
getName()
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.long
Get the revision of the component.getType()
Gets the type of the component.int
hashCode()
static Properties
This method uses the to process properties to their target representation using none or some resolvable expression processing facility.static Properties
processProperties
(Properties raw, Function<String, IComponentDescriptorProcessor> getProcessor) Processing with custom retrieval of processors.void
void
setProperties
(Properties properties) void
setRevision
(long revision)
-
Constructor Details
-
AbstractComponentDescriptor
public AbstractComponentDescriptor()Default constructor -
AbstractComponentDescriptor
Copy constructor
-
-
Method Details
-
setProperties
-
getRawProperties
Description copied from interface:IComponentDescriptor
Get 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:
getRawProperties
in interfaceIComponentDescriptor
-
setName
-
setRevision
public void setRevision(long revision) -
getName
Description copied from interface:IComponentDescriptor
Gets the name of the component.- Specified by:
getName
in interfaceIComponentDescriptor
-
getProperties
Description copied from interface:IComponentDescriptor
Get 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:
getProperties
in 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:IComponentDescriptor
Get 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:
getRevision
in interfaceIComponentDescriptor
-
getType
Description copied from interface:IComponentDescriptor
Gets the type of the component. A short-hand forgetProperty(COMPONENT_TYPE)
.- Specified by:
getType
in interfaceIComponentDescriptor
-
getProperty
Description copied from interface:IComponentDescriptor
Just a short hand forgetProperties().getProperty(String)
- Specified by:
getProperty
in interfaceIComponentDescriptor
-
hashCode
public int hashCode() -
equals
-