Nuxeo Enterprise Platform 5.3

org.nuxeo.ecm.webapp.base
Class InputController

java.lang.Object
  extended by org.nuxeo.ecm.webapp.base.InputController
Direct Known Subclasses:
ClipboardActionsBean, ContentRootsActionsBean, DeleteActionsBean, DocumentActionsBean, DocumentChildrenSearchFarm, DocumentChildrenStdFarm, DocumentTemplatesActionsBean, DomainActionsBean, EditorImageActionsBean, EditorLinkActionsBean, EmailNotificationSenderActionsBean, EmailSenderActionsBean, FileManageActionsBean, GroupsSubscriptionsAction, LogoutAction, MassEditActionsBean, PictureBookManagerBean, SearchActionsBean, SearchColumnsBean, SearchResultsBean, SecurityActionsBean, SubscriptionsAction, WorkspaceActionsBean

public abstract class InputController
extends Object

Contains generic functionality usable by all action listeners.

Author:
Razvan Caraghin

Field Summary
protected  ActionManager actionManager
           
protected  DocumentModel currentDocument
          Deprecated. 
protected  Principal currentUser
           
protected  EventManager eventManager
           
protected  org.jboss.seam.faces.FacesMessages facesMessages
           
protected  NavigationContext navigationContext
           
protected  ResourcesAccessor resourcesAccessor
           
protected  TypeManager typeManager
           
protected  TypesTool typesTool
           
 
Constructor Summary
InputController()
           
 
Method Summary
 String computeOutcome(String actionOutcome)
          Deprecated. returning a non-null outcome is now useless since our FancyNavigationHandler already performs redirection to the right outcome when dealing with a null outcome. Plus assumptions on the view/outcome names here was a buggy hack.
protected  List<DocumentRef> extractReferences(List<DocumentModel> documents)
          Extracts references from a list of document models.
 boolean getAdministrator()
          Is the current logged user an administrator?
 void logDocumentWithName(String someLogString, DocumentModel document)
          Logs a DocumentModel name and the passed string (info).
 void logDocumentWithTitle(String someLogString, DocumentModel document)
          Logs a DocumentModel title and the passed string (info).
 void removeDocumentFromList(List<DocumentModel> documentList, DocumentModel document)
          Utility method that helps remove a DocumentModel from a list.
protected  void setFacesMessage(String msg)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

actionManager

@In(create=true)
protected ActionManager actionManager

typeManager

@In(create=true)
protected TypeManager typeManager

navigationContext

@In(create=true)
protected NavigationContext navigationContext

eventManager

@In(create=true)
protected EventManager eventManager

currentDocument

@In(required=false,
    create=true)
@Deprecated
protected DocumentModel currentDocument
Deprecated. 

facesMessages

@In(create=true,
    required=false)
protected org.jboss.seam.faces.FacesMessages facesMessages

resourcesAccessor

@In(create=true)
protected ResourcesAccessor resourcesAccessor

typesTool

@In(create=true)
protected TypesTool typesTool

currentUser

@In(create=true,
    required=false)
protected Principal currentUser
Constructor Detail

InputController

public InputController()
Method Detail

removeDocumentFromList

public void removeDocumentFromList(List<DocumentModel> documentList,
                                   DocumentModel document)
Utility method that helps remove a DocumentModel from a list. The document models are compared on DocumentRefs.

Parameters:
documentList -
document -

logDocumentWithTitle

public void logDocumentWithTitle(String someLogString,
                                 DocumentModel document)
Logs a DocumentModel title and the passed string (info).


logDocumentWithName

public void logDocumentWithName(String someLogString,
                                DocumentModel document)
Logs a DocumentModel name and the passed string (info).


extractReferences

protected List<DocumentRef> extractReferences(List<DocumentModel> documents)
Extracts references from a list of document models.


setFacesMessage

protected void setFacesMessage(String msg)

getAdministrator

public boolean getAdministrator()
Is the current logged user an administrator?


computeOutcome

@Deprecated
public String computeOutcome(String actionOutcome)
Deprecated. returning a non-null outcome is now useless since our FancyNavigationHandler already performs redirection to the right outcome when dealing with a null outcome. Plus assumptions on the view/outcome names here was a buggy hack.

Returns null. Previous behavior was: Utility method to return non 'null' JSF outcome that do not change the current view. The problem with null outcome is that some seam components are not refetched and thus the JSF tree might hold references that are no longer up-to-date, esp. in search results views whose documents lists are computed by an EVENT scoped seam factory.

Parameters:
actionOutcome - a string that might be used in the future to compute the JSF outcome in a cleaner way
Returns:
the same view as previously based on the expectation that the 'outcome_name' match the view id '/outcome_name.xhtml' faces-config.xml

Nuxeo Enterprise Platform 5.3

Copyright © 2010 Nuxeo SAS. All Rights Reserved.