info.magnolia.dam.api
Interface Item

All Known Subinterfaces:
Asset, Folder
All Known Implementing Classes:
AbstractItem, AssetDecorator

public interface Item

Defines a common interface for Asset and Folder.


Method Summary
 AssetProvider getAssetProvider()
           
 ItemKey getItemKey()
           
 String getName()
          Returns the name of this item; this same name should be usable by Folder.getItem(String).
 Folder getParent()
          Since Assets can not be nested, always returns a Folder.
 String getPath()
          Returns the canonical path to this item; in case an item is reachable by several paths, this would return the principal path that the AssetProvider knows.
 boolean isAsset()
          A slightly more elegant way of doing (i instanceof Asset).
 boolean isFolder()
          A slightly more elegant way of doing (i instanceof Folder).
 

Method Detail

getItemKey

ItemKey getItemKey()

getName

String getName()
Returns the name of this item; this same name should be usable by Folder.getItem(String).


getPath

String getPath()
Returns the canonical path to this item; in case an item is reachable by several paths, this would return the principal path that the AssetProvider knows. Note: some providers might hide or show only a subsection of their actual data. This should return the path "relative" to that subsection.


getParent

Folder getParent()
Since Assets can not be nested, always returns a Folder.


isFolder

boolean isFolder()
A slightly more elegant way of doing (i instanceof Folder).


isAsset

boolean isAsset()
A slightly more elegant way of doing (i instanceof Asset).


getAssetProvider

AssetProvider getAssetProvider()


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