Package org.ametys.cms.data
Class NamedResource
java.lang.Object
org.ametys.cms.data.Resource
org.ametys.cms.data.NamedResource
- Direct Known Subclasses:
Binary
Class representing a file
-
Field Summary
Fields inherited from class org.ametys.cms.data.Resource
_buffer, _encoding, _lastModificationDate, _mimeType, _repositoryData, _tmpFile
-
Constructor Summary
ConstructorDescriptionDefault constructorNamedResource
(RepositoryData repositoryData) Constructor to use when reading the file from the repository -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the binary's file namevoid
setFilename
(String filename) Sets the binary's file nameMethods inherited from class org.ametys.cms.data.Resource
closeOutputStream, getEncoding, getInputStream, getLastModificationDate, getLength, getMimeType, getOutputStream, getRepositoryData, setEncoding, setInputStream, setLastModificationDate, setMimeType
-
Field Details
-
_filename
the file's name
-
-
Constructor Details
-
NamedResource
public NamedResource()Default constructor -
NamedResource
Constructor to use when reading the file from the repository- Parameters:
repositoryData
- the repository data containing the file's data
-
-
Method Details
-
getFilename
Retrieves the binary's file name- Returns:
- the binary's file name
-
setFilename
Sets the binary's file name- Parameters:
filename
- the file name to set
-