|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.webapp.context.NavigationContextBean
@Name(value="navigationContext") @Scope(value=CONVERSATION) @Install(precedence=10) public class NavigationContextBean
Implementation for the navigationContext component available on the session.
Constructor Summary | |
---|---|
NavigationContextBean()
|
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. |
DocumentModelList |
getCurrentDocumentChildrenPage()
Deprecated. |
String |
getCurrentDocumentFullUrl()
|
String |
getCurrentDocumentUrl()
|
DocumentModel |
getCurrentDomain()
Current Domain, if user has read permission on it. |
String |
getCurrentDomainPath()
Implementation details: the path to current domain is deduced from the path of current document (hardcoded rule that it'd be the first element). |
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 current 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)
Updates context with given document and returns given view. |
String |
navigateToDocument(DocumentModel docModel,
VersionModel versionModel)
|
String |
navigateToDocumentWithView(DocumentModel doc,
String viewId)
Alias to navigateToDocument(DocumentModel doc, String viewId) so
that JSF EL sees no ambiguity) |
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 crDocumentModel)
Sets the current ContentRoot. |
void |
setCurrentDocument(DocumentModel documentModel)
|
void |
setCurrentDomain(DocumentModel domainDocModel)
|
void |
setCurrentServerLocation(RepositoryLocation serverLocation)
Switches to a new server location by updating the context and updating to the CoreSession (DocumentManager). |
void |
setCurrentWorkspace(DocumentModel workspaceDocModel)
|
void |
updateDocumentContext(DocumentModel doc)
Updates the current document in the (session) context and resets the other common structures (breadcrumbs, etc). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NavigationContextBean()
Method Detail |
---|
@Create public void init()
NavigationContext
init
in interface NavigationContext
@BypassInterceptors public DocumentModel getCurrentDocument()
NavigationContext
getCurrentDocument
in interface NavigationContext
public String getCurrentDomainPath() throws ClientException
If current document is null, then the first document found is used instead.
getCurrentDomainPath
in interface NavigationContext
ClientException
public void setCurrentDocument(DocumentModel documentModel) throws ClientException
setCurrentDocument
in interface NavigationContext
ClientException
@BypassInterceptors public DocumentModel getChangeableDocument()
NavigationContext
getChangeableDocument
in interface NavigationContext
public void setChangeableDocument(DocumentModel changeableDocument)
setChangeableDocument
in interface NavigationContext
public DocumentModelList getCurrentPath() throws ClientException
NavigationContext
getCurrentPath
in interface NavigationContext
ClientException
public DocumentModel getCurrentSuperSpace() throws ClientException
NavigationContext
getCurrentSuperSpace
in interface NavigationContext
ClientException
@Deprecated public DocumentModelList getCurrentDocumentChildren() throws ClientException
NavigationContext
getCurrentDocumentChildren
in interface NavigationContext
ClientException
public void invalidateChildrenProvider()
NavigationContext
invalidateChildrenProvider
in interface NavigationContext
public void invalidateCurrentDocument() throws ClientException
NavigationContext
invalidateCurrentDocument
in interface NavigationContext
ClientException
@Deprecated public DocumentModelList getCurrentDocumentChildrenPage() throws ClientException
getCurrentDocumentChildrenPage
in interface NavigationContext
ClientException
@BypassInterceptors public DocumentModel getCurrentDomain()
NavigationContext
getCurrentDomain
in interface NavigationContext
public void setCurrentDomain(DocumentModel domainDocModel) throws ClientException
setCurrentDomain
in interface NavigationContext
ClientException
public void saveCurrentDocument() throws ClientException
NavigationContext
saveCurrentDocument
in interface NavigationContext
ClientException
public List<PathElement> getCurrentPathList() throws ClientException
getCurrentPathList
in interface NavigationContext
ClientException
public RepositoryLocation getCurrentServerLocation()
getCurrentServerLocation
in interface NavigationContext
@Deprecated public RepositoryLocation getSelectedServerLocation()
getSelectedServerLocation
in interface NavigationContext
public void setCurrentServerLocation(RepositoryLocation serverLocation) throws ClientException
setCurrentServerLocation
in interface NavigationContext
serverLocation
- new server location to connect to
ClientException
public CoreSession getOrCreateDocumentManager() throws ClientException
getOrCreateDocumentManager
in interface NavigationContext
ClientException
@BypassInterceptors public DocumentModel getCurrentWorkspace()
NavigationContext
getCurrentWorkspace
in interface NavigationContext
@Factory(value="currentDocument", scope=EVENT) public DocumentModel factoryCurrentDocument()
NavigationContext
factoryCurrentDocument
in interface NavigationContext
@Factory(value="changeableDocument", scope=EVENT) public DocumentModel factoryChangeableDocument()
NavigationContext
factoryChangeableDocument
in interface NavigationContext
@Factory(value="currentDomain", scope=EVENT) public DocumentModel factoryCurrentDomain()
NavigationContext
factoryCurrentDomain
in interface NavigationContext
@Factory(value="currentWorkspace", scope=EVENT) public DocumentModel factoryCurrentWorkspace()
NavigationContext
factoryCurrentWorkspace
in interface NavigationContext
@Factory(value="currentContentRoot", scope=EVENT) public DocumentModel factoryCurrentContentRoot()
NavigationContext
factoryCurrentContentRoot
in interface NavigationContext
public RepositoryLocation factoryCurrentServerLocation()
NavigationContext
factoryCurrentServerLocation
in interface NavigationContext
@Factory(value="currentDocumentChildren", scope=EVENT) public DocumentModelList factoryCurrentDocumentChildren() throws ClientException
NavigationContext
factoryCurrentDocumentChildren
in interface NavigationContext
ClientException
@Factory(value="currentSuperSpace", scope=EVENT) public DocumentModel factoryCurrentSuperSpace() throws ClientException
NavigationContext
factoryCurrentSuperSpace
in interface NavigationContext
ClientException
public void setCurrentWorkspace(DocumentModel workspaceDocModel) throws ClientException
ClientException
public void updateDocumentContext(DocumentModel doc) throws ClientException
NavigationContext
updateDocumentContext
in interface NavigationContext
doc
- DocumentModel that will be set as current document
ClientException
public void resetCurrentContext()
NavigationContext
resetCurrentContext
in interface NavigationContext
public String getActionResult(DocumentModel doc, UserAction action) throws ClientException
NavigationContext
getActionResult
in interface NavigationContext
ClientException
public String goHome()
NavigationContext
goHome
in interface NavigationContext
public String goBack() throws ClientException
goBack
in interface NavigationContext
ClientException
public String navigateToId(String documentId) throws ClientException
NavigationContext
navigateToId
in interface NavigationContext
ClientException
public String navigateToRef(DocumentRef docRef) throws ClientException
NavigationContext
navigateToRef
in interface NavigationContext
ClientException
public String navigateToDocument(DocumentModel doc) throws ClientException
NavigationContext
navigateToDocument
in interface NavigationContext
ClientException
public String navigateToDocument(DocumentModel doc, String viewId) throws ClientException
The view is supposed to be set on the document type information. If such a view id is not available for the type, use its default vieW.
navigateToDocument
in interface NavigationContext
viewId
- for the document as defined in its type
ClientException
public String navigateToDocumentWithView(DocumentModel doc, String viewId) throws ClientException
navigateToDocument(DocumentModel doc, String viewId)
so
that JSF EL sees no ambiguity)
The view is supposed to be set on the document type information. If such a view id is not available for the type, use its default vieW.
navigateToDocumentWithView
in interface NavigationContext
viewId
- for the document as defined in its type
ClientException
public String navigateToDocument(DocumentModel docModel, VersionModel versionModel) throws ClientException
navigateToDocument
in interface NavigationContext
ClientException
public void selectionChanged()
selectionChanged
in interface NavigationContext
public String getCurrentDocumentUrl()
getCurrentDocumentUrl
in interface NavigationContext
NavigationContext.getCurrentDocumentUrl()
public String getCurrentDocumentFullUrl()
getCurrentDocumentFullUrl
in interface NavigationContext
NavigationContext.getCurrentDocumentFullUrl()
@Begin(id="#{conversationIdGenerator.currentOrNewMainConversationId}", join=true) public String navigateTo(RepositoryLocation serverLocation, DocumentRef docRef) throws ClientException
NavigationContext
navigateTo
in interface NavigationContext
ClientException
@Begin(id="#{conversationIdGenerator.currentOrNewMainConversationId}", join=true) public String navigateToURL(String documentUrl) throws ClientException
NavigationContext
navigateToURL
in interface NavigationContext
ClientException
@Begin(id="#{conversationIdGenerator.currentOrNewMainConversationId}", join=true) public String navigateToURL() throws ClientException
NavigationContext
Takes parameter String docRef from the Request.
navigateToURL
in interface NavigationContext
ClientException
NavigationContext.navigateToURL()
public DocumentModel getCurrentContentRoot()
NavigationContext
getCurrentContentRoot
in interface NavigationContext
public void setCurrentContentRoot(DocumentModel crDocumentModel)
NavigationContext
setCurrentContentRoot
in interface NavigationContext
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |