public abstract class AbstractUrlContentReferenceHandler extends Object implements ContentReferenceHandler
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
isAvailable |
protected boolean |
waitForAvailability |
| Constructor and Description |
|---|
AbstractUrlContentReferenceHandler() |
| Modifier and Type | Method and Description |
|---|---|
ContentReference |
createContentReference(String fileName,
String mediaType)
Creates a content reference of the given file name and media type.
|
protected String |
createNewUrl(String remoteRelativePath)
Gets a URL from the
getRemoteBaseUrl() and the given relative path. |
protected String |
getExtension(String remoteContentUrl)
Gets the extension from the remote URL string
|
protected String |
getRelativePath(String remoteContentUrl)
Gets the relative path from the remote URL string
|
protected abstract String |
getRemoteBaseUrl()
Gets the remote base URL string for the handler.
|
protected String |
getRemoteFileUrl(ContentReference contentReference)
Gets the remote URL string from the given content reference.
|
protected String |
getRemotePath(String remoteFilename)
Builds the remote path for the given remote file name.
|
abstract void |
init()
Performs any initialization needed for the hanlder.
|
boolean |
isAvailable()
Determines whether or not the handler is currently available, i.e.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdelete, getInputStream, isContentReferenceExists, isContentReferenceSupported, putFile, putInputStreamprotected boolean isAvailable
protected boolean waitForAvailability
public abstract void init()
protected abstract String getRemoteBaseUrl()
protected String createNewUrl(String remoteRelativePath)
getRemoteBaseUrl() and the given relative path.remoteRelativePath - protected String getRemotePath(String remoteFilename)
getRemoteBaseUrl().remoteFilename - protected String getRelativePath(String remoteContentUrl)
remoteContentUrl - protected String getExtension(String remoteContentUrl)
remoteContentUrl - public boolean isAvailable()
ContentReferenceHandlerisAvailable in interface ContentReferenceHandlerpublic ContentReference createContentReference(String fileName, String mediaType) throws ContentIOException
ContentReferenceHandlercreateContentReference in interface ContentReferenceHandlerContentIOExceptionprotected String getRemoteFileUrl(ContentReference contentReference)
contentReference - Copyright © 2018 Alfresco Software. All rights reserved.