|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Bundle
Bundles are entities responsible for resolving and building Resource
. A bundle can be though of as a package
where several resources that logically form a unit are contained. It is envisages that bundles are typically shipped
as jars with the bundle configuration as part of the jar.
Field Summary | |
---|---|
static Pattern |
BUNDLE_ALLOWED_CHARS
Chars allowed in a bundle name [a-zA-Z0-9_]+. |
Method Summary | |
---|---|
boolean |
checkModified()
Checks whether this bundle is modified by calling checkModified() on the getResourceCollections() . |
BundleConfig |
getConfig()
Returns the config that this bundle was built from. |
JSLintWrapper |
getJsLinter()
Returns the configured JSLint instance for the bundle. |
long |
getLastModified()
Returns the last modified date of this bundle which comprises the most recent date of the getConfig()
and all the getResourceCollections() resources last modified dates. |
String |
getName()
The name of this bundle. |
ResourceCollection[] |
getResourceCollections()
Each bundle configures up a number of resources (files) that comprises the bundle, see BundleConfig.files() . |
Resource |
resolve(String path)
Resolves a resource under this bundle's base path (see BundleConfig.basePath()
Resource.getBasePath() . |
Field Detail |
---|
static final Pattern BUNDLE_ALLOWED_CHARS
Method Detail |
---|
BundleConfig getConfig()
String getName()
Resource resolve(String path)
BundleConfig.basePath()
Resource.getBasePath()
. The bundle returns the corresponding Resource
regardless of whether it
exists or not (never return null). If the underlying file does not exist, the resource returned have an empty
array of bytes in Resource.getBytes()
and a Resource.getLastModified()
of -1.
path
- The path to resolve under this bundle. This must never start with /. See Resource.getPath()
.
ResourceCollection[] getResourceCollections()
BundleConfig.files()
. Each of these resources may in turn have dependencies on other resources,
potentially from other bundles. This method returns an array where each element holds resolved dependent
resources for a bundle, the order is important, since that's the resolved order in which the resources/bundles
must be loaded to satisfy the dependency chains.
long getLastModified()
getConfig()
and all the getResourceCollections()
resources last modified dates.
boolean checkModified()
getResourceCollections()
. This
does not call checkModified() on the BundleConfig.configResource()
since that is being checked by the
Resolver
. If any resource is found to have changed, the built getResourceCollections()
are
dropped and (lazily) rebuilt.
JSLintWrapper getJsLinter()
BundleConfig.jsLintArgs()
is an non-empty array.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |