Class FlowViewStateManager

    • Constructor Detail

      • FlowViewStateManager

        protected FlowViewStateManager()
        Default constructor.
    • Method Detail

      • add

        public void add​(File file,
                        com.github.fracpete.javautils.struct.Struct2<List<String>,​List<String>> state)
        Adds a view state to the cache.
        Parameters:
        file - the file of the flow
        state - the associated state
      • add

        public void add​(String filename,
                        com.github.fracpete.javautils.struct.Struct2<List<String>,​List<String>> state)
        Adds a view state to the cache.
        Parameters:
        filename - the file name of the flow
        state - the associated state
      • has

        public boolean has​(File file)
        Checks whether a state is available for the flow.
        Parameters:
        file - the file of the flow
        Returns:
        true if state available
      • has

        public boolean has​(String filename)
        Checks whether a state is available for the flow.
        Parameters:
        filename - the file name of the flow
        Returns:
        true if state available
      • get

        public com.github.fracpete.javautils.struct.Struct2<List<String>,​List<String>> get​(File file)
        Returns the state for the flow.
        Parameters:
        file - the file of the flow
        Returns:
        the state, null if none available
      • get

        public com.github.fracpete.javautils.struct.Struct2<List<String>,​List<String>> get​(String filename)
        Returns the state for the flow.
        Parameters:
        filename - the file name of the flow
        Returns:
        the state, null if none available
      • load

        protected void load()
        Loads the cache from disk.
      • save

        protected void save()
        Saves the cache to disk.
      • getSingleton

        public static FlowViewStateManager getSingleton()
        Returns the singleton of the manager.
        Returns:
        the singleton
      • getProperties

        public static Properties getProperties()
        Returns the properties that define the manager.
        Returns:
        the properties