info.magnolia.dam.api
Interface Folder

All Superinterfaces:
Item

public interface Folder
extends Item

A Folder represents a structural item holding Assets. Depending on the provider, this can be directly mapped to the concept of folders/directories (JCR, FileSystems, ...); for others this might map to the concept of albums, playlists, sets, etc...


Method Summary
 Iterator<Item> getChildren()
          Returns an iterator over the direct elements under this folder; returns both Assets and Folders.
 Item getItem(String name)
          Returns the item directly under this folder with the given name.
 boolean isRoot()
          Returns true if this folder is the root folder of this provider.
 
Methods inherited from interface info.magnolia.dam.api.Item
getAssetProvider, getItemKey, getName, getParent, getPath, isAsset, isFolder
 

Method Detail

getChildren

Iterator<Item> getChildren()
Returns an iterator over the direct elements under this folder; returns both Assets and Folders. For more refined results, use AssetProvider.list(AssetQuery).


getItem

Item getItem(String name)
Returns the item directly under this folder with the given name. TODO @throws AssetNotFoundException if such an item doesn't exist.


isRoot

boolean isRoot()
Returns true if this folder is the root folder of this provider. Note: some providers might "hide" or show only a subsection of their actual data. This should return true if and only if this folder is the root of such a subsection.



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