public class HttpAlfrescoContentReader extends AbstractContentReader
HttpAlfrescoStoreAbstractContentAccessor.CallbackFileChannel, AbstractContentAccessor.ChannelCloseCallbackAdvise| Constructor and Description |
|---|
HttpAlfrescoContentReader(TransactionService transactionService,
AuthenticationService authenticationService,
java.lang.String baseHttpUrl,
java.lang.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 java.lang.String |
generateURL(java.lang.String baseHttpUrl,
java.lang.String contentUrl,
java.lang.String ticket,
boolean infoOnly)
Helper to generate a URL based on the ContentStore URL and ticket.
|
protected java.nio.channels.ReadableByteChannel |
getDirectReadableChannel()
Provides low-level access to read content from the repository.
|
long |
getLastModified() |
long |
getSize() |
java.lang.String |
toString() |
addListener, compareContentReaders, getContent, getContent, getContentInputStream, getContentString, getContentString, getFileChannel, getLimits, getReadableChannel, getReader, getTransformerDebug, getUseBufferedInputStream, isChannelOpen, isClosed, setLimits, setTransformerDebug, setUseBufferedInputStreamchannelOpened, finalize, getCallbackFileChannel, getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setContentUrl, setEncoding, setLocale, setMimetypepublic HttpAlfrescoContentReader(TransactionService transactionService, AuthenticationService authenticationService, java.lang.String baseHttpUrl, java.lang.String contentUrl)
public java.lang.String toString()
toString in class AbstractContentAccessorpublic boolean exists()
public long getLastModified()
public long getSize()
protected org.alfresco.service.cmr.repository.ContentReader createReader()
throws org.alfresco.service.cmr.repository.ContentIOException
AbstractContentReaderContentReader.getReader() method.
Only the instance need be constructed. The required mimetype, encoding, etc will be copied across by this class.
createReader in class AbstractContentReaderorg.alfresco.service.cmr.repository.ContentIOExceptionprotected java.nio.channels.ReadableByteChannel getDirectReadableChannel()
throws org.alfresco.service.cmr.repository.ContentIOException
AbstractContentReaderThis 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 AbstractContentReaderorg.alfresco.service.cmr.repository.ContentIOException - if the channel could not be opened or the underlying content
has disappearedpublic static final java.lang.String generateURL(java.lang.String baseHttpUrl,
java.lang.String contentUrl,
java.lang.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 - 2010 Alfresco Software, Inc. All Rights Reserved.