Class AbstractComponentDescriptor

  • All Implemented Interfaces:
    IComponentDescriptor, java.io.Serializable
    Direct Known Subclasses:
    FSCRDBComponent

    public abstract class AbstractComponentDescriptor
    extends java.lang.Object
    implements IComponentDescriptor, java.io.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 >

    This implementation furthermore supports processing of properties for IComponentDescriptorProcessor implementations, such as the built-in JEXL3 support.
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractComponentDescriptor

        public AbstractComponentDescriptor()
        Default constructor
    • Method Detail

      • setProperties

        public void setProperties​(java.util.Properties properties)
      • setName

        public void setName​(java.lang.String name)
      • setRevision

        public void setRevision​(long revision)
      • getProperties

        public java.util.Properties 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 interface IComponentDescriptor
      • processProperties

        public static java.util.Properties processProperties​(java.util.Properties raw)
        This method uses the to process properties to their target representation using none or some resolvable expression processing facility.
      • processProperties

        public static java.util.Properties processProperties​(java.util.Properties raw,
                                                             java.util.function.Function<java.lang.String,​IComponentDescriptorProcessor> getProcessor)
        Processing with custom retrieval of processors. See also IComponentDescriptor.
      • 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 interface IComponentDescriptor
      • getType

        public java.lang.String getType()
        Description copied from interface: IComponentDescriptor
        Gets the type of the component. A short-hand for getProperty(COMPONENT_TYPE).
        Specified by:
        getType in interface IComponentDescriptor
      • getProperty

        public java.lang.String getProperty​(java.lang.String name)
        Description copied from interface: IComponentDescriptor
        Just a short hand for getProperties().getProperty(String)
        Specified by:
        getProperty in interface IComponentDescriptor
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object