|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.content.AbstractContentAccessor
org.alfresco.repo.content.AbstractContentReader
org.alfresco.repo.content.http.HttpAlfrescoContentReader
public class HttpAlfrescoContentReader
The reader that does the actual communication with the Alfresco HTTP application.
HttpAlfrescoStore
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.alfresco.repo.content.AbstractContentAccessor |
---|
AbstractContentAccessor.CallbackFileChannel, AbstractContentAccessor.ChannelCloseCallbackAdvise |
Constructor Summary | |
---|---|
HttpAlfrescoContentReader(TransactionService transactionService,
AuthenticationService authenticationService,
java.lang.String baseHttpUrl,
java.lang.String contentUrl)
|
Method Summary | |
---|---|
protected ContentReader |
createReader()
A factory method for subclasses to implement that will ensure the proper implementation of the ContentReader.getReader() method. |
boolean |
exists()
Check if the underlying content is present. |
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()
Gets the time of the last modification of the underlying content. |
long |
getSize()
Gets the size of the content that this reader references. |
java.lang.String |
toString()
|
Methods inherited from class org.alfresco.repo.content.AbstractContentReader |
---|
addListener, compareContentReaders, getContent, getContent, getContentInputStream, getContentString, getContentString, getFileChannel, getReadableChannel, getReader, isChannelOpen, isClosed |
Methods inherited from class org.alfresco.repo.content.AbstractContentAccessor |
---|
channelOpened, finalize, getCallbackFileChannel, getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setContentUrl, setEncoding, setLocale, setMimetype, setRetryingTransactionHelper |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.alfresco.service.cmr.repository.ContentAccessor |
---|
getContentData, getContentUrl, getEncoding, getLocale, getMimetype, setEncoding, setLocale, setMimetype, setRetryingTransactionHelper |
Constructor Detail |
---|
public HttpAlfrescoContentReader(TransactionService transactionService, AuthenticationService authenticationService, java.lang.String baseHttpUrl, java.lang.String contentUrl)
Method Detail |
---|
public java.lang.String toString()
toString
in class AbstractContentAccessor
public boolean exists()
ContentReader
underlying content
is present.
public long getLastModified()
ContentReader
0L
if the content doesn't exist
.System.currentTimeMillis()
public long getSize()
ContentAccessor
OL
if the
content doesn't exist
.protected ContentReader createReader() throws 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
ContentIOException
protected java.nio.channels.ReadableByteChannel getDirectReadableChannel() throws 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
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 flag
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |