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_sourceprivate 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 booleanexists()longgetContentLength()InputStreamgetInputStream()longgetLastModified()StringgetMimeType()StringgetScheme()ServiceSourceFactory.SourceTypegetSourceType()Get the source type of this sourceStringgetURI()SourceValiditygetValidity()SourcegetWrappedSource()Get the wrapped sourcevoidrefresh() 
 - 
 
- 
- 
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:
 getContentLengthin interfaceSource
 
- 
getInputStream
public InputStream getInputStream() throws IOException, SourceNotFoundException
- Specified by:
 getInputStreamin interfaceSource- Throws:
 IOExceptionSourceNotFoundException
 
- 
getLastModified
public long getLastModified()
- Specified by:
 getLastModifiedin interfaceSource
 
- 
getMimeType
public String getMimeType()
- Specified by:
 getMimeTypein interfaceSource
 
- 
getValidity
public SourceValidity getValidity()
- Specified by:
 getValidityin interfaceSource
 
 - 
 
 -