You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Kalin Krustev (JIRA)" <de...@tapestry.apache.org> on 2007/11/20 17:32:43 UTC
[jira] Created: (TAPESTRY-1924) Allow for templates coming from
stream
Allow for templates coming from stream
--------------------------------------
Key: TAPESTRY-1924
URL: https://issues.apache.org/jira/browse/TAPESTRY-1924
Project: Tapestry
Issue Type: Improvement
Components: tapestry-core, tapestry-ioc
Affects Versions: 5.0.6
Reporter: Kalin Krustev
In the current version Tapestry parses templates coming from java.net.URL. If the template is not in the filesystem (for example coming from database), it is more easier to implement this if Tapestry can parse the template coming from stream.
My suggestion is to extend the org.apache.tapestry.ioc.Resource interface with one more method:
InputStream toStream();
which will be called insted of calling toURL().openStream() when parsing the template.
If this interface is extended in this way, Tapestry should expect org.apache.tapestry.ioc.Resource.toURL() to return null even when the resource exists(but does not have an URL).
--
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Closed: (TAPESTRY-1924) Allow for templates coming from
stream
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship closed TAPESTRY-1924.
------------------------------------------
Resolution: Fixed
Fix Version/s: 5.0.12
Added two methods to Resource: exists() and openStream().
Resources that can open a stream but not provide a URL should work fine throughout the framework. The built-in implementations of Resource base exists() and openStream() on toURL(), but other implementations of Resource may work quite differently.
> Allow for templates coming from stream
> --------------------------------------
>
> Key: TAPESTRY-1924
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1924
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core, tapestry-ioc
> Affects Versions: 5.0.6
> Reporter: Kalin Krustev
> Assignee: Howard M. Lewis Ship
> Fix For: 5.0.12
>
>
> In the current version Tapestry parses templates coming from java.net.URL. If the template is not in the filesystem (for example coming from database), it is more easier to implement this if Tapestry can parse the template coming from stream.
> My suggestion is to extend the org.apache.tapestry.ioc.Resource interface with one more method:
> InputStream toStream();
> which will be called insted of calling toURL().openStream() when parsing the template.
> If this interface is extended in this way, Tapestry should expect org.apache.tapestry.ioc.Resource.toURL() to return null even when the resource exists(but does not have an URL).
--
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1924) Allow for templates coming from
stream
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571787#action_12571787 ]
Howard M. Lewis Ship commented on TAPESTRY-1924:
------------------------------------------------
Probably should add an exists() method to determine whether the file exists, rather than trusting toURL() or toStream() to return non-null. Those methods can then change to return a non-null object or throw an exception. Possibly toURL() will not be needed.
> Allow for templates coming from stream
> --------------------------------------
>
> Key: TAPESTRY-1924
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1924
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core, tapestry-ioc
> Affects Versions: 5.0.6
> Reporter: Kalin Krustev
>
> In the current version Tapestry parses templates coming from java.net.URL. If the template is not in the filesystem (for example coming from database), it is more easier to implement this if Tapestry can parse the template coming from stream.
> My suggestion is to extend the org.apache.tapestry.ioc.Resource interface with one more method:
> InputStream toStream();
> which will be called insted of calling toURL().openStream() when parsing the template.
> If this interface is extended in this way, Tapestry should expect org.apache.tapestry.ioc.Resource.toURL() to return null even when the resource exists(but does not have an URL).
--
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Commented: (TAPESTRY-1924) Allow for templates coming from
stream
Posted by "Kalin Krustev (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12572083#action_12572083 ]
Kalin Krustev commented on TAPESTRY-1924:
-----------------------------------------
Yes, throwing an exception also seems good and removing toURL from org.apache.tapestry.ioc.Resource is also going to make interface simpler. But when I looked the source it seemed simpler to keep toURL. Howard, it's your decision if it will be kept, my issue was for supporting resources coming from stream.
> Allow for templates coming from stream
> --------------------------------------
>
> Key: TAPESTRY-1924
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1924
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core, tapestry-ioc
> Affects Versions: 5.0.6
> Reporter: Kalin Krustev
>
> In the current version Tapestry parses templates coming from java.net.URL. If the template is not in the filesystem (for example coming from database), it is more easier to implement this if Tapestry can parse the template coming from stream.
> My suggestion is to extend the org.apache.tapestry.ioc.Resource interface with one more method:
> InputStream toStream();
> which will be called insted of calling toURL().openStream() when parsing the template.
> If this interface is extended in this way, Tapestry should expect org.apache.tapestry.ioc.Resource.toURL() to return null even when the resource exists(but does not have an URL).
--
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org
[jira] Assigned: (TAPESTRY-1924) Allow for templates coming from
stream
Posted by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org>.
[ https://issues.apache.org/jira/browse/TAPESTRY-1924?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Howard M. Lewis Ship reassigned TAPESTRY-1924:
----------------------------------------------
Assignee: Howard M. Lewis Ship
> Allow for templates coming from stream
> --------------------------------------
>
> Key: TAPESTRY-1924
> URL: https://issues.apache.org/jira/browse/TAPESTRY-1924
> Project: Tapestry
> Issue Type: Improvement
> Components: tapestry-core, tapestry-ioc
> Affects Versions: 5.0.6
> Reporter: Kalin Krustev
> Assignee: Howard M. Lewis Ship
>
> In the current version Tapestry parses templates coming from java.net.URL. If the template is not in the filesystem (for example coming from database), it is more easier to implement this if Tapestry can parse the template coming from stream.
> My suggestion is to extend the org.apache.tapestry.ioc.Resource interface with one more method:
> InputStream toStream();
> which will be called insted of calling toURL().openStream() when parsing the template.
> If this interface is extended in this way, Tapestry should expect org.apache.tapestry.ioc.Resource.toURL() to return null even when the resource exists(but does not have an URL).
--
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org