public class ScriptGraph extends Object
| Constructor and Description |
|---|
ScriptGraph() |
| Modifier and Type | Method and Description |
|---|---|
ScriptResource |
addResource(ResourceId id) |
ScriptResource |
addResource(ResourceId id,
FetchMode fetchMode) |
ScriptResource |
addResource(ResourceId id,
FetchMode fetchMode,
String alias,
String groupName,
String contextPath)
Add a resource to the graph if available.
|
ScriptGroup |
getLoadGroup(String groupName) |
ScriptResource |
getResource(ResourceId id) |
ScriptResource |
getResource(ResourceScope scope,
String name) |
Collection<ScriptResource> |
getResources(ResourceScope scope) |
ScriptResource |
removeResource(ResourceId id) |
ScriptResource |
removeResource(ResourceId id,
String contextPath) |
Map<ScriptResource,FetchMode> |
resolve(Map<ResourceId,FetchMode> pairs) |
public Map<ScriptResource,FetchMode> resolve(Map<ResourceId,FetchMode> pairs)
Resolve a collection of pair of resource id and fetch mode, each entry of the map will be processed in the order specified by the iteration of the
Map.entrySet(). For a given pair the fetch mode may be null or not.
When the fetch mode is null, the default fetch mode of the resource is used. When the fetch mode is not null, this fetch
mode may override the resource fetch mode if it implies this particular fetch mode. This algorithm tolerates the absence
of resources, for instance if a resource is specified (among the pairs or by a transitive dependency) and does not exist,
the resource will be skipped.pairs - the pairs to resolvepublic ScriptResource getResource(ResourceId id)
public ScriptResource getResource(ResourceScope scope, String name)
public Collection<ScriptResource> getResources(ResourceScope scope)
public ScriptResource addResource(ResourceId id)
public ScriptResource addResource(ResourceId id, FetchMode fetchMode) throws NullPointerException
NullPointerExceptionpublic ScriptResource addResource(ResourceId id, FetchMode fetchMode, String alias, String groupName, String contextPath) throws NullPointerException
id - the resource idfetchMode - the resource fetch modealias - default aliasNullPointerException - if id or fetchMode is nullpublic ScriptResource removeResource(ResourceId id)
public ScriptResource removeResource(ResourceId id, String contextPath)
public ScriptGroup getLoadGroup(String groupName)
Copyright © 2016 JBoss by Red Hat. All Rights Reserved.