public class DefaultAssetRegistry extends java.lang.Object implements AssetRegistry
| Constructor and Description |
|---|
DefaultAssetRegistry(org.bladerunnerjs.model.AssetContainer assetContainer) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<Asset> |
discoverFurtherAssets(MemoizedFile dir,
java.lang.String requirePrefix,
java.util.List<Asset> implicitDependencies)
The method retrieves the List of
Assets identified by the AssetPlugins available for the current AssetContainer,
specified by a MemoizedFile. |
Asset |
getRegisteredAsset(java.lang.String requirePath)
The method retrieves the registered
Asset identified by the specified require path within the current registry. |
java.util.Set<Asset> |
getRegisteredAssets()
Returns all Assets registered with the Asset registry
|
java.util.Set<LinkedAsset> |
getRegisteredSeedAssets()
Returns all Assets registered as seed assets with the Asset registry
|
boolean |
hasRegisteredAsset(java.lang.String requirePath)
The method verifies whether the specified require path is the valid require path for one of its registered assets.
|
boolean |
hasSeedAsset(java.lang.String requirePath)
The method verifies whether the specified require path is the valid require path for one of its seed assets.
|
void |
promoteRegisteredAssetToSeed(LinkedAsset asset)
The method adds an already registered
LinkedAsset to the list of seed assets. |
void |
registerAsset(Asset asset)
The method registers the specified
LinkedAsset by adding it to the assets for the current directory, provided it has not been
registered beforehand. |
void |
registerSeedAsset(LinkedAsset asset)
The method adds the specified
LinkedAsset to the existing list of seed assets. |
public DefaultAssetRegistry(org.bladerunnerjs.model.AssetContainer assetContainer)
public void registerSeedAsset(LinkedAsset asset)
AssetRegistryLinkedAsset to the existing list of seed assets.registerSeedAsset in interface AssetRegistryasset - a LinkedAsset object that will be added to the existing list of seed assetspublic void promoteRegisteredAssetToSeed(LinkedAsset asset)
AssetRegistryLinkedAsset to the list of seed assets.promoteRegisteredAssetToSeed in interface AssetRegistryasset - an already registered LinkedAsset object that will be added to the list of seed assetspublic void registerAsset(Asset asset)
AssetRegistryLinkedAsset by adding it to the assets for the current directory, provided it has not been
registered beforehand.registerAsset in interface AssetRegistryasset - a LinkedAsset object that will be registered by adding it to the assets for the current directorypublic boolean hasSeedAsset(java.lang.String requirePath)
AssetRegistryhasSeedAsset in interface AssetRegistryrequirePath - a String object that will be verified to establish whether it denotes an Asset part of the seed assets for the registry.public boolean hasRegisteredAsset(java.lang.String requirePath)
AssetRegistryhasRegisteredAsset in interface AssetRegistryrequirePath - a String object that will be verified to establish whether it denotes an Asset part of the registered assets
for the registry.public Asset getRegisteredAsset(java.lang.String requirePath)
AssetRegistryAsset identified by the specified require path within the current registry.getRegisteredAsset in interface AssetRegistryrequirePath - a String object that will determine which Asset will be retrievedpublic java.util.Set<Asset> getRegisteredAssets()
AssetRegistrygetRegisteredAssets in interface AssetRegistrypublic java.util.Set<LinkedAsset> getRegisteredSeedAssets()
AssetRegistrygetRegisteredSeedAssets in interface AssetRegistrypublic java.util.List<Asset> discoverFurtherAssets(MemoizedFile dir, java.lang.String requirePrefix, java.util.List<Asset> implicitDependencies)
AssetRegistryAssets identified by the AssetPlugins available for the current AssetContainer,
specified by a MemoizedFile.discoverFurtherAssets in interface AssetRegistrydir - a MemoizedFile object specifying the assetContainer for which the AssetPlugins will be determinedrequirePrefix - a String object specifying what require prefix the newly discovered Assets should adhere toimplicitDependencies - a List of Assets specifying the already determined implicit dependencies for the container