info.magnolia.dam.api
Class AbstractItem<T extends AssetProvider>

java.lang.Object
  extended by info.magnolia.dam.api.AbstractItem<T>
Type Parameters:
T - type of AssetProvider it is associated with.
All Implemented Interfaces:
Item

public abstract class AbstractItem<T extends AssetProvider>
extends Object
implements Item

Common superclass for any dam Item.


Constructor Summary
protected AbstractItem(T assetProvider, ItemKey key)
           
 
Method Summary
 T getAssetProvider()
           
 ItemKey getItemKey()
           
 boolean isAsset()
          A slightly more elegant way of doing (i instanceof Asset).
 boolean isFolder()
          A slightly more elegant way of doing (i instanceof Folder).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.magnolia.dam.api.Item
getName, getParent, getPath
 

Constructor Detail

AbstractItem

protected AbstractItem(T assetProvider,
                       ItemKey key)
Method Detail

getAssetProvider

public T getAssetProvider()
Specified by:
getAssetProvider in interface Item

getItemKey

public ItemKey getItemKey()
Specified by:
getItemKey in interface Item

isFolder

public boolean isFolder()
Description copied from interface: Item
A slightly more elegant way of doing (i instanceof Folder).

Specified by:
isFolder in interface Item

isAsset

public boolean isAsset()
Description copied from interface: Item
A slightly more elegant way of doing (i instanceof Asset).

Specified by:
isAsset in interface Item


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