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 aApplication
s multipleResource
s.- Author:
- Matthias Müller
- See Also:
Resource
,Application
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
close()
void
dumpToCache(ResourceType... types)
Writes allResource
s to the local caching location.ApplicationInfo
getApplicationInfo()
Resource
getResource(Integer id)
Returns theResource
with the given ID.Resource
getResource(ResourceType type, String fileName)
Returns theResource
of the given type with the given name, if any.Set<Resource>
getResources()
Returns the underlyingResource
Set<Resource>
getResources(ResourceType type)
Returns allResource
s of the givenResourceType
.
-
-
-
Method Detail
-
getResources
Set<Resource> getResources(ResourceType type)
Returns allResource
s of the givenResourceType
.- Parameters:
type
- the ResourceType- Returns:
- the
Resource
s of the givenResourceType
-
dumpToCache
void dumpToCache(ResourceType... types)
Writes allResource
s 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 theResource
of the given type with the given name, if any.- Parameters:
type
- theResourceType
of theResource
fileName
- the name of theResource
- Returns:
- the
Resource
, ornull
if no suchResource
exists.
-
getResources
Set<Resource> getResources()
Returns the underlyingResource
- Returns:
- the underlying
Resource
s
-
getApplicationInfo
ApplicationInfo getApplicationInfo()
- Returns:
- the
ApplicationInfo
-
close
void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
-