Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.webapp.querymodel
Class QueryModelActionsBean

java.lang.Object
  extended by org.nuxeo.ecm.webapp.querymodel.QueryModelActionsBean
All Implemented Interfaces:
Serializable, ResultsProviderFarm, QueryModelActions

Deprecated. since 5.4: use ContentViewActions instead

@Scope(value=CONVERSATION)
@Name(value="queryModelActions")
@Deprecated
public class QueryModelActionsBean
extends Object
implements QueryModelActions, Serializable

See Also:
Serialized Form

Constructor Summary
QueryModelActionsBean()
          Deprecated.  
 
Method Summary
 void destroy()
          Deprecated.  
 QueryModel get(String queryModelName)
          Deprecated. Obtain a scoped instance of QueryModel.
 PagedDocumentsProvider getResultsProvider(String queryModelName)
          Deprecated. Makes a new, fresh instance of the named results provider.
 PagedDocumentsProvider getResultsProvider(String queryModelName, SortInfo sortInfo)
          Deprecated.  
 boolean isInitialized()
          Deprecated.  
 boolean isPersisted(String queryModelName)
          Deprecated. Tell if the DocumentModel behind the specified QueryModel has been persisted in Nuxeo Core.
 QueryModel load(String queryModelName, DocumentRef ref)
          Deprecated. Load a stateful QueryModel from the specified DocumentRef.
 QueryModel persist(String queryModelName, String parentPath, String name)
          Deprecated. Save the specified stateful QueryModel.
 QueryModel persist(String queryModelName, String parentPath, String name, boolean saveSession)
          Deprecated. Save the specified stateful QueryModel.
 void queryModelChanged(QueryModel qm)
          Deprecated. Observer on Seam event to perform some necessary invalidations
 void reset(String queryModelName)
          Deprecated. Reset the specified QueryModel.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryModelActionsBean

public QueryModelActionsBean()
Deprecated. 
Method Detail

isInitialized

public boolean isInitialized()
Deprecated. 
Specified by:
isInitialized in interface QueryModelActions

get

public QueryModel get(String queryModelName)
               throws ClientException
Deprecated. 
Description copied from interface: QueryModelActions
Obtain a scoped instance of QueryModel.

Specified by:
get in interface QueryModelActions
Throws:
ClientException

getResultsProvider

public PagedDocumentsProvider getResultsProvider(String queryModelName)
                                          throws ClientException,
                                                 ResultsProviderFarmUserException
Deprecated. 
Description copied from interface: ResultsProviderFarm
Makes a new, fresh instance of the named results provider.

Specified by:
getResultsProvider in interface ResultsProviderFarm
Parameters:
queryModelName - the name of the ResultsProvider instance to create
Returns:
a PagedDocumentsProvider
Throws:
ClientException
ResultsProviderFarmUserException

getResultsProvider

public PagedDocumentsProvider getResultsProvider(String queryModelName,
                                                 SortInfo sortInfo)
                                          throws ClientException,
                                                 ResultsProviderFarmUserException
Deprecated. 
Specified by:
getResultsProvider in interface ResultsProviderFarm
Parameters:
queryModelName - the name of the ResultsProvider instance to create
sortInfo - an object containing the sort details
Throws:
ClientException
ResultsProviderFarmUserException

queryModelChanged

@Observer(value="queryModelChanged")
public void queryModelChanged(QueryModel qm)
Deprecated. 
Description copied from interface: QueryModelActions
Observer on Seam event to perform some necessary invalidations

Specified by:
queryModelChanged in interface QueryModelActions
Parameters:
qm - the query model that's been changed

reset

public void reset(String queryModelName)
           throws ClientException
Deprecated. 
Description copied from interface: QueryModelActions
Reset the specified QueryModel.

Start over with a fresh, transient DocumentModel instance.

Specified by:
reset in interface QueryModelActions
Throws:
ClientException

destroy

public void destroy()
Deprecated. 

isPersisted

public boolean isPersisted(String queryModelName)
                    throws ClientException
Deprecated. 
Description copied from interface: QueryModelActions
Tell if the DocumentModel behind the specified QueryModel has been persisted in Nuxeo Core.

Specified by:
isPersisted in interface QueryModelActions
Parameters:
queryModelName - The query model name
Throws:
ClientException

load

public QueryModel load(String queryModelName,
                       DocumentRef ref)
                throws ClientException
Deprecated. 
Description copied from interface: QueryModelActions
Load a stateful QueryModel from the specified DocumentRef.

The queryModelChanged event is thrown, meaning in particular that ResultsProviderCache invalidation is performed.

Specified by:
load in interface QueryModelActions
Returns:
The loaded QueryModel instance.
Throws:
ClientException - if qm is not stateful, document could not be retrieved.

persist

public QueryModel persist(String queryModelName,
                          String parentPath,
                          String name)
                   throws ClientException
Deprecated. 
Description copied from interface: QueryModelActions
Save the specified stateful QueryModel.

This is equivalent to the other signature, with saveSession set to True

Specified by:
persist in interface QueryModelActions
parentPath - The path of parent folder to save into
name - The local name to use.
Returns:
The saved query model.
Throws:
ClientException - forwarding from the Core, stateless QueryModel, if QueryModel has already been persisted

persist

public QueryModel persist(String queryModelName,
                          String parentPath,
                          String name,
                          boolean saveSession)
                   throws ClientException
Deprecated. 
Description copied from interface: QueryModelActions
Save the specified stateful QueryModel.

The DocumentModel instance that backs the QueryModel is saved in the CoreSession available in Seam's context. Necessary updates are performed. The returned QueryModel instance is identical to the one obtained by a subsequent call to get.

Further document operations, e.g., modifications, for this QueryModel can be done on the DocumentModel instance directly, but CoreSession methods returning a new DocumentModel instance must be followed by a call to load and dependent objects (page providers, etc.) must be updated as well.

It is not possible to call again this method on the same QueryModel, to avoid consistency problems at the DocumentModel level. Therefore If one wants to save a QueryModel, then change and eventually save it to a different target in Nuxeo Core, one must call the reset method before performing the changes.

Specified by:
persist in interface QueryModelActions
parentPath - The path of parent folder to save into
name - The local name to use.
saveSession - if true, the Core Session is saved
Returns:
The saved query model.
Throws:
ClientException - forwarding from the Core, stateless QueryModel, if QueryModel has already been persisted

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.