public class HttpAlfrescoContentReader extends AbstractContentReader
HttpAlfrescoStore
AbstractContentAccessor.CallbackFileChannel, AbstractContentAccessor.ChannelCloseCallbackAdvise
Constructor and Description |
---|
HttpAlfrescoContentReader(TransactionService transactionService,
AuthenticationService authenticationService,
String baseHttpUrl,
String contentUrl) |
Modifier and Type | Method and Description |
---|---|
protected org.alfresco.service.cmr.repository.ContentReader |
createReader()
A factory method for subclasses to implement that will ensure the proper
implementation of the
ContentReader.getReader() method. |
boolean |
exists() |
static String |
generateURL(String baseHttpUrl,
String contentUrl,
String ticket,
boolean infoOnly)
Helper to generate a URL based on the ContentStore URL and ticket.
|
protected ReadableByteChannel |
getDirectReadableChannel()
Provides low-level access to read content from the repository.
|
long |
getLastModified() |
long |
getSize() |
String |
toString() |
addListener, compareContentReaders, getContent, getContent, getContentInputStream, getContentString, getContentString, getFileChannel, getLimits, getReadableChannel, getReader, getTransformerDebug, getUseBufferedInputStream, isChannelOpen, isClosed, setLimits, setTransformerDebug, setUseBufferedInputStream
channelOpened, finalize, getCallbackFileChannel, getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setContentUrl, setEncoding, setLocale, setMimetype
public HttpAlfrescoContentReader(TransactionService transactionService, AuthenticationService authenticationService, String baseHttpUrl, String contentUrl)
public String toString()
toString
in class AbstractContentAccessor
public boolean exists()
public long getLastModified()
public long getSize()
protected org.alfresco.service.cmr.repository.ContentReader createReader() throws org.alfresco.service.cmr.repository.ContentIOException
AbstractContentReader
ContentReader.getReader()
method.
Only the instance need be constructed. The required mimetype, encoding, etc will be copied across by this class.
createReader
in class AbstractContentReader
org.alfresco.service.cmr.repository.ContentIOException
protected ReadableByteChannel getDirectReadableChannel() throws org.alfresco.service.cmr.repository.ContentIOException
AbstractContentReader
This is the only of the content reading methods that needs to be implemented by derived classes. All other content access methods make use of this in their underlying implementations.
getDirectReadableChannel
in class AbstractContentReader
org.alfresco.service.cmr.repository.ContentIOException
- if the channel could not be opened or the underlying content
has disappearedpublic static final String generateURL(String baseHttpUrl, String contentUrl, String ticket, boolean infoOnly)
baseHttpUrl
- the first part of the URL pointing to the Alfresoc Web ApplicationcontentUrl
- the content URL - never nullticket
- the authentication ticketinfoOnly
- true to add the info-only flagCopyright © 2005–2017 Alfresco Software. All rights reserved.