Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.ui.web.api
Interface NavigationContext

All Known Implementing Classes:
NavigationContextBean

public interface NavigationContext

Stateful Seam component.

This Seam component should ideally serve only DocumentModel, lists of DMs and Trees of DMs: no UI related structure.


Method Summary
 DocumentModel factoryChangeableDocument()
          Gets current document for edition.
 DocumentModel factoryCurrentContentRoot()
          Gets the currentContentRootWorkspace and puts it in Page context.
 DocumentModel factoryCurrentDocument()
          Gets the currentDocument and puts it in Page context.
 DocumentModelList factoryCurrentDocumentChildren()
          Gets children of currentDocuments and put it in Page context.
 DocumentModel factoryCurrentDomain()
          Gets the currentDomain and puts it in Page context.
 RepositoryLocation factoryCurrentServerLocation()
          Gets the current ServerLocation and puts it in Page Context.
 DocumentModel factoryCurrentSuperSpace()
          Gets the currentSuperSpace and puts it in Page context.
 DocumentModel factoryCurrentWorkspace()
          Gets the currentWorkspace and puts it in Page context.
 String getActionResult(DocumentModel doc, UserAction action)
          Performs context updates and returns the view associated with the document and action passed.
 DocumentModel getChangeableDocument()
          This is used for documents about to be created, which are not yet persisted thus not all their fields might be valid (like its reference).
 DocumentModel getCurrentContentRoot()
          Gets the current Content Root (Workspaces, Sections, Templates...).
 DocumentModel getCurrentDocument()
          Current Document other than Domain or Workspace.
 DocumentModelList getCurrentDocumentChildren()
          Deprecated. this method is not scalable, all the documents will be in memory
 DocumentModelList getCurrentDocumentChildrenPage()
           
 String getCurrentDocumentFullUrl()
           
 String getCurrentDocumentUrl()
           
 DocumentModel getCurrentDomain()
          Current Domain, if user has read permission on it.
 String getCurrentDomainPath()
          Finds the path to current domain.
 DocumentModelList getCurrentPath()
          Returns a list of the DocumentsModels (to build the BreadCrumb for example).
 List<PathElement> getCurrentPathList()
           
 RepositoryLocation getCurrentServerLocation()
           
 DocumentModel getCurrentSuperSpace()
          Returns the currentSuperSpace (Section, Workspace...).
 DocumentModel getCurrentWorkspace()
          Gets the current Workspace.
 CoreSession getOrCreateDocumentManager()
          Returns the current documentManager if any or create a new session to the currently selected repository location.
 RepositoryLocation getSelectedServerLocation()
          Deprecated. use getCurrentServerLocation instead
 String goBack()
           
 String goHome()
          go to the root server, the root document or to the dashboard if the latest document are not accessible.
 void init()
          Callback for component initialization.
 void invalidateChildrenProvider()
          Invalidates children provider (temporarily).
 void invalidateCurrentDocument()
          Will trigger reloading of current document data from the server.
 String navigateTo(RepositoryLocation serverLocation, DocumentRef docRef)
          Initializes the context for the given refs and returns the default view for the doc.
 String navigateToDocument(DocumentModel doc)
          Updates the context and returns the view for the given document.
 String navigateToDocument(DocumentModel doc, String viewId)
          Initializes the context for the given doc and returns its given view.
 String navigateToDocument(DocumentModel docModel, VersionModel versionModel)
           
 String navigateToDocumentWithView(DocumentModel doc, String viewId)
          Initializes the context for the given doc and returns its given view.
 String navigateToId(String documentId)
          Updates the context and returns the view for the given document id.
 String navigateToRef(DocumentRef docRef)
          Updates the context and returns the view for the given document ref.
 String navigateToURL()
          Initializes the context for the given refs and returns the default view for the doc.
 String navigateToURL(String documentUrl)
          Initializes the context for the given refs and returns the default view for the doc.
 void resetCurrentContext()
          Resets all context variables.
 void saveCurrentDocument()
          Saves the current copy of the document to server.
 void selectionChanged()
           
 void setChangeableDocument(DocumentModel changeableDocument)
           
 void setCurrentContentRoot(DocumentModel currentContentRoot)
          Sets the current ContentRoot.
 void setCurrentDocument(DocumentModel documentModel)
           
 void setCurrentDomain(DocumentModel currentDomain)
           
 void setCurrentServerLocation(RepositoryLocation serverLocation)
          Switch to a new server location by updating the context and updating to the CoreSession (aka the 'documentManager' Seam component).
 void updateDocumentContext(DocumentModel doc)
          Updates the current document in the (session) context and resets the other common structures (breadcrumbs, etc).
 

Method Detail

init

void init()
Callback for component initialization.


getCurrentServerLocation

RepositoryLocation getCurrentServerLocation()
Returns:
current repository location or null if no server is connected

getSelectedServerLocation

@Deprecated
RepositoryLocation getSelectedServerLocation()
Deprecated. use getCurrentServerLocation instead

Returns:
current selected repository location or null

getCurrentDomain

DocumentModel getCurrentDomain()
Current Domain, if user has read permission on it. Use

Returns:
the current domain.

getCurrentDomainPath

String getCurrentDomainPath()
                            throws ClientException
Finds the path to current domain.

This method tries hard to always returns an answer. If no current domain has been selected, then it will choose one.

Returns:
the path
Throws:
ClientException

setCurrentDomain

void setCurrentDomain(DocumentModel currentDomain)
                      throws ClientException
Throws:
ClientException

getCurrentDocument

DocumentModel getCurrentDocument()
Current Document other than Domain or Workspace.


getCurrentSuperSpace

DocumentModel getCurrentSuperSpace()
                                   throws ClientException
Returns the currentSuperSpace (Section, Workspace...). Uses SuperSpace facet for that.

Throws:
ClientException

setCurrentDocument

void setCurrentDocument(DocumentModel documentModel)
                        throws ClientException
Throws:
ClientException

getChangeableDocument

DocumentModel getChangeableDocument()
This is used for documents about to be created, which are not yet persisted thus not all their fields might be valid (like its reference).


setChangeableDocument

void setChangeableDocument(DocumentModel changeableDocument)

saveCurrentDocument

void saveCurrentDocument()
                         throws ClientException
Saves the current copy of the document to server.

Throws:
ClientException

getCurrentDocumentChildren

@Deprecated
DocumentModelList getCurrentDocumentChildren()
                                             throws ClientException
Deprecated. this method is not scalable, all the documents will be in memory

Retrieves the documents contained in the current parent.

Throws:
ClientException

getCurrentDocumentChildrenPage

DocumentModelList getCurrentDocumentChildrenPage()
                                                 throws ClientException
Returns:
list of children for the current document composing the current page
Throws:
ClientException

getCurrentPathList

List<PathElement> getCurrentPathList()
                                     throws ClientException
Throws:
ClientException

getCurrentPath

DocumentModelList getCurrentPath()
                                 throws ClientException
Returns a list of the DocumentsModels (to build the BreadCrumb for example).

Throws:
ClientException

getCurrentDocumentUrl

String getCurrentDocumentUrl()
Returns:
the URL that can be used to refer the current document from outside current context

getCurrentDocumentFullUrl

String getCurrentDocumentFullUrl()
Returns:
the URL that can be used to refer the current document from outside current context

updateDocumentContext

void updateDocumentContext(DocumentModel doc)
                           throws ClientException
Updates the current document in the (session) context and resets the other common structures (breadcrumbs, etc).

Parameters:
doc - DocumentModel that will be set as current document
Throws:
ClientException

resetCurrentContext

void resetCurrentContext()
Resets all context variables.


getActionResult

String getActionResult(DocumentModel doc,
                       UserAction action)
                       throws ClientException
Performs context updates and returns the view associated with the document and action passed.

Returns:
document view associated with the result
Throws:
ClientException

goHome

String goHome()
go to the root server, the root document or to the dashboard if the latest document are not accessible.


goBack

String goBack()
              throws ClientException
Throws:
ClientException

navigateToId

String navigateToId(String documentId)
                    throws ClientException
Updates the context and returns the view for the given document id.

Throws:
ClientException

navigateToRef

String navigateToRef(DocumentRef docRef)
                     throws ClientException
Updates the context and returns the view for the given document ref.

Throws:
ClientException

navigateToDocument

String navigateToDocument(DocumentModel doc)
                          throws ClientException
Updates the context and returns the view for the given document.

Throws:
ClientException

navigateToDocument

String navigateToDocument(DocumentModel doc,
                          String viewId)
                          throws ClientException
Initializes the context for the given doc and returns its given view.

If view is not found, use default view.

Parameters:
doc -
viewId - for the document as defined in its type
Returns:
navigation view for the document
Throws:
ClientException

navigateToDocumentWithView

String navigateToDocumentWithView(DocumentModel doc,
                                  String viewId)
                                  throws ClientException
Initializes the context for the given doc and returns its given view.

If view is not found, use default view. Alias to resolve polymorphism ambiguity when called from JSF EL.

Parameters:
doc -
viewId - for the document as defined in its type
Returns:
navigation view for the document
Throws:
ClientException

navigateTo

String navigateTo(RepositoryLocation serverLocation,
                  DocumentRef docRef)
                  throws ClientException
Initializes the context for the given refs and returns the default view for the doc.

Throws:
ClientException

navigateToURL

String navigateToURL(String documentUrl)
                     throws ClientException
Initializes the context for the given refs and returns the default view for the doc.

Throws:
ClientException

navigateToURL

String navigateToURL()
                     throws ClientException
Initializes the context for the given refs and returns the default view for the doc.

Takes parameter String docRef from the Request.

Throws:
ClientException

selectionChanged

void selectionChanged()

setCurrentServerLocation

void setCurrentServerLocation(RepositoryLocation serverLocation)
                              throws ClientException
Switch to a new server location by updating the context and updating to the CoreSession (aka the 'documentManager' Seam component).

Parameters:
serverLocation - new server location to connect to
Throws:
ClientException

getOrCreateDocumentManager

CoreSession getOrCreateDocumentManager()
                                       throws ClientException
Returns the current documentManager if any or create a new session to the currently selected repository location.

Throws:
ClientException

navigateToDocument

String navigateToDocument(DocumentModel docModel,
                          VersionModel versionModel)
                          throws ClientException
Throws:
ClientException

factoryCurrentDocument

DocumentModel factoryCurrentDocument()
Gets the currentDocument and puts it in Page context.


factoryCurrentDomain

DocumentModel factoryCurrentDomain()
Gets the currentDomain and puts it in Page context.


factoryCurrentWorkspace

DocumentModel factoryCurrentWorkspace()
Gets the currentWorkspace and puts it in Page context.


factoryCurrentSuperSpace

DocumentModel factoryCurrentSuperSpace()
                                       throws ClientException
Gets the currentSuperSpace and puts it in Page context.

Throws:
ClientException

factoryCurrentContentRoot

DocumentModel factoryCurrentContentRoot()
Gets the currentContentRootWorkspace and puts it in Page context.


factoryCurrentServerLocation

RepositoryLocation factoryCurrentServerLocation()
Gets the current ServerLocation and puts it in Page Context.


factoryCurrentDocumentChildren

DocumentModelList factoryCurrentDocumentChildren()
                                                 throws ClientException
Gets children of currentDocuments and put it in Page context.

Throws:
ClientException

factoryChangeableDocument

DocumentModel factoryChangeableDocument()
Gets current document for edition.


getCurrentContentRoot

DocumentModel getCurrentContentRoot()
Gets the current Content Root (Workspaces, Sections, Templates...).


getCurrentWorkspace

DocumentModel getCurrentWorkspace()
Gets the current Workspace.


setCurrentContentRoot

void setCurrentContentRoot(DocumentModel currentContentRoot)
Sets the current ContentRoot.


invalidateChildrenProvider

void invalidateChildrenProvider()
Invalidates children provider (temporarily).


invalidateCurrentDocument

void invalidateCurrentDocument()
                               throws ClientException
Will trigger reloading of current document data from the server.

Throws:
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.