|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.content.AbstractContentAccessor
public abstract class AbstractContentAccessor
Provides basic support for content accessors.
Nested Class Summary | |
---|---|
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. |
Constructor Summary | |
---|---|
protected |
AbstractContentAccessor(java.lang.String contentUrl)
|
Method Summary | |
---|---|
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 . |
ContentData |
getContentData()
Get the data representation of the content being accessed. |
java.lang.String |
getContentUrl()
Retrieve the URL that this accessor references |
java.lang.String |
getEncoding()
Get the encoding of the content being accessed |
java.util.Locale |
getLocale()
Get the locale of the content being accessed |
java.lang.String |
getMimetype()
Get the content mimetype |
protected void |
setContentUrl(java.lang.String contentUrl)
Allow derived implementations to set the Content URL. |
void |
setEncoding(java.lang.String encoding)
Set the String encoding for this accessor |
void |
setLocale(java.util.Locale locale)
Set the Locale for this accessor |
void |
setMimetype(java.lang.String mimetype)
Set the mimetype that must be used for accessing the content |
void |
setRetryingTransactionHelper(RetryingTransactionHelper helper)
Set the transaction helper for callbacks. |
java.lang.String |
toString()
|
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 |
---|
addListener, getSize, isChannelOpen |
Constructor Detail |
---|
protected AbstractContentAccessor(java.lang.String contentUrl)
contentUrl
- the content URLMethod Detail |
---|
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public java.lang.String toString()
toString
in class java.lang.Object
public ContentData getContentData()
ContentAccessor
The content mimetype
must be set before this
method is called as the content data requires a mimetype whenever the
content URL is specified.
getContentData
in interface ContentAccessor
ContentData.ContentData(String, String, long, String)
public void setRetryingTransactionHelper(RetryingTransactionHelper helper)
ContentAccessor
setRetryingTransactionHelper
in interface ContentAccessor
protected final void channelOpened()
public java.lang.String getContentUrl()
ContentAccessor
getContentUrl
in interface ContentAccessor
protected void setContentUrl(java.lang.String contentUrl)
contentUrl
- the new content URLpublic java.lang.String getMimetype()
ContentAccessor
getMimetype
in interface ContentAccessor
public void setMimetype(java.lang.String mimetype)
ContentAccessor
setMimetype
in interface ContentAccessor
mimetype
- the underlying content's mimetype - null if unknownpublic java.lang.String getEncoding()
ContentAccessor
getEncoding
in interface ContentAccessor
public void setEncoding(java.lang.String encoding)
ContentAccessor
String
encoding for this accessor
setEncoding
in interface ContentAccessor
encoding
- the underlying content's encoding - null if unknownpublic java.util.Locale getLocale()
ContentAccessor
getLocale
in interface ContentAccessor
public void setLocale(java.util.Locale locale)
ContentAccessor
Locale
for this accessor
setLocale
in interface ContentAccessor
locale
- the content's locale, if known.protected java.nio.channels.FileChannel getCallbackFileChannel(java.nio.channels.FileChannel directChannel, java.util.List listeners) throws ContentIOException
FileChannel
.
directChannel
- the delegate that to perform the actual operationslisteners
- the listeners to call
ContentIOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |