summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin/data/util/FilesystemContainer.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/vaadin/data/util/FilesystemContainer.java')
-rw-r--r--src/com/vaadin/data/util/FilesystemContainer.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/com/vaadin/data/util/FilesystemContainer.java b/src/com/vaadin/data/util/FilesystemContainer.java
index 7100286712..cdfeb57e14 100644
--- a/src/com/vaadin/data/util/FilesystemContainer.java
+++ b/src/com/vaadin/data/util/FilesystemContainer.java
@@ -187,6 +187,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* @return <code>true</code> if the specified Item is a directory,
* <code>false</code> otherwise.
*/
+ @Override
public boolean areChildrenAllowed(Object itemId) {
return itemId instanceof File && ((File) itemId).canRead()
&& ((File) itemId).isDirectory();
@@ -197,6 +198,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* add a JavaDoc comment here, we use the default documentation from
* implemented interface.
*/
+ @Override
public Collection<File> getChildren(Object itemId) {
if (!(itemId instanceof File)) {
@@ -223,6 +225,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Gets the parent item of the specified Item. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
+ @Override
public Object getParent(Object itemId) {
if (!(itemId instanceof File)) {
@@ -235,6 +238,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Tests if the specified Item has any children. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
+ @Override
public boolean hasChildren(Object itemId) {
if (!(itemId instanceof File)) {
@@ -254,6 +258,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* JavaDoc comment here, we use the default documentation from implemented
* interface.
*/
+ @Override
public boolean isRoot(Object itemId) {
if (!(itemId instanceof File)) {
@@ -272,6 +277,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* comment here, we use the default documentation from implemented
* interface.
*/
+ @Override
public Collection<File> rootItemIds() {
File[] f;
@@ -311,6 +317,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* @throws UnsupportedOperationException
* if the setChildrenAllowed is not supported.
*/
+ @Override
public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed)
throws UnsupportedOperationException {
@@ -332,6 +339,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* @throws UnsupportedOperationException
* if the setParent is not supported.
*/
+ @Override
public boolean setParent(Object itemId, Object newParentId)
throws UnsupportedOperationException {
@@ -343,6 +351,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* comment here, we use the default documentation from implemented
* interface.
*/
+ @Override
public boolean containsId(Object itemId) {
if (!(itemId instanceof File)) {
@@ -371,6 +380,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Gets the specified Item from the filesystem. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
+ @Override
public Item getItem(Object itemId) {
if (!(itemId instanceof File)) {
@@ -416,6 +426,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Gets the IDs of Items in the filesystem. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
+ @Override
public Collection<File> getItemIds() {
if (recursive) {
@@ -459,6 +470,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* the property's ID.
* @return the requested property's value, or <code>null</code>
*/
+ @Override
public Property<?> getContainerProperty(Object itemId, Object propertyId) {
if (!(itemId instanceof File)) {
@@ -493,6 +505,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @return Unmodifiable collection containing all available file properties.
*/
+ @Override
public Collection<String> getContainerPropertyIds() {
return FILE_PROPERTIES;
}
@@ -506,6 +519,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* the ID of the property whose type is requested.
* @return data type of the requested property, or <code>null</code>
*/
+ @Override
public Class<?> getType(Object propertyId) {
if (propertyId.equals(PROPERTY_NAME)) {
@@ -556,6 +570,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @return Number of Items in the container.
*/
+ @Override
public int size() {
if (recursive) {
@@ -609,6 +624,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* Gets the specified property of this file. Don't add a JavaDoc comment
* here, we use the default documentation from implemented interface.
*/
+ @Override
public Property<?> getItemProperty(Object id) {
return getContainerProperty(file, id);
}
@@ -618,6 +634,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* JavaDoc comment here, we use the default documentation from
* implemented interface.
*/
+ @Override
public Collection<String> getItemPropertyIds() {
return getContainerPropertyIds();
}
@@ -716,6 +733,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see com.vaadin.data.Item#addItemProperty(Object, Property)
*/
+ @Override
public boolean addItemProperty(Object id, Property property)
throws UnsupportedOperationException {
throw new UnsupportedOperationException("Filesystem container "
@@ -727,6 +745,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see com.vaadin.data.Item#removeItemProperty(Object)
*/
+ @Override
public boolean removeItemProperty(Object id)
throws UnsupportedOperationException {
throw new UnsupportedOperationException(
@@ -763,6 +782,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see java.io.FilenameFilter#accept(File, String)
*/
+ @Override
public boolean accept(File dir, String name) {
if (name.endsWith(filter)) {
return true;
@@ -832,6 +852,7 @@ public class FilesystemContainer implements Container.Hierarchical {
* @see com.vaadin.data.Container#addContainerProperty(java.lang.Object,
* java.lang.Class, java.lang.Object)
*/
+ @Override
public boolean addContainerProperty(Object propertyId, Class<?> type,
Object defaultValue) throws UnsupportedOperationException {
throw new UnsupportedOperationException(
@@ -843,6 +864,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see com.vaadin.data.Container#addItem()
*/
+ @Override
public Object addItem() throws UnsupportedOperationException {
throw new UnsupportedOperationException(
"File system container does not support this operation");
@@ -853,6 +875,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see com.vaadin.data.Container#addItem(java.lang.Object)
*/
+ @Override
public Item addItem(Object itemId) throws UnsupportedOperationException {
throw new UnsupportedOperationException(
"File system container does not support this operation");
@@ -863,6 +886,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see com.vaadin.data.Container#removeAllItems()
*/
+ @Override
public boolean removeAllItems() throws UnsupportedOperationException {
throw new UnsupportedOperationException(
"File system container does not support this operation");
@@ -873,6 +897,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see com.vaadin.data.Container#removeItem(java.lang.Object)
*/
+ @Override
public boolean removeItem(Object itemId)
throws UnsupportedOperationException {
throw new UnsupportedOperationException(
@@ -884,6 +909,7 @@ public class FilesystemContainer implements Container.Hierarchical {
*
* @see com.vaadin.data.Container#removeContainerProperty(java.lang.Object )
*/
+ @Override
public boolean removeContainerProperty(Object propertyId)
throws UnsupportedOperationException {
throw new UnsupportedOperationException(