info.magnolia.dam.jcr
Class JcrAssetProvider

java.lang.Object
  extended by info.magnolia.dam.api.AbstractAssetProvider
      extended by info.magnolia.dam.jcr.JcrAssetProvider
All Implemented Interfaces:
info.magnolia.dam.api.AssetProvider, info.magnolia.dam.api.PathAwareAssetProvider

public class JcrAssetProvider
extends info.magnolia.dam.api.AbstractAssetProvider
implements info.magnolia.dam.api.PathAwareAssetProvider

AssetProvider that delivers assets for the "dam" workspace.


Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.dam.api.PathAwareAssetProvider
info.magnolia.dam.api.PathAwareAssetProvider.PathNotFoundException
 
Nested classes/interfaces inherited from interface info.magnolia.dam.api.AssetProvider
info.magnolia.dam.api.AssetProvider.AssetNotFoundException, info.magnolia.dam.api.AssetProvider.IllegalItemKeyException
 
Field Summary
protected static String ASSET_JOIN_STATEMENT
           
protected static String ASSET_RESTRICTION
           
protected static String ASSET_SELECT_STATEMENT
           
protected static String FOLDER_RESTRICTION
           
 
Constructor Summary
JcrAssetProvider(info.magnolia.dam.core.config.DamCoreConfiguration configuration)
           
 
Method Summary
 info.magnolia.dam.api.Asset getAsset(info.magnolia.dam.api.ItemKey assetKey)
           
 info.magnolia.dam.api.Asset getAsset(String assetPath)
           
 info.magnolia.dam.api.Folder getFolder(info.magnolia.dam.api.ItemKey folderKey)
           
 info.magnolia.dam.api.Folder getFolder(String folderPath)
           
 info.magnolia.dam.api.Item getItem(info.magnolia.dam.api.ItemKey itemKey)
           
 info.magnolia.dam.api.Item getItem(String path)
           
 String getLink(info.magnolia.dam.api.Asset asset)
           
protected  String getQueryString(info.magnolia.dam.api.AssetQuery assetQuery)
          Returns a JCR_SQL2 query string according to the asset filter.
 info.magnolia.dam.api.AssetRenderer getRendererFor(info.magnolia.dam.api.Asset asset, com.google.common.net.MediaType to)
           
 info.magnolia.dam.api.Folder getRootFolder()
           
 String getRootPath()
           
 String getWorkspaceName()
           
 Iterator<info.magnolia.dam.api.Item> list(info.magnolia.dam.api.AssetQuery assetQuery)
           
 void setRootPath(String rootPath)
           
protected  EnumSet<info.magnolia.dam.api.AssetProviderCapability> setupProviderCapabilities()
           
 void setWorkspaceName(String workspaceName)
           
 boolean supports(Class<? extends info.magnolia.dam.api.metadata.AssetMetadata> metaData)
           
 
Methods inherited from class info.magnolia.dam.api.AbstractAssetProvider
getIdentifier, getMediaTypes, getProviderCapabilities, provides, setIdentifier, setMediaTypes, supports
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ASSET_SELECT_STATEMENT

protected static final String ASSET_SELECT_STATEMENT
See Also:
Constant Field Values

ASSET_RESTRICTION

protected static final String ASSET_RESTRICTION
See Also:
Constant Field Values

FOLDER_RESTRICTION

protected static final String FOLDER_RESTRICTION
See Also:
Constant Field Values

ASSET_JOIN_STATEMENT

protected static final String ASSET_JOIN_STATEMENT
See Also:
Constant Field Values
Constructor Detail

JcrAssetProvider

public JcrAssetProvider(info.magnolia.dam.core.config.DamCoreConfiguration configuration)
Method Detail

getRootPath

public String getRootPath()

setRootPath

public void setRootPath(String rootPath)

getWorkspaceName

public String getWorkspaceName()

setWorkspaceName

public void setWorkspaceName(String workspaceName)

setupProviderCapabilities

protected EnumSet<info.magnolia.dam.api.AssetProviderCapability> setupProviderCapabilities()
Specified by:
setupProviderCapabilities in class info.magnolia.dam.api.AbstractAssetProvider

supports

public boolean supports(Class<? extends info.magnolia.dam.api.metadata.AssetMetadata> metaData)
Specified by:
supports in interface info.magnolia.dam.api.AssetProvider

getAsset

public info.magnolia.dam.api.Asset getAsset(info.magnolia.dam.api.ItemKey assetKey)
                                     throws info.magnolia.dam.api.AssetProvider.AssetNotFoundException,
                                            info.magnolia.dam.api.AssetProvider.IllegalItemKeyException
Specified by:
getAsset in interface info.magnolia.dam.api.AssetProvider
Throws:
info.magnolia.dam.api.AssetProvider.AssetNotFoundException
info.magnolia.dam.api.AssetProvider.IllegalItemKeyException

getAsset

public info.magnolia.dam.api.Asset getAsset(String assetPath)
                                     throws info.magnolia.dam.api.PathAwareAssetProvider.PathNotFoundException
Specified by:
getAsset in interface info.magnolia.dam.api.PathAwareAssetProvider
Throws:
info.magnolia.dam.api.PathAwareAssetProvider.PathNotFoundException

getFolder

public info.magnolia.dam.api.Folder getFolder(info.magnolia.dam.api.ItemKey folderKey)
                                       throws info.magnolia.dam.api.AssetProvider.AssetNotFoundException,
                                              info.magnolia.dam.api.AssetProvider.IllegalItemKeyException
Specified by:
getFolder in interface info.magnolia.dam.api.AssetProvider
Throws:
info.magnolia.dam.api.AssetProvider.AssetNotFoundException
info.magnolia.dam.api.AssetProvider.IllegalItemKeyException

getFolder

public info.magnolia.dam.api.Folder getFolder(String folderPath)
                                       throws info.magnolia.dam.api.PathAwareAssetProvider.PathNotFoundException
Specified by:
getFolder in interface info.magnolia.dam.api.PathAwareAssetProvider
Throws:
info.magnolia.dam.api.PathAwareAssetProvider.PathNotFoundException

getItem

public info.magnolia.dam.api.Item getItem(info.magnolia.dam.api.ItemKey itemKey)
                                   throws info.magnolia.dam.api.AssetProvider.AssetNotFoundException,
                                          info.magnolia.dam.api.AssetProvider.IllegalItemKeyException
Specified by:
getItem in interface info.magnolia.dam.api.AssetProvider
Throws:
info.magnolia.dam.api.AssetProvider.AssetNotFoundException
info.magnolia.dam.api.AssetProvider.IllegalItemKeyException

getItem

public info.magnolia.dam.api.Item getItem(String path)
                                   throws info.magnolia.dam.api.PathAwareAssetProvider.PathNotFoundException
Specified by:
getItem in interface info.magnolia.dam.api.PathAwareAssetProvider
Throws:
info.magnolia.dam.api.PathAwareAssetProvider.PathNotFoundException

getRootFolder

public info.magnolia.dam.api.Folder getRootFolder()
Specified by:
getRootFolder in interface info.magnolia.dam.api.AssetProvider

list

public Iterator<info.magnolia.dam.api.Item> list(info.magnolia.dam.api.AssetQuery assetQuery)
Specified by:
list in interface info.magnolia.dam.api.AssetProvider

getQueryString

protected String getQueryString(info.magnolia.dam.api.AssetQuery assetQuery)
Returns a JCR_SQL2 query string according to the asset filter.


getRendererFor

public info.magnolia.dam.api.AssetRenderer getRendererFor(info.magnolia.dam.api.Asset asset,
                                                          com.google.common.net.MediaType to)
Specified by:
getRendererFor in interface info.magnolia.dam.api.AssetProvider

getLink

public String getLink(info.magnolia.dam.api.Asset asset)


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.