public interface ViewService
Modifier and Type | Method and Description |
---|---|
View |
createViewStub(String viewName)
Creates a View - a "stub" that holds the view name and allows retrieval of the view definition.
|
boolean |
deleteView(String viewName)
Deletes a view identified by
viewName from the UCMDB. |
ViewResult |
executeView(String viewName)
Executes a view identified in the UCMDB by the view name and returns the result.
|
ViewResult |
executeView(String viewName,
ViewExecutionOptions options)
Executes a view identified in the UCMDB by the view name and returns the result.
|
ViewResult |
executeView(View view)
Executes the given view and returns the result.
|
ViewResult |
executeView(View view,
ViewExecutionOptions options)
Executes the given view and returns the result.
|
ViewResult |
executeViewDefinition(ViewDefinition viewDefinition,
ExecutableQuery query)
Executes the given view definition and returns the result.
|
ViewResult |
executeViewDefinition(ViewDefinition viewDefinition,
ExecutableQuery query,
ViewExecutionOptions options)
Executes the given view definition and returns the result.
|
Map<String,Collection<String>> |
getAllViewsBundleNames()
Returns a map between each view name to a collection of its bundles.
|
Map<String,Collection<String>> |
getBundleNamesToViews()
Returns a map between each bundle name that contains views to a collection of its bundled views.
|
Map<String,Collection<String>> |
getBundleNamesToViewsWithoutPermission(Collection<String> bundleNames)
Returns a map from name of bundle to the collection of its bundled without permissions.
|
ViewFactory |
getFactory() |
FoldersManagementSubService<ViewFolder,View> |
getViewsFoldersSubService()
Returns the sub service regarding folder management.
|
ViewFolder |
getViewTree()
Queries the whole views tree organized in folder structure.
|
Set<String> |
hasChanges(Map<String,ViewResultVersion> views2check)
Returns a set of view names for which: the results of the query under it were changed since
the result version was created, the view definition creating it was changed,
or the query definition under it was changed.
|
boolean |
hasChanges(String viewName,
String viewResultVersionAsString)
Same as
hasChanges(String, ViewResultVersion) , but accepts the result of {ViewResultVersion#asString()}. |
boolean |
hasChanges(String viewName,
ViewResultVersion viewResultVersion)
Returns true if the results of the query under the given view were changed since the result version was created, if
the view definition creating this view was changed, or if the query definition under the view definition was changed.
|
String |
registerViewDependenciesChangeListener(ViewDependenciesChangeListener listener,
ViewManagementListenerFilter filter)
Registers a listener to be called when a change occurs in view dependencies
|
String |
registerViewManagementListener(ViewManagementListener listener,
ViewManagementListenerFilter filter)
Registers a listener to be called when view management change occurs.
|
void |
saveView(ViewDefinition viewDefinition)
Saves the view definition to the server, updating an existing view by the same name if such exists.
|
ViewDefinition |
stringToViewDefinition(String str)
Given a string created by
viewDefinitionToString(com.hp.ucmdb.api.view.ViewDefinition) , this methods returns a copy of the original
ViewDefinition. |
void |
unregisterViewDependenciesChangeListener(String listenerId)
Unregisters the specified view dependencies change listener.
|
void |
unregisterViewManagementListener(String listenerId)
Unregisters the specified view management listener.
|
void |
validateBulk(ViewValidationBulk bulk) |
String |
viewDefinitionToString(ViewDefinition viewDefinition)
Given a
ViewDefinition this method returns the view's string representation. |
DependsOnView |
whoDependsOn(String viewName) |
ViewFactory getFactory()
View createViewStub(String viewName)
View
for details.ViewFolder getViewTree()
ViewResult executeView(String viewName)
ViewExecutionOptions
for details.ViewResult executeView(String viewName, ViewExecutionOptions options)
@NotFinalAPI ViewResult executeView(View view)
ViewExecutionOptions
for details.@NotFinalAPI ViewResult executeView(View view, ViewExecutionOptions options)
@NotFinalAPI ViewResult executeViewDefinition(ViewDefinition viewDefinition, ExecutableQuery query)
ViewExecutionOptions
for details.
If a PerspectiveBasedViewReferenceDefinition is passed, the specified
ExecutableQuery is ignored.@NotFinalAPI ViewResult executeViewDefinition(ViewDefinition viewDefinition, ExecutableQuery query, ViewExecutionOptions options)
@NotFinalAPI void saveView(ViewDefinition viewDefinition)
viewDefinition
- the definition to save.@NotFinalAPI boolean deleteView(String viewName)
viewName
from the UCMDB.
If the view is a perspective based view, the entire (auto-generated) perspective instances hierarhcy is deleted.
@NotFinalAPI FoldersManagementSubService<ViewFolder,View> getViewsFoldersSubService()
@NotFinalAPI Map<String,Collection<String>> getBundleNamesToViews()
@NotFinalAPI Map<String,Collection<String>> getBundleNamesToViewsWithoutPermission(Collection<String> bundleNames)
@NotFinalAPI Map<String,Collection<String>> getAllViewsBundleNames()
@NotFinalAPI String registerViewManagementListener(ViewManagementListener listener, ViewManagementListenerFilter filter)
listener
- a listener to be called when a view management change occursfilter
- filters view management changes@NotFinalAPI void unregisterViewManagementListener(String listenerId)
listenerId
- registration ID of the listener@NotFinalAPI String registerViewDependenciesChangeListener(ViewDependenciesChangeListener listener, ViewManagementListenerFilter filter)
listener
- a listener to be called when a view management change occursfilter
- filters the changes by name and/or bundles of a root view (dependent)@NotFinalAPI void unregisterViewDependenciesChangeListener(String listenerId)
listenerId
- registration ID of the listener@NotFinalAPI boolean hasChanges(String viewName, ViewResultVersion viewResultVersion)
TopologyQueryService.hasChanges(java.lang.String, com.hp.ucmdb.api.topology.QueryResultVersion)
However, this method:
TopologyQueryService.hasChanges
apply to this method.viewName
- the view whose query is to be checked.viewResultVersion
- the version to check changes from.@NotFinalAPI Set<String> hasChanges(Map<String,ViewResultVersion> views2check)
TopologyQueryService.hasChanges
apply to this method.views2check
- view names whose query is to be checked.@NotFinalAPI boolean hasChanges(String viewName, String viewResultVersionAsString)
hasChanges(String, ViewResultVersion)
, but accepts the result of {ViewResultVersion#asString()}.viewName
- the view whose query is to be checked.viewResultVersionAsString
- the asString() result of the version to check changes from.hasChanges(String, ViewResultVersion)
@NotFinalAPI DependsOnView whoDependsOn(String viewName)
@NotFinalAPI void validateBulk(ViewValidationBulk bulk)
String viewDefinitionToString(ViewDefinition viewDefinition) throws UcmdbException
ViewDefinition
this method returns the view's string representation.
The conversion from ViewDefinition
to string is done in the
server, requiring a server request.
This string representation is not guaranteed to be version compatible and should not be serialized
for long term storage.viewDefinition
- - the view definition to convertUcmdbException
ViewDefinition stringToViewDefinition(String str) throws UcmdbException
viewDefinitionToString(com.hp.ucmdb.api.view.ViewDefinition)
, this methods returns a copy of the original
ViewDefinition.
The actual conversion from string to ViewDefinition
is done
in the server, requiring a server request.str
- - view's string representationUcmdbException
Documentation Feedback
Copyright 2011 - 2018 Micro Focus or one of its affiliates.