Package org.appng.api.model
Interface Resources
-
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ApplicationResourceHolder
public interface Resources extends Closeable
A container providing easy access to the aApplications multipleResources.- Author:
- Matthias Müller
- See Also:
Resource,Application
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()voiddumpToCache(ResourceType... types)Writes allResources to the local caching location.ApplicationInfogetApplicationInfo()ResourcegetResource(Integer id)Returns theResourcewith the given ID.ResourcegetResource(ResourceType type, String fileName)Returns theResourceof the given type with the given name, if any.Set<Resource>getResources()Returns the underlyingResourceSet<Resource>getResources(ResourceType type)Returns allResources of the givenResourceType.
-
-
-
Method Detail
-
getResources
Set<Resource> getResources(ResourceType type)
Returns allResources of the givenResourceType.- Parameters:
type- the ResourceType- Returns:
- the
Resources of the givenResourceType
-
dumpToCache
void dumpToCache(ResourceType... types)
Writes allResources to the local caching location.- Parameters:
types- the types to write the cachefiles for- See Also:
Resource.getCachedFile()
-
getResource
Resource getResource(ResourceType type, String fileName)
Returns theResourceof the given type with the given name, if any.- Parameters:
type- theResourceTypeof theResourcefileName- the name of theResource- Returns:
- the
Resource, ornullif no suchResourceexists.
-
getResources
Set<Resource> getResources()
Returns the underlyingResource- Returns:
- the underlying
Resources
-
getApplicationInfo
ApplicationInfo getApplicationInfo()
- Returns:
- the
ApplicationInfo
-
close
void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
-