Package org.ametys.cms.data
Class NamedResource
- java.lang.Object
 - 
- org.ametys.cms.data.Resource
 - 
- org.ametys.cms.data.NamedResource
 
 
 
- 
- Direct Known Subclasses:
 Binary
public class NamedResource extends Resource
Class representing a file 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected String_filenamethe file's name- 
Fields inherited from class org.ametys.cms.data.Resource
_buffer, _encoding, _lastModificationDate, _mimeType, _repositoryData, _tmpFile 
 - 
 
- 
Constructor Summary
Constructors Constructor Description NamedResource()Default constructorNamedResource(RepositoryData repositoryData)Constructor to use when reading the file from the repository 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFilename()Retrieves the binary's file namevoidsetFilename(String filename)Sets the binary's file name- 
Methods inherited from class org.ametys.cms.data.Resource
closeOutputStream, getEncoding, getInputStream, getLastModificationDate, getLength, getMimeType, getOutputStream, setEncoding, setInputStream, setLastModificationDate, setMimeType 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
NamedResource
public NamedResource()
Default constructor 
- 
NamedResource
public NamedResource(RepositoryData repositoryData)
Constructor to use when reading the file from the repository- Parameters:
 repositoryData- the repository data containing the file's data
 
 - 
 
- 
Method Detail
- 
getFilename
public String getFilename()
Retrieves the binary's file name- Returns:
 - the binary's file name
 
 
- 
setFilename
public void setFilename(String filename)
Sets the binary's file name- Parameters:
 filename- the file name to set
 
 - 
 
 -