org.entityfs
Interface ViewCapable<T extends EntityView>

All Known Subinterfaces:
Directory, DirectoryView, EntityAcceptingEntity<T>, EntityAcceptingEntityView<T>

public interface ViewCapable<T extends EntityView>

This interface is implemented by the entity and entity view types that are capable of creating filtered views of themselves.

Since:
1.0
Author:
Karl Gustafsson

Method Summary
 Filter<? super EntityView> getFilter()
          Get the filter that is used to create this view.
 boolean hasFilters()
          Does this view have any filters?
 T newView(Filter<? super EntityView> f)
          Create a new, connected view on this entity or entity view.
 

Method Detail

newView

T newView(Filter<? super EntityView> f)
Create a new, connected view on this entity or entity view.

Parameters:
f - The filter that determines which child entities will be visible in the view.
Returns:
A new view on this entity or entity view. The type of the object returned is determined by the type of the entity viewed. A view for a Directory is a DirectoryView, for instance.
Locks_required:
None
Permissions_required:
None

getFilter

Filter<? super EntityView> getFilter()
Get the filter that is used to create this view. If this is called on an entity, this method returns null.

Returns:
The filter used to create this view, or null if this is called on an entity.
Locks_required:
None
Permissions_required:
None

hasFilters

boolean hasFilters()
Does this view have any filters?

Returns:
true if this view has any filters, or false if this method is called on an entity object.
Locks_required:
None
Permissions_required:
None