Return-Path: Delivered-To: apmail-tapestry-dev-archive@www.apache.org Received: (qmail 23043 invoked from network); 12 Apr 2009 17:40:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 Apr 2009 17:40:36 -0000 Received: (qmail 51067 invoked by uid 500); 12 Apr 2009 17:40:35 -0000 Delivered-To: apmail-tapestry-dev-archive@tapestry.apache.org Received: (qmail 50970 invoked by uid 500); 12 Apr 2009 17:40:35 -0000 Mailing-List: contact commits-help@tapestry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@tapestry.apache.org Delivered-To: mailing list commits@tapestry.apache.org Received: (qmail 50960 invoked by uid 99); 12 Apr 2009 17:40:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Apr 2009 17:40:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Apr 2009 17:40:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D644E234C003 for ; Sun, 12 Apr 2009 10:40:14 -0700 (PDT) Message-ID: <763040508.1239558014862.JavaMail.jira@brutus> Date: Sun, 12 Apr 2009 10:40:14 -0700 (PDT) From: "manuel aldana (JIRA)" To: commits@tapestry.apache.org Subject: [jira] Commented: (TAP5-423) Implement a file-system Asset type MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/TAP5-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12698246#action_12698246 ] manuel aldana commented on TAP5-423: ------------------------------------ Using filesystem asset designed as follows, filesystem as new asset type (filesystem:). The asset type is followed by a symbol which is an alias of a filesystem path. This symbol is supposed to be declared inside the AppModule. The limit of filesystem symbols is unbounded. ------------------------ EXAMPLE: INCLUSION OF ASSET IN PAGE (example): @Property @Inject @Path("filesystem:/images/test.txt") private Asset fileAsset; DEFINITION OF FILESYSTEM SYMBOL in AppModule: public class AppModule { ... //filesystem asset alias manager keeps the mappings of symbol to filesystem root public static void contributeFilesystemAssetAliasManager(MappedConfiguration configuration) { configuration.add("images", "file:/d:/srv/imgRoot/"); } ... } END EXAMPLE -------------------------------- In the end such a filesystem asset would receive following link: http:///assets/fs/images/test.txt I develop on windows, please test this on *nix systems also (I checked most of OS filesystem portability problems inside code but could not test it yet). Some things I would like to discuss are: -Application version (random number which changes after each restart) as in context and classpath asset is not used because the filesystem deployment is not directly connected to the webapp deployment -I have not used resource cache inside the FilesystemAssetFactory in difference to the other assets. Maybe I will add it... > Implement a file-system Asset type > ---------------------------------- > > Key: TAP5-423 > URL: https://issues.apache.org/jira/browse/TAP5-423 > Project: Tapestry 5 > Issue Type: New Feature > Components: tapestry-core > Affects Versions: 5.0.18 > Reporter: manuel aldana > Attachments: filesystem_asset1.0_TAP423.patch > > > currenty it is built in to retrieve assets from classpath and from webcontext. > a file system asset type which can retrieve stuff directly from the filesystem (e.g. from /srv/statics/xxxx) makes also sense. > something like: > *ResourceFileSystem extends AbstractResource* and *FileSystemAssetFactory extends AssetFactory* -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.