Class DestinationPathManager

    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void addPath​(Path newPath)
      addPath
      Path getPath​(java.lang.String pathName)
      getPath
      java.util.Map<java.lang.String,​Path> getPaths()
      getPaths
      java.util.Collection<java.lang.String> getTargetCommands​(Path path, int index, java.lang.String target)
      getTargetCommands
      Target[] getTargetList​(int index, Path path)
      getTargetList
      protected void parseXML​(java.io.InputStream stream)
      parseXML
      boolean pathHasTarget​(Path path, java.lang.String target)
      pathHasTarget
      void removePath​(java.lang.String name)
      Removes a Path form the xml file based on its name
      void removePath​(Path path)
      Removes a Path from the xml file.
      void replacePath​(java.lang.String oldName, Path newPath)
      replacePath
      void saveCurrent()
      saveCurrent
      protected abstract void saveXML​(java.lang.String writerString)
      saveXML
      abstract void update()
      update
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DestinationPathManager

        public DestinationPathManager()
    • Method Detail

      • parseXML

        protected void parseXML​(java.io.InputStream stream)
                         throws java.io.IOException

        parseXML

        Parameters:
        stream - a InputStream object.
        Throws:
        java.io.IOException
      • getPath

        public Path getPath​(java.lang.String pathName)
                     throws java.io.IOException

        getPath

        Parameters:
        pathName - a String object.
        Returns:
        a Path object.
        Throws:
        java.io.IOException - if any.
      • getPaths

        public java.util.Map<java.lang.String,​Path> getPaths()
                                                            throws java.io.IOException

        getPaths

        Returns:
        a Map object.
        Throws:
        java.io.IOException - if any.
      • getTargetCommands

        public java.util.Collection<java.lang.String> getTargetCommands​(Path path,
                                                                        int index,
                                                                        java.lang.String target)
                                                                 throws java.io.IOException

        getTargetCommands

        Parameters:
        path - a Path object.
        index - a int.
        target - a String object.
        Returns:
        a Collection object.
        Throws:
        java.io.IOException - if any.
      • getTargetList

        public Target[] getTargetList​(int index,
                                      Path path)
                               throws java.io.IOException

        getTargetList

        Parameters:
        index - a int.
        path - a Path object.
        Returns:
        an array of Target objects.
        Throws:
        java.io.IOException - if any.
      • pathHasTarget

        public boolean pathHasTarget​(Path path,
                                     java.lang.String target)
                              throws java.io.IOException

        pathHasTarget

        Parameters:
        path - a Path object.
        target - a String object.
        Returns:
        a boolean.
        Throws:
        java.io.IOException - if any.
      • addPath

        public void addPath​(Path newPath)
                     throws java.io.IOException

        addPath

        Parameters:
        newPath - a Path object.
        Throws:
        java.io.IOException - if any.
      • replacePath

        public void replacePath​(java.lang.String oldName,
                                Path newPath)
                         throws java.io.IOException

        replacePath

        Parameters:
        oldName - a String object.
        newPath - a Path object.
        Throws:
        java.io.IOException - if any.
      • removePath

        public void removePath​(Path path)
                        throws java.io.IOException
        Removes a Path from the xml file.
        Parameters:
        path - the path to remove
        Throws:
        java.io.IOException
        java.io.IOException - if any.
      • removePath

        public void removePath​(java.lang.String name)
                        throws java.io.IOException
        Removes a Path form the xml file based on its name
        Parameters:
        name - the name of the path to remove
        Throws:
        java.io.IOException
        java.io.IOException - if any.
      • saveCurrent

        public void saveCurrent()
                         throws java.io.IOException

        saveCurrent

        Throws:
        java.io.IOException - if any.
      • saveXML

        protected abstract void saveXML​(java.lang.String writerString)
                                 throws java.io.IOException

        saveXML

        Parameters:
        writerString - a String object.
        Throws:
        java.io.IOException - if any.
      • update

        public abstract void update()
                             throws java.io.IOException,
                                    java.io.FileNotFoundException

        update

        Throws:
        java.io.IOException - if any.
        java.io.FileNotFoundException - if any.