public class ResourcesContainer
extends com.vaadin.data.util.AbstractContainer
implements com.vaadin.data.Container, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Collapsible, info.magnolia.ui.workbench.container.Refreshable, com.vaadin.data.Container.ItemSetChangeNotifier
Container
implementation representing a resource ResourceOrigin
.
Uses the Resource
as itemId.
com.vaadin.data.util.AbstractContainer.BaseItemSetChangeEvent, com.vaadin.data.util.AbstractContainer.BasePropertySetChangeEvent
com.vaadin.data.Container.Indexed.ItemAddEvent, com.vaadin.data.Container.Indexed.ItemRemoveEvent
com.vaadin.data.Container.Editor, com.vaadin.data.Container.Filter, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeEvent, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeEvent, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.SimpleFilterable, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_PROPERTY_ID |
static String |
DIRECTORY_PROPERTY_ID |
static String |
EDITABLE_PROPERTY_ID |
static String |
FORMAT_PROPERTY_ID |
static String |
ORIGIN_NAME_PROPERTY_ID |
static String |
OVERRIDING_PROPERTY_ID |
static Object |
RESOURCE_NAME |
static String |
RESOURCE_PATH |
static String |
ROOT_DIRECTORY |
Constructor and Description |
---|
ResourcesContainer(info.magnolia.resourceloader.ResourceOrigin origin,
List<String> moduleNames) |
Modifier and Type | Method and Description |
---|---|
boolean |
addContainerProperty(Object propertyId,
Class<?> type,
Object defaultValue) |
Object |
addItem() |
com.vaadin.data.Item |
addItem(Object itemId) |
Object |
addItemAfter(Object previousItemId) |
com.vaadin.data.Item |
addItemAfter(Object previousItemId,
Object newItemId) |
Object |
addItemAt(int index) |
com.vaadin.data.Item |
addItemAt(int index,
Object newItemId) |
void |
addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
void |
addListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
boolean |
areChildrenAllowed(Object itemId) |
boolean |
containsId(Object itemId) |
protected void |
doCollapse(Object itemId) |
protected void |
doExpand(Object itemId) |
Object |
firstItemId() |
List<String> |
getChildren(Object itemId) |
com.vaadin.data.Property<?> |
getContainerProperty(Object itemId,
Object propertyId) |
Collection<String> |
getContainerPropertyIds() |
Object |
getIdByIndex(int index) |
com.vaadin.data.Item |
getItem(Object itemId) |
Collection<String> |
getItemIds() |
List<String> |
getItemIds(int startIndex,
int numberOfItems) |
String |
getParent(Object itemId) |
Class<?> |
getType(Object propertyId) |
boolean |
hasChildren(Object itemId) |
int |
indexOfId(Object itemId) |
boolean |
isCollapsed(Object itemId) |
boolean |
isFirstId(Object itemId) |
boolean |
isLastId(Object itemId) |
protected static boolean |
isOverriding(info.magnolia.resourceloader.layered.LayeredResource resource) |
boolean |
isRoot(Object itemId) |
Object |
lastItemId() |
static com.vaadin.data.Item |
newItem(info.magnolia.resourceloader.Resource resource) |
Object |
nextItemId(Object itemId) |
Object |
prevItemId(Object itemId) |
void |
refresh() |
boolean |
removeAllItems() |
boolean |
removeContainerProperty(Object propertyId) |
boolean |
removeItem(Object itemId) |
void |
removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
void |
removeListener(com.vaadin.data.Container.ItemSetChangeListener listener) |
Collection<String> |
rootItemIds() |
boolean |
setChildrenAllowed(Object itemId,
boolean areChildrenAllowed) |
void |
setClasspathResourcesFiltered(boolean classpathResourcesFiltered)
Sets whether or not classpath resources should be tentatively filtered based on their registered magnolia modules.
|
void |
setCollapsed(Object itemId,
boolean collapsed) |
boolean |
setParent(Object itemId,
Object newParentId) |
protected void |
showRootsOnly() |
int |
size() |
addListener, addPropertySetChangeListener, fireContainerPropertySetChange, fireContainerPropertySetChange, fireItemSetChange, fireItemSetChange, getItemSetChangeListeners, getListeners, getPropertySetChangeListeners, removeListener, removePropertySetChangeListener, setItemSetChangeListeners, setPropertySetChangeListeners
public static final Object RESOURCE_NAME
public static final String ORIGIN_NAME_PROPERTY_ID
public static final String CONTENT_PROPERTY_ID
public static final String OVERRIDING_PROPERTY_ID
public static final String RESOURCE_PATH
public static final String FORMAT_PROPERTY_ID
public static final String DIRECTORY_PROPERTY_ID
public static final String EDITABLE_PROPERTY_ID
public static final String ROOT_DIRECTORY
public void setClasspathResourcesFiltered(boolean classpathResourcesFiltered)
classpathResourcesFiltered
- setting this to true
only shows classpath resources whose top-level directory is a registered magnolia module;
setting this to false
shows classpath resources from all classpathUrls (still pre-filtered in ClasspathResourceOrigin).ClasspathResourceOrigin.excludedPackages()
public com.vaadin.data.Item getItem(Object itemId)
getItem
in interface com.vaadin.data.Container
public static com.vaadin.data.Item newItem(info.magnolia.resourceloader.Resource resource)
protected static boolean isOverriding(info.magnolia.resourceloader.layered.LayeredResource resource)
public Collection<String> getContainerPropertyIds()
getContainerPropertyIds
in interface com.vaadin.data.Container
public Collection<String> getItemIds()
getItemIds
in interface com.vaadin.data.Container
public com.vaadin.data.Property<?> getContainerProperty(Object itemId, Object propertyId)
getContainerProperty
in interface com.vaadin.data.Container
public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException
addContainerProperty
in interface com.vaadin.data.Container
UnsupportedOperationException
public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException
removeContainerProperty
in interface com.vaadin.data.Container
UnsupportedOperationException
public Class<?> getType(Object propertyId)
getType
in interface com.vaadin.data.Container
public int size()
size
in interface com.vaadin.data.Container
public boolean containsId(Object itemId)
containsId
in interface com.vaadin.data.Container
public Object nextItemId(Object itemId)
nextItemId
in interface com.vaadin.data.Container.Ordered
public Object prevItemId(Object itemId)
prevItemId
in interface com.vaadin.data.Container.Ordered
public Object firstItemId()
firstItemId
in interface com.vaadin.data.Container.Ordered
public Object lastItemId()
lastItemId
in interface com.vaadin.data.Container.Ordered
public boolean isFirstId(Object itemId)
isFirstId
in interface com.vaadin.data.Container.Ordered
public boolean isLastId(Object itemId)
isLastId
in interface com.vaadin.data.Container.Ordered
public int indexOfId(Object itemId)
indexOfId
in interface com.vaadin.data.Container.Indexed
public Object getIdByIndex(int index)
getIdByIndex
in interface com.vaadin.data.Container.Indexed
public List<String> getItemIds(int startIndex, int numberOfItems)
getItemIds
in interface com.vaadin.data.Container.Indexed
public List<String> getChildren(Object itemId)
getChildren
in interface com.vaadin.data.Container.Hierarchical
public String getParent(Object itemId)
getParent
in interface com.vaadin.data.Container.Hierarchical
public Collection<String> rootItemIds()
rootItemIds
in interface com.vaadin.data.Container.Hierarchical
public boolean areChildrenAllowed(Object itemId)
areChildrenAllowed
in interface com.vaadin.data.Container.Hierarchical
public boolean isRoot(Object itemId)
isRoot
in interface com.vaadin.data.Container.Hierarchical
public boolean hasChildren(Object itemId)
hasChildren
in interface com.vaadin.data.Container.Hierarchical
public void setCollapsed(Object itemId, boolean collapsed)
setCollapsed
in interface com.vaadin.data.Collapsible
protected void doExpand(Object itemId)
protected void doCollapse(Object itemId)
public boolean isCollapsed(Object itemId)
isCollapsed
in interface com.vaadin.data.Collapsible
protected void showRootsOnly()
public void refresh()
refresh
in interface info.magnolia.ui.workbench.container.Refreshable
public com.vaadin.data.Item addItem(Object itemId) throws UnsupportedOperationException
addItem
in interface com.vaadin.data.Container
UnsupportedOperationException
public Object addItem() throws UnsupportedOperationException
addItem
in interface com.vaadin.data.Container
UnsupportedOperationException
public boolean removeItem(Object itemId) throws UnsupportedOperationException
removeItem
in interface com.vaadin.data.Container
removeItem
in interface com.vaadin.data.Container.Hierarchical
UnsupportedOperationException
public boolean removeAllItems() throws UnsupportedOperationException
removeAllItems
in interface com.vaadin.data.Container
UnsupportedOperationException
public Object addItemAfter(Object previousItemId) throws UnsupportedOperationException
addItemAfter
in interface com.vaadin.data.Container.Ordered
UnsupportedOperationException
public com.vaadin.data.Item addItemAfter(Object previousItemId, Object newItemId) throws UnsupportedOperationException
addItemAfter
in interface com.vaadin.data.Container.Ordered
UnsupportedOperationException
public Object addItemAt(int index) throws UnsupportedOperationException
addItemAt
in interface com.vaadin.data.Container.Indexed
UnsupportedOperationException
public com.vaadin.data.Item addItemAt(int index, Object newItemId) throws UnsupportedOperationException
addItemAt
in interface com.vaadin.data.Container.Indexed
UnsupportedOperationException
public boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException
setParent
in interface com.vaadin.data.Container.Hierarchical
UnsupportedOperationException
public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException
setChildrenAllowed
in interface com.vaadin.data.Container.Hierarchical
UnsupportedOperationException
public void addItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
addItemSetChangeListener
in interface com.vaadin.data.Container.ItemSetChangeNotifier
addItemSetChangeListener
in class com.vaadin.data.util.AbstractContainer
public void addListener(com.vaadin.data.Container.ItemSetChangeListener listener)
addListener
in interface com.vaadin.data.Container.ItemSetChangeNotifier
addListener
in class com.vaadin.data.util.AbstractContainer
public void removeItemSetChangeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
removeItemSetChangeListener
in interface com.vaadin.data.Container.ItemSetChangeNotifier
removeItemSetChangeListener
in class com.vaadin.data.util.AbstractContainer
public void removeListener(com.vaadin.data.Container.ItemSetChangeListener listener)
removeListener
in interface com.vaadin.data.Container.ItemSetChangeNotifier
removeListener
in class com.vaadin.data.util.AbstractContainer
Copyright © 2016 Magnolia International Ltd.. All rights reserved.