Class ReplaceDTOResource

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class ReplaceDTOResource
    extends org.apache.tools.ant.Task
    Directory structure improvement for custom dtos/resources within the platformwebservices/web/gensrc extension.
    • Field Summary

      • Fields inherited from class org.apache.tools.ant.Task

        target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        description, location, project
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void copyFile​(java.io.File in, java.io.File out)
      Copy a file.
      static boolean deleteDir​(java.io.File dir)
      Deletes all files and sub-directories under dir.
      void execute()  
      java.lang.String getReplaceResourcePathSegFrom()  
      java.lang.String getReplaceResourcePathSegTo()  
      void setCustomsrc​(org.apache.tools.ant.types.resources.FileResource customsrc)  
      void setDebug​(boolean debug)  
      void setGensrc​(org.apache.tools.ant.types.resources.FileResource gensrc)  
      void setReplaceDtoPathSegFrom​(java.lang.String replaceDtoPathSegFrom)  
      void setReplaceDtoPathSegTo​(java.lang.String replaceDtoPathSegTo)  
      void setReplaceResourcePathSegFrom​(java.lang.String replaceResourcePathSegFrom)  
      void setReplaceResourcePathSegTo​(java.lang.String replaceResourcePathSegTo)  
      • Methods inherited from class org.apache.tools.ant.Task

        bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
      • Methods inherited from class java.lang.Object

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

      • ReplaceDTOResource

        public ReplaceDTOResource()
    • Method Detail

      • execute

        public void execute()
                     throws org.apache.tools.ant.BuildException
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException
      • copyFile

        public static void copyFile​(java.io.File in,
                                    java.io.File out)
                             throws java.io.IOException
        Copy a file.
        Parameters:
        in - source file
        out - destination file
        Throws:
        java.io.IOException
      • deleteDir

        public static boolean deleteDir​(java.io.File dir)
        Deletes all files and sub-directories under dir. false.
        Parameters:
        dir - deletes all files and sub-directories under that directory
        Returns:
        returns true if all deletions were successful. If a deletion fails, the method stops attempting to delete and returns
      • setReplaceResourcePathSegFrom

        public void setReplaceResourcePathSegFrom​(java.lang.String replaceResourcePathSegFrom)
        Parameters:
        replaceResourcePathSegFrom - the replaceResourcePathSegFrom to set
      • getReplaceResourcePathSegFrom

        public java.lang.String getReplaceResourcePathSegFrom()
        Returns:
        the replaceResourcePathSegFrom
      • setReplaceResourcePathSegTo

        public void setReplaceResourcePathSegTo​(java.lang.String replaceResourcePathSegTo)
        Parameters:
        replaceResourcePathSegTo - the replaceResourcePathSegTo to set
      • getReplaceResourcePathSegTo

        public java.lang.String getReplaceResourcePathSegTo()
        Returns:
        the replaceResourcePathSegTo
      • setGensrc

        public void setGensrc​(org.apache.tools.ant.types.resources.FileResource gensrc)
        Parameters:
        gensrc - the gensrc to set
      • setCustomsrc

        public void setCustomsrc​(org.apache.tools.ant.types.resources.FileResource customsrc)
        Parameters:
        customsrc - the customsrc to set
      • setReplaceDtoPathSegFrom

        public void setReplaceDtoPathSegFrom​(java.lang.String replaceDtoPathSegFrom)
        Parameters:
        replaceDtoPathSegFrom - the replaceDtoPathSegFrom to set
      • setReplaceDtoPathSegTo

        public void setReplaceDtoPathSegTo​(java.lang.String replaceDtoPathSegTo)
        Parameters:
        replaceDtoPathSegTo - the replaceDtoPathSegTo to set
      • setDebug

        public void setDebug​(boolean debug)