public class ViewRegistry extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
LOG
The logger.
|
Modifier and Type | Method and Description |
---|---|
void |
addDefinition(ViewEntity definition)
Add a view definition to the registry.
|
void |
addInstanceDefinition(ViewEntity definition,
ViewInstanceEntity instanceDefinition)
Add an instance definition for the given view definition.
|
protected void |
clear()
Clear the registry.
|
ViewEntity |
getDefinition(String viewName)
Get a view definition for the given name.
|
Collection<ViewEntity> |
getDefinitions()
Get the collection of all the view definitions.
|
static ViewRegistry |
getInstance()
Get the view registry singleton.
|
ViewInstanceEntity |
getInstanceDefinition(String viewName,
String instanceName)
Get the instance definition for the given view nam,e and instance name.
|
Collection<ViewInstanceEntity> |
getInstanceDefinitions(ViewEntity definition)
Get the collection of view instances for the given view definition.
|
Set<SubResourceDefinition> |
getSubResourceDefinitions(String viewName)
Get the sub-resource definitions for the given view name.
|
org.eclipse.jetty.webapp.WebAppContext |
getWebAppContext(ViewInstanceEntity viewInstanceDefinition)
Get a WebAppContext for the given view instance.
|
static void |
init(ViewDAO vDAO,
ViewInstanceDAO iDAO)
Static initialization of DAO.
|
void |
installViewInstance(ViewInstanceEntity instanceEntity)
Install a view instance for the view with the given view name.
|
Set<ViewInstanceEntity> |
readViewArchives(Configuration configuration)
Read the view archives.
|
void |
removeInstanceDefinition(ViewEntity definition,
String instanceName)
Remove an instance definition for the given view definition.
|
void |
uninstallViewInstance(ViewInstanceEntity instanceEntity)
Uninstall a view instance for the view with the given view name.
|
void |
updateViewInstance(ViewInstanceEntity instanceEntity)
Update a view instance for the view with the given view name.
|
@Inject public static void init(ViewDAO vDAO, ViewInstanceDAO iDAO)
vDAO
- view data access objectiDAO
- view instance data access objectpublic Collection<ViewEntity> getDefinitions()
public ViewEntity getDefinition(String viewName)
viewName
- the view namepublic void addDefinition(ViewEntity definition)
definition
- the definitionpublic Collection<ViewInstanceEntity> getInstanceDefinitions(ViewEntity definition)
definition
- the view definitionpublic ViewInstanceEntity getInstanceDefinition(String viewName, String instanceName)
viewName
- the view nameinstanceName
- the instance namepublic void addInstanceDefinition(ViewEntity definition, ViewInstanceEntity instanceDefinition)
definition
- the owning view definitioninstanceDefinition
- the instance definitionpublic void removeInstanceDefinition(ViewEntity definition, String instanceName)
definition
- the owning view definitioninstanceName
- the instance namepublic static ViewRegistry getInstance()
public Set<SubResourceDefinition> getSubResourceDefinitions(String viewName)
viewName
- the instance namepublic Set<ViewInstanceEntity> readViewArchives(Configuration configuration)
configuration
- Ambari configurationpublic void installViewInstance(ViewInstanceEntity instanceEntity)
instanceEntity
- the view instance entitypublic void updateViewInstance(ViewInstanceEntity instanceEntity)
instanceEntity
- the view instance entitypublic void uninstallViewInstance(ViewInstanceEntity instanceEntity)
instanceEntity
- the view instance entitypublic org.eclipse.jetty.webapp.WebAppContext getWebAppContext(ViewInstanceEntity viewInstanceDefinition)
viewInstanceDefinition
- the view instance definitionprotected void clear()
Copyright © 2016. All rights reserved.