Package org.ametys.web.source
Class ServiceSourceFactory.ServiceSource
- java.lang.Object
-
- org.ametys.web.source.ServiceSourceFactory.ServiceSource
-
- All Implemented Interfaces:
Source
- Enclosing class:
- ServiceSourceFactory
public class ServiceSourceFactory.ServiceSource extends Object implements Source
A wrapping source to know real location
-
-
Field Summary
Fields Modifier and Type Field Description private Source
_source
private ServiceSourceFactory.SourceType
_type
-
Constructor Summary
Constructors Constructor Description ServiceSource(Source source, ServiceSourceFactory.SourceType type)
Creates the service source
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists()
long
getContentLength()
InputStream
getInputStream()
long
getLastModified()
String
getMimeType()
String
getScheme()
ServiceSourceFactory.SourceType
getSourceType()
Get the source type of this sourceString
getURI()
SourceValidity
getValidity()
Source
getWrappedSource()
Get the wrapped sourcevoid
refresh()
-
-
-
Field Detail
-
_type
private ServiceSourceFactory.SourceType _type
-
-
Constructor Detail
-
ServiceSource
public ServiceSource(Source source, ServiceSourceFactory.SourceType type)
Creates the service source- Parameters:
source
- The source to wraptype
- The type of the source
-
-
Method Detail
-
getSourceType
public ServiceSourceFactory.SourceType getSourceType()
Get the source type of this source- Returns:
- the source type
-
getWrappedSource
public Source getWrappedSource()
Get the wrapped source- Returns:
- the original source
-
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interfaceSource
-
getInputStream
public InputStream getInputStream() throws IOException, SourceNotFoundException
- Specified by:
getInputStream
in interfaceSource
- Throws:
IOException
SourceNotFoundException
-
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interfaceSource
-
getMimeType
public String getMimeType()
- Specified by:
getMimeType
in interfaceSource
-
getValidity
public SourceValidity getValidity()
- Specified by:
getValidity
in interfaceSource
-
-