Class FolderSeriesFactory

  • All Implemented Interfaces:
    com.inet.plugin.NamedExtension

    public class FolderSeriesFactory
    extends SeriesFactory<com.inet.taskplanner.server.api.series.folder.FolderSeries>
    A series factory for managing the FolderSeries settings and instances.
    • Field Detail

      • FOLDER

        public static final java.lang.String FOLDER
        This property defines the path (or supported URI like "repo") to a folder.
        See Also:
        Constant Field Values
      • FILTER

        public static final java.lang.String FILTER
        Defines the file filter like *.pdf to filter the files that should be used in this series.
        See Also:
        Constant Field Values
    • Constructor Detail

      • FolderSeriesFactory

        public FolderSeriesFactory()
        Create a new instance.
        Since:
        taskplanner 3.0
    • Method Detail

      • getInformation

        public SeriesInfo getInformation​(com.inet.id.GUID taskID)
        Returns an information object about components which can be produced with this factory.

        The returned info contains information about how such a component is to be presented in the taskPlanner GUI. This are display-infos or available options to configure. The returned information contains fields which describes the values a user can specify in the WEB GUI. The field is also responsible to replace any placeholders for the corresponding property in a serial task. That means properties without a field definition will not get any series placeholder replaced.

        If you implement a factory for a component only to be used by API, only then you can return null here.

        Specified by:
        getInformation in class AbstractFactory<com.inet.taskplanner.server.api.series.folder.FolderSeries,​SeriesDefinition,​SeriesInfo,​SummaryInfo>
        Parameters:
        taskID - the ID of the task the definition belongs or will belong to, for optional use. Can be null if the operation is done for a non-saved task.
        Returns:
        an information object for components this factory can produce
      • validate

        public void validate​(SeriesDefinition definition,
                             com.inet.id.GUID taskID)
                      throws ValidationException
        Validate the given definition.

        The given definition is guaranteed to belong to this factory

        Specified by:
        validate in class SeriesIndependentFactory<com.inet.taskplanner.server.api.series.folder.FolderSeries,​SeriesDefinition,​SeriesInfo,​SummaryInfo>
        Parameters:
        definition - the definition to validate
        taskID - the ID of the task the definition belongs or will belong to, for optional use. Can be null if the operation is done for a non-saved task.
        Throws:
        ValidationException - if the component has some errors
      • createInstanceFrom

        protected com.inet.taskplanner.server.api.series.folder.FolderSeries createInstanceFrom​(SeriesDefinition definition,
                                                                                                com.inet.id.GUID taskID)
        Construct a component (PRODUCT) from the given definition.
        Overrides:
        createInstanceFrom in class AbstractFactory<com.inet.taskplanner.server.api.series.folder.FolderSeries,​SeriesDefinition,​SeriesInfo,​SummaryInfo>
        Parameters:
        definition - the definition holding information for the PRODUCT
        taskID - the ID of the task the definition belongs or will belong to, for optional use. Can be null if the operation is done for a non-saved task.
        Returns:
        a new PRODUCT
      • getSummary

        public SummaryInfo getSummary​(SeriesDefinition definition)
        Construct Summary infos for the component represented by given definition.

        The summary info is used when the webgui displays the component.

        When implementing a factory for a component only to be used per API, only then you can return null here.

        Specified by:
        getSummary in class AbstractFactory<com.inet.taskplanner.server.api.series.folder.FolderSeries,​SeriesDefinition,​SeriesInfo,​SummaryInfo>
        Parameters:
        definition - the definition with the settings made by a user
        Returns:
        summary infos containing text lines to be displayed in the webgui for this component.
      • getKeys

        public java.util.Set<java.lang.String> getKeys​(SeriesDefinition definition)
        Get a set of keys that can be used in placeholder.
        Overrides:
        getKeys in class SeriesFactory<com.inet.taskplanner.server.api.series.folder.FolderSeries>
        Parameters:
        definition - the definition that described the series
        Returns:
        a key set