public class ViewServiceHelper extends Object
Constructor and Description |
---|
ViewServiceHelper() |
Modifier and Type | Method and Description |
---|---|
protected static void |
addMergeViews(List<ViewSpec> specifications)
Add merge views for any views in the chain requiring a merge (group view).
|
static Set<String> |
getUniqueCandidateProperties(List<ViewFactory> viewFactory,
Annotation[] annotations) |
static List<View> |
instantiateChain(Viewable parentViewable,
List<ViewFactory> viewFactories,
AgentInstanceViewFactoryChainContext viewFactoryChainContext)
Instantiate a chain of views.
|
static List<ViewFactory> |
instantiateFactories(int streamNum,
List<ViewSpec> viewSpecList,
StatementContext statementContext,
boolean isSubquery,
int subqueryNumber)
Given a list of view specifications obtained from by parsing this method instantiates a list of view factories.
|
protected static Pair<Viewable,List<View>> |
matchExistingViews(Viewable rootViewable,
List<ViewFactory> viewFactories,
AgentInstanceContext agentInstanceContext)
Match the views under the stream to the list of view specications passed in.
|
protected static List<View> |
removeChainLeafView(Viewable parentViewable,
Viewable viewToRemove)
Removes a view from a parent view returning the orphaned parent views in a list.
|
static void |
removeFirstUnsharedView(List<View> childViews) |
public static Set<String> getUniqueCandidateProperties(List<ViewFactory> viewFactory, Annotation[] annotations)
protected static void addMergeViews(List<ViewSpec> specifications) throws ViewProcessingException
specifications
- is a list of view definitions defining the chain of views.ViewProcessingException
- indicating that the view chain configuration is invalidpublic static List<View> instantiateChain(Viewable parentViewable, List<ViewFactory> viewFactories, AgentInstanceViewFactoryChainContext viewFactoryChainContext)
parentViewable
- - parent view to add the chain toviewFactories
- - is the view factories to use to make each view, or reuse and existing viewviewFactoryChainContext
- contextprotected static List<View> removeChainLeafView(Viewable parentViewable, Viewable viewToRemove)
parentViewable
- - parent to remove view fromviewToRemove
- - view to removeprotected static Pair<Viewable,List<View>> matchExistingViews(Viewable rootViewable, List<ViewFactory> viewFactories, AgentInstanceContext agentInstanceContext)
rootViewable
- is the top rootViewable event stream to which all views are attached as child views
This parameter is changed by this method, ie. specifications are removed if they match existing views.viewFactories
- is the view specifications for making viewsagentInstanceContext
- agent instance contextpublic static List<ViewFactory> instantiateFactories(int streamNum, List<ViewSpec> viewSpecList, StatementContext statementContext, boolean isSubquery, int subqueryNumber) throws ViewProcessingException
streamNum
- is the stream numberviewSpecList
- is the view definitionstatementContext
- is statement service context and statement infoisSubquery
- subquery indicatorsubqueryNumber
- for subqueriesViewProcessingException
- if the factory cannot be creates such as for invalid view spec