Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.ui.web.component.document
Class RestDocumentLink

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by javax.faces.component.UIOutput
              extended by javax.faces.component.html.HtmlOutputLink
                  extended by org.nuxeo.ecm.platform.ui.web.component.document.RestDocumentLink
All Implemented Interfaces:
StateHolder, ValueHolder

public class RestDocumentLink
extends HtmlOutputLink

Component that gives generates a Restful link given a document.

Author:
Anahide Tchertchian

Field Summary
static String COMPONENT_FAMILY
           
static String COMPONENT_TYPE
           
static String DEFAULT_VIEW_ID
           
 
Constructor Summary
RestDocumentLink()
           
 
Method Summary
 Boolean getAddTabInfo()
           
 DocumentModel getDocument()
           
 DocumentRef getDocumentIdRef()
           
 String getFamily()
           
 Boolean getNewConversation()
          Returns true if URL must link to a page in a new conversation.
 String getPattern()
           
 String getSubTab()
           
 String getTab()
           
 String getTabs()
           
 Object getValue()
          Override to build the URL thanks to other tag attributes information.
 String getView()
           
 void restoreState(FacesContext context, Object state)
           
 Object saveState(FacesContext context)
           
 void setAddTabInfo(Boolean addTabInfo)
           
 void setDocument(DocumentModel document)
           
 void setDocumentIdRef(DocumentRef documentIdRef)
           
 void setNewConversation(Boolean newConversation)
           
 void setPattern(String codec)
           
 void setSubTab(String subTab)
           
 void setTab(String tab)
           
 void setTabs(String tabs)
           
 void setView(String view)
           
 
Methods inherited from class javax.faces.component.html.HtmlOutputLink
getAccesskey, getCharset, getCoords, getDir, getHreflang, getLang, getOnblur, getOnclick, getOndblclick, getOnfocus, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, getRel, getRev, getShape, getStyle, getStyleClass, getTabindex, getTarget, getTitle, getType, isDisabled, setAccesskey, setCharset, setCoords, setDir, setDisabled, setHreflang, setLang, setOnblur, setOnclick, setOndblclick, setOnfocus, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup, setRel, setRev, setShape, setStyle, setStyleClass, setTabindex, setTarget, setTitle, setType
 
Methods inherited from class javax.faces.component.UIOutput
getConverter, getLocalValue, setConverter, setValue
 
Methods inherited from class javax.faces.component.UIComponentBase
broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getContainerClientId, getValueExpression, setValueExpression
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_TYPE

public static final String COMPONENT_TYPE

COMPONENT_FAMILY

public static final String COMPONENT_FAMILY

DEFAULT_VIEW_ID

public static final String DEFAULT_VIEW_ID
See Also:
Constant Field Values
Constructor Detail

RestDocumentLink

public RestDocumentLink()
Method Detail

getFamily

public String getFamily()
Overrides:
getFamily in class UIOutput

getValue

public Object getValue()
Override to build the URL thanks to other tag attributes information.

The document view service is queried to build it, and the tag attribute named "value" is ignored.

Specified by:
getValue in interface ValueHolder
Overrides:
getValue in class UIOutput

getPattern

public String getPattern()

setPattern

public void setPattern(String codec)

getDocument

public DocumentModel getDocument()

setDocument

public void setDocument(DocumentModel document)

getDocumentIdRef

public DocumentRef getDocumentIdRef()

setDocumentIdRef

public void setDocumentIdRef(DocumentRef documentIdRef)

getNewConversation

public Boolean getNewConversation()
Returns true if URL must link to a page in a new conversation.

Defaults to false.


setNewConversation

public void setNewConversation(Boolean newConversation)

getSubTab

public String getSubTab()

setSubTab

public void setSubTab(String subTab)

getTab

public String getTab()

setTab

public void setTab(String tab)

getView

public String getView()

setView

public void setView(String view)

getAddTabInfo

public Boolean getAddTabInfo()

setAddTabInfo

public void setAddTabInfo(Boolean addTabInfo)

getTabs

public String getTabs()

setTabs

public void setTabs(String tabs)

saveState

public Object saveState(FacesContext context)
Specified by:
saveState in interface StateHolder
Overrides:
saveState in class HtmlOutputLink

restoreState

public void restoreState(FacesContext context,
                         Object state)
Specified by:
restoreState in interface StateHolder
Overrides:
restoreState in class HtmlOutputLink

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.