public class AbstractViewRepository extends java.lang.Object implements ViewRepository
ViewRepository
. Contains methods to store View
objects and deploy
them from XML. NAME
Constructor and Description |
---|
AbstractViewRepository() |
Modifier and Type | Method and Description |
---|---|
View |
deployView(org.dom4j.Element rootElem,
org.dom4j.Element viewElem) |
void |
deployViews(java.io.InputStream xml) |
void |
deployViews(java.io.Reader xml) |
void |
deployViews(java.lang.String resourceUrl) |
View |
findView(MetaClass metaClass,
java.lang.String name)
Searches for a View for an entity
|
java.util.List<View> |
getAll() |
View |
getView(java.lang.Class<? extends Entity> entityClass,
java.lang.String name)
Get View for an entity.
|
View |
getView(MetaClass metaClass,
java.lang.String name)
Get View for an entity.
|
java.util.Collection<java.lang.String> |
getViewNames(java.lang.Class<? extends Entity> entityClass)
Returns names of views defined for the entityClass
|
java.util.Collection<java.lang.String> |
getViewNames(MetaClass metaClass)
Returns names of views defined for the metaClass
|
void |
reset() |
public void reset()
public View getView(java.lang.Class<? extends Entity> entityClass, java.lang.String name)
getView
in interface ViewRepository
entityClass
- entity classname
- view nameViewNotFoundException
if not found.public View getView(MetaClass metaClass, java.lang.String name)
getView
in interface ViewRepository
metaClass
- entity classname
- view nameViewNotFoundException
if not found.@Nullable public View findView(MetaClass metaClass, @Nullable java.lang.String name)
findView
in interface ViewRepository
metaClass
- entity classname
- view namepublic java.util.Collection<java.lang.String> getViewNames(MetaClass metaClass)
ViewRepository
getViewNames
in interface ViewRepository
metaClass
- entity classpublic java.util.Collection<java.lang.String> getViewNames(java.lang.Class<? extends Entity> entityClass)
ViewRepository
getViewNames
in interface ViewRepository
entityClass
- entity classpublic void deployViews(java.lang.String resourceUrl)
public void deployViews(java.io.InputStream xml)
public void deployViews(java.io.Reader xml)
public View deployView(org.dom4j.Element rootElem, org.dom4j.Element viewElem)
public java.util.List<View> getAll()