public abstract class AbstractContentAccessor extends Object implements org.alfresco.service.cmr.repository.ContentAccessor
Modifier and Type | Class and Description |
---|---|
protected class |
AbstractContentAccessor.CallbackFileChannel
Wraps a
FileChannel to provide callbacks to listeners when the
channel is closed . |
protected class |
AbstractContentAccessor.ChannelCloseCallbackAdvise
Advise that listens for the completion of specific methods on the
ByteChannel interface. |
Modifier | Constructor and Description |
---|---|
protected |
AbstractContentAccessor(String contentUrl) |
Modifier and Type | Method and Description |
---|---|
protected void |
channelOpened()
Derived classes can call this method to ensure that necessary trace logging is performed
when the IO Channel is opened.
|
protected void |
finalize() |
protected FileChannel |
getCallbackFileChannel(FileChannel directChannel,
List<org.alfresco.service.cmr.repository.ContentStreamListener> listeners)
Generate a callback instance of the
FileChannel . |
org.alfresco.service.cmr.repository.ContentData |
getContentData() |
String |
getContentUrl() |
String |
getEncoding() |
Locale |
getLocale() |
String |
getMimetype() |
protected void |
setContentUrl(String contentUrl)
Allow derived implementations to set the Content URL.
|
void |
setEncoding(String encoding) |
void |
setLocale(Locale locale) |
void |
setMimetype(String mimetype) |
String |
toString() |
protected AbstractContentAccessor(String contentUrl)
contentUrl
- the content URLprotected void finalize() throws Throwable
public org.alfresco.service.cmr.repository.ContentData getContentData()
getContentData
in interface org.alfresco.service.cmr.repository.ContentAccessor
protected final void channelOpened()
public String getContentUrl()
getContentUrl
in interface org.alfresco.service.cmr.repository.ContentAccessor
protected void setContentUrl(String contentUrl)
contentUrl
- the new content URLpublic String getMimetype()
getMimetype
in interface org.alfresco.service.cmr.repository.ContentAccessor
public void setMimetype(String mimetype)
setMimetype
in interface org.alfresco.service.cmr.repository.ContentAccessor
mimetype
- the underlying content's mimetype - null if unknownpublic String getEncoding()
getEncoding
in interface org.alfresco.service.cmr.repository.ContentAccessor
public void setEncoding(String encoding)
setEncoding
in interface org.alfresco.service.cmr.repository.ContentAccessor
encoding
- the underlying content's encoding - null if unknownpublic Locale getLocale()
getLocale
in interface org.alfresco.service.cmr.repository.ContentAccessor
public void setLocale(Locale locale)
setLocale
in interface org.alfresco.service.cmr.repository.ContentAccessor
locale
- the content's locale, if known.protected FileChannel getCallbackFileChannel(FileChannel directChannel, List<org.alfresco.service.cmr.repository.ContentStreamListener> listeners) throws org.alfresco.service.cmr.repository.ContentIOException
FileChannel
.directChannel
- the delegate that to perform the actual operationslisteners
- the listeners to callorg.alfresco.service.cmr.repository.ContentIOException
Copyright © 2005–2017 Alfresco Software. All rights reserved.