Class DefaultFolderArtifactCreator

  • All Implemented Interfaces:
    IArtifactCreator

    public class DefaultFolderArtifactCreator
    extends java.lang.Object
    implements IArtifactCreator
    Defines the default folder creator.
    Author:
    Holger Eichelberger
    • Constructor Detail

      • DefaultFolderArtifactCreator

        public DefaultFolderArtifactCreator()
    • Method Detail

      • handlesArtifact

        public boolean handlesArtifact​(java.lang.Class<? extends IArtifact> kind,
                                       java.lang.Object real)
        Description copied from interface: IArtifactCreator
        Returns whether this creator handles this type of artifact.
        Specified by:
        handlesArtifact in interface IArtifactCreator
        Parameters:
        kind - the kind of artifact in terms of a class (typically the top-level interfaces)
        real - the real world object
        Returns:
        true if it can handle the artifact, false else
      • createArtifactInstance

        public FolderArtifact createArtifactInstance​(java.lang.Object real,
                                                     ArtifactModel model)
                                              throws VilException
        Description copied from interface: IArtifactCreator
        Returns the artifact instance for real.
        Specified by:
        createArtifactInstance in interface IArtifactCreator
        Parameters:
        real - the real world object
        model - the artifact model to create the artifact within
        Returns:
        the instance or null if real cannot be handled
        Throws:
        VilException - in case that any instance creation problem occurs
      • configure

        public void configure​(java.util.Properties properties,
                              java.util.List<Message> messages)
        Description copied from interface: IArtifactCreator
        Configures its own reaction according to a set of properties. Each artifact creator may look for a property with its own single name and read a comma separated list of regular file path patterns for its configuration. If empty, the artifact creator shall be disabled. If IArtifactCreator.DEFAULT_PATTERN is contained, then the default implementation shall be called, otherwise only the configured entries shall be considered. A creator shall not modify the given properties (exceptions may apply).
        Specified by:
        configure in interface IArtifactCreator
        Parameters:
        properties - the properties to configure on
        messages - configuration messages (to be modified as a side effect)