public abstract class AbstractContentAccessor
extends java.lang.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(java.lang.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 java.nio.channels.FileChannel |
getCallbackFileChannel(java.nio.channels.FileChannel directChannel,
java.util.List listeners)
Generate a callback instance of the
FileChannel. |
org.alfresco.service.cmr.repository.ContentData |
getContentData() |
java.lang.String |
getContentUrl() |
java.lang.String |
getEncoding() |
java.util.Locale |
getLocale() |
java.lang.String |
getMimetype() |
protected void |
setContentUrl(java.lang.String contentUrl)
Allow derived implementations to set the Content URL.
|
void |
setEncoding(java.lang.String encoding) |
void |
setLocale(java.util.Locale locale) |
void |
setMimetype(java.lang.String mimetype) |
java.lang.String |
toString() |
protected AbstractContentAccessor(java.lang.String contentUrl)
contentUrl - the content URLprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic java.lang.String toString()
toString in class java.lang.Objectpublic org.alfresco.service.cmr.repository.ContentData getContentData()
getContentData in interface org.alfresco.service.cmr.repository.ContentAccessorprotected final void channelOpened()
public java.lang.String getContentUrl()
getContentUrl in interface org.alfresco.service.cmr.repository.ContentAccessorprotected void setContentUrl(java.lang.String contentUrl)
contentUrl - the new content URLpublic java.lang.String getMimetype()
getMimetype in interface org.alfresco.service.cmr.repository.ContentAccessorpublic void setMimetype(java.lang.String mimetype)
setMimetype in interface org.alfresco.service.cmr.repository.ContentAccessormimetype - the underlying content's mimetype - null if unknownpublic java.lang.String getEncoding()
getEncoding in interface org.alfresco.service.cmr.repository.ContentAccessorpublic void setEncoding(java.lang.String encoding)
setEncoding in interface org.alfresco.service.cmr.repository.ContentAccessorencoding - the underlying content's encoding - null if unknownpublic java.util.Locale getLocale()
getLocale in interface org.alfresco.service.cmr.repository.ContentAccessorpublic void setLocale(java.util.Locale locale)
setLocale in interface org.alfresco.service.cmr.repository.ContentAccessorlocale - the content's locale, if known.protected java.nio.channels.FileChannel getCallbackFileChannel(java.nio.channels.FileChannel directChannel,
java.util.List 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.ContentIOExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.