public interface NavigationContext
Modifier and Type | Method and Description |
---|---|
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.
|
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.
|
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 |
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 with given document and returns its default view.
|
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).
|
void init()
RepositoryLocation getCurrentServerLocation()
@Deprecated RepositoryLocation getSelectedServerLocation()
DocumentModel getCurrentDomain()
String getCurrentDomainPath() throws ClientException
This method tries hard to always returns an answer: the path to current domain is deduced from the path of current document (assuming that it would be the first element of this path).
If current document is null, the same logic is applied to the first document found amongst all documents user has access to.
ClientException
void setCurrentDomain(DocumentModel currentDomain) throws ClientException
ClientException
DocumentModel getCurrentDocument()
DocumentModel getCurrentSuperSpace() throws ClientException
ClientException
void setCurrentDocument(DocumentModel documentModel) throws ClientException
ClientException
DocumentModel getChangeableDocument()
void setChangeableDocument(DocumentModel changeableDocument)
void saveCurrentDocument() throws ClientException
ClientException
List<PathElement> getCurrentPathList() throws ClientException
ClientException
DocumentModelList getCurrentPath() throws ClientException
ClientException
String getCurrentDocumentUrl()
String getCurrentDocumentFullUrl()
void updateDocumentContext(DocumentModel doc) throws ClientException
doc
- DocumentModel that will be set as current documentClientException
void resetCurrentContext()
String getActionResult(DocumentModel doc, UserAction action) throws ClientException
ClientException
String goHome()
String goBack() throws ClientException
ClientException
String navigateToId(String documentId) throws ClientException
ClientException
String navigateToRef(DocumentRef docRef) throws ClientException
ClientException
String navigateToDocument(DocumentModel doc) throws ClientException
The default view is configured on the UI document type definition.
ClientException
String navigateToDocument(DocumentModel doc, String viewId) throws ClientException
If view is not found, use default view.
doc
- viewId
- for the document as defined in its typeClientException
String navigateToDocumentWithView(DocumentModel doc, String viewId) throws ClientException
If view is not found, use default view set on the UI document type. This is an alias to
navigateToDocument(DocumentModel doc, String viewId)
, to resolve ambiguity when method is invoked by
an EL expression.
doc
- viewId
- for the document as defined in its typeClientException
String navigateTo(RepositoryLocation serverLocation, DocumentRef docRef) throws ClientException
ClientException
String navigateToURL(String documentUrl) throws ClientException
ClientException
String navigateToURL() throws ClientException
Takes parameter String docRef from the Request.
ClientException
void selectionChanged()
void setCurrentServerLocation(RepositoryLocation serverLocation) throws ClientException
serverLocation
- new server location to connect toClientException
CoreSession getOrCreateDocumentManager() throws ClientException
ClientException
String navigateToDocument(DocumentModel docModel, VersionModel versionModel) throws ClientException
ClientException
DocumentModel factoryCurrentDocument()
DocumentModel factoryCurrentDomain()
DocumentModel factoryCurrentWorkspace()
DocumentModel factoryCurrentSuperSpace() throws ClientException
ClientException
DocumentModel factoryCurrentContentRoot()
RepositoryLocation factoryCurrentServerLocation()
DocumentModel factoryChangeableDocument()
DocumentModel getCurrentContentRoot()
DocumentModel getCurrentWorkspace()
void setCurrentContentRoot(DocumentModel currentContentRoot)
void invalidateCurrentDocument() throws ClientException
ClientException
Copyright © 2015 Nuxeo SA. All rights reserved.