Views
Purpose¶
Call and list views.
Methods¶
Binding name: p6.view
Method: List<String> listAll()
Returns all view names.
Note
If the item is related to an application, the name will be appkey.name
Method: List<String> list([String appKey])
Returns all the view names of an application. If no appKey is given or empty, only unbundled views are listed
Method: String get(String viewName [, String appKey])
Returns the xml definition of a view.
Method: void update(String viewName [, String appKey], String viewXml)
Update the xml definition of a view.
Method: String updateIndexes(String viewName [, String appKey])
Start the indexation job for the view. A P6Exception is thrown if the job is already running for this view.
Note
The views are cached in the Transaction service and cleared after restarting. To restart the platform6.views
and platform6.transactions
services take a look to the Service DSL
Examples¶
def view = p6.view.get("myView");
p6.view.update("myView", view.replaceAll("Fee", "Foo"));
p6.view.reindex("myView");