Class MigrateAttachments

  • All Implemented Interfaces:
    Cloneable

    public class MigrateAttachments
    extends org.apache.tools.ant.Task
    Migration of attachments based on the new attachment model
    Author:
    Shankar Balachandran
    • 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 delete​(File source)
      Delete the directory and all the sub files recursively.Extended from FileUtility as source directory is not removed in FileUtility.delete method.
      void execute()  
      static void migrateAttachments​(String attachPath)
      Migrates the attachments to new attachment model
      • 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
    • Constructor Detail

      • MigrateAttachments

        public MigrateAttachments()
    • Method Detail

      • execute

        public void execute()
        Overrides:
        execute in class org.apache.tools.ant.Task
      • delete

        public static void delete​(File source)
                           throws Exception
        Delete the directory and all the sub files recursively.Extended from FileUtility as source directory is not removed in FileUtility.delete method.
        Parameters:
        source - Path of the file to be deleted
        Throws:
        Exception
      • migrateAttachments

        public static void migrateAttachments​(String attachPath)
                                       throws Exception
        Migrates the attachments to new attachment model
        Parameters:
        attachPath - The path of the attachments folder specified in Openbravo.properties
        Throws:
        Exception