[
https://issues.apache.org/jira/browse/DELTASPIKE-399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13857063#comment-13857063
]
Gerhard Petracek commented on DELTASPIKE-399:
---------------------------------------------
@christian:
the enum-suggestion was before the suggestion with the new attribute.
+ agreed - with such an attribute users don't have to replace the producer for
std. use-cases.
it's more like:
{code}
public interface ResourceStorage {}
public interface Classpath extends ResourceStorage {} //interface or class
public @interface ExternalResource
{
@Nonbinding
String value();
@Nonbinding
Class<? extends ResourceStorage> storage();
}
{code}
with that you can't use other classes accidentally + your ide will suggest what
you can use.
> Incorporate Solder's ResourceLoader features into DeltaSpike
> ------------------------------------------------------------
>
> Key: DELTASPIKE-399
> URL: https://issues.apache.org/jira/browse/DELTASPIKE-399
> Project: DeltaSpike
> Issue Type: New Feature
> Components: Core
> Affects Versions: 0.4
> Reporter: Aaron Siri
> Assignee: John D. Ament
> Priority: Minor
> Fix For: 0.6
>
>
> Seam 3's Solder module had some nice resource loading functionality within
> the org.jboss.solder.resourceLoader packages. With it you could do the
> following:
> // Load a properties file
> @Inject @Resource("app.properties")
> private Properties appProperties;
> or:
> @Inject
> private ResourceProvider resourceProvider
> public Properties getHostProperties() {
> String hostname = java.net.InetAddress.getLocalHost().getHostName();
> return resourceProvider.loadPropertiesBundle(hostname + ".properties");
> }
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)