| Constructor and Description |
|---|
ApplicationResourceHolder(Application application,
MarshallService marshallService,
File applicationFolder,
File outputFolder)
Creates a new
ApplicationResourceHolder |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
dumpToCache(ResourceType... types)
Writes all
Resources to the local caching location. |
ApplicationInfo |
getApplicationInfo()
|
Resource |
getResource(Integer id)
Returns the
Resource with the given ID. |
Resource |
getResource(ResourceType type,
String fileName)
Returns the
Resource of the given type with the given name, if any. |
Set<Resource> |
getResources()
Returns the underlying
Resource |
Set<Resource> |
getResources(ResourceType type)
Returns all
Resources of the given ResourceType. |
public ApplicationResourceHolder(Application application, MarshallService marshallService, File applicationFolder, File outputFolder) throws InvalidConfigurationException
ApplicationResourceHolderapplication - the Application that owns the ResourcesmarshallService - a MarshallService using MarshallService.AppNGSchema.APPLICATIONapplicationFolder - the location of the Application's Resources on disc, only needed if the
Application is filebasedoutputFolder - the output folder for storing the cached resources of the ApplicationInvalidConfigurationException - if no valid application-info.xml could be foundApplication.getResourceSet(),
Application.isFileBased(),
dumpToCache(ResourceType...)public Set<Resource> getResources(ResourceType type)
ResourcesResources of the given ResourceType.getResources in interface Resourcestype - the ResourceTypeResources of the given ResourceTypepublic void dumpToCache(ResourceType... types)
ResourcesResources to the local caching location.dumpToCache in interface Resourcestypes - the types to write the cachefiles forResource.getCachedFile()public Resource getResource(ResourceType type, String fileName)
ResourcesResource of the given type with the given name, if any.getResource in interface Resourcestype - the ResourceType of the ResourcefileName - the name of the ResourceResource, or null if no such Resource exists.public Set<Resource> getResources()
ResourcesResourcegetResources in interface ResourcesResourcespublic Resource getResource(Integer id)
ResourcesResource with the given ID.getResource in interface Resourcesid - the ID of the ResourceResource, or null if no such resource exists.public ApplicationInfo getApplicationInfo()
ResourcesgetApplicationInfo in interface ResourcesApplicationInfopublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface ResourcesIOExceptionCopyright © 2011–2020 aiticon GmbH. All rights reserved.