You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Ben Sommerville (JIRA)" <ji...@apache.org> on 2007/04/05 03:39:32 UTC

[jira] Created: (FILEUPLOAD-133) Refactor use of FileCleaner into plugable strategy to allow overriding.

Refactor use of FileCleaner into plugable strategy to allow overriding.
-----------------------------------------------------------------------

                 Key: FILEUPLOAD-133
                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-133
             Project: Commons FileUpload
          Issue Type: Improvement
    Affects Versions: 1.2
            Reporter: Ben Sommerville
            Priority: Minor


For applications that do not want to use the FileCleaner service it would be very useful to allow this to be overridden.

This could be done by refactoring the use of the FileCleaner into a plugable strategy.
e..g

interface TemporaryFileCleaner {
     void register(FileItem item, File file );
}

The DiskFileItem could have a default implementation of the strategy that invokes FileCleaner.track.  However if required an application could supply a different stategy to the factory for use by all the items.

I'll try to post a patch implementing this in the next couple of days

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Commented: (FILEUPLOAD-133) Refactor use of FileCleaner into plugable strategy to allow overriding.

Posted by "Ben Sommerville (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FILEUPLOAD-133?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502164 ] 

Ben Sommerville commented on FILEUPLOAD-133:
--------------------------------------------

Thanks that covers my need (basically to be able to turn off that service).

Would be nicer if FileCleaningTracker was an interface to allow for difference impls, but that's not really an file upload issue :)

> Refactor use of FileCleaner into plugable strategy to allow overriding.
> -----------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-133
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-133
>             Project: Commons FileUpload
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Ben Sommerville
>            Priority: Minor
>
> For applications that do not want to use the FileCleaner service it would be very useful to allow this to be overridden.
> This could be done by refactoring the use of the FileCleaner into a plugable strategy.
> e..g
> interface TemporaryFileCleaner {
>      void register(FileItem item, File file );
> }
> The DiskFileItem could have a default implementation of the strategy that invokes FileCleaner.track.  However if required an application could supply a different stategy to the factory for use by all the items.
> I'll try to post a patch implementing this in the next couple of days

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


[jira] Resolved: (FILEUPLOAD-133) Refactor use of FileCleaner into plugable strategy to allow overriding.

Posted by "Jochen Wiedmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FILEUPLOAD-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jochen Wiedmann resolved FILEUPLOAD-133.
----------------------------------------

    Resolution: Fixed

The existing implementation already allows to set the FileCleaningTracker to null, in which case your requirements are met. I'll document the possibility, though.


> Refactor use of FileCleaner into plugable strategy to allow overriding.
> -----------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-133
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-133
>             Project: Commons FileUpload
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Ben Sommerville
>            Priority: Minor
>
> For applications that do not want to use the FileCleaner service it would be very useful to allow this to be overridden.
> This could be done by refactoring the use of the FileCleaner into a plugable strategy.
> e..g
> interface TemporaryFileCleaner {
>      void register(FileItem item, File file );
> }
> The DiskFileItem could have a default implementation of the strategy that invokes FileCleaner.track.  However if required an application could supply a different stategy to the factory for use by all the items.
> I'll try to post a patch implementing this in the next couple of days

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org