org.alfresco.web.ui.wcm.component
Class UILinkValidationReport

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.springframework.extensions.webscripts.ui.common.component.SelfRenderingComponent
              extended by org.alfresco.web.ui.wcm.component.AbstractLinkValidationReportComponent
                  extended by org.alfresco.web.ui.wcm.component.UILinkValidationReport
All Implemented Interfaces:
javax.faces.component.StateHolder

public class UILinkValidationReport
extends AbstractLinkValidationReportComponent

JSF component that renders the results of a link validation report.


Field Summary
static java.lang.String DEFAULT_INTIAL_TAB
           
 
Fields inherited from class org.alfresco.web.ui.wcm.component.AbstractLinkValidationReportComponent
state
 
Constructor Summary
UILinkValidationReport()
           
 
Method Summary
protected  UIActionLink aquireCollapseAllAction(javax.faces.context.FacesContext context, java.lang.String tabId)
           
protected  UIActionLink aquireExpandAllAction(javax.faces.context.FacesContext context, java.lang.String tabId)
           
protected  UIActions aquireFileActions(java.lang.String id, java.lang.String store)
          Aquire the UIActions component for the specified action group ID.
protected  javax.faces.component.UICommand aquireUpdateStatusAction(javax.faces.context.FacesContext context, java.lang.String actionId)
           
 void encodeBegin(javax.faces.context.FacesContext context)
           
protected  java.lang.String getBrokenLinks(javax.faces.context.FacesContext context, java.lang.String avmPath, LinkValidationState linkState)
          Constructs a comma separated list of broken links for the given avm path
 java.lang.String getFamily()
           
protected  java.lang.String[] getFileNameAndPath(java.lang.String avmPath)
          Returns the name and path for the given avm path
protected  java.lang.String getIcon(java.lang.String fileName)
          Returns the icon to use given a file name
 java.lang.String getInitialTab()
           
 boolean getItemsExpanded()
           
protected  java.lang.String parseBrokenLink(java.lang.String linkUrl)
          Removes the virtaulisation server host name from the link if appropriate
protected  void renderBrokenFile(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, java.lang.String file, LinkValidationState linkState, UIActions actions, org.alfresco.service.cmr.avm.AVMService avmService, int rootPathIndex, java.lang.String storeId, boolean brokenLinksExpanded)
           
protected  void renderBrokenForm(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, java.lang.String file, LinkValidationState linkState, UIActions actions, org.alfresco.service.cmr.avm.AVMService avmService, boolean generatedFilesExpanded)
           
protected  void renderFileDetails(javax.faces.context.ResponseWriter out, javax.faces.context.FacesContext context, java.lang.String fileName, java.lang.String filePath, java.lang.String brokenLinks, int numBrokenLinks, boolean brokenLinksExpanded)
           
protected  void renderFixedItem(javax.faces.context.FacesContext context, javax.faces.context.ResponseWriter out, java.lang.String file, LinkValidationState linkState)
           
protected  void renderNoItems(javax.faces.context.ResponseWriter out, javax.faces.context.FacesContext context)
          Renders the "No items to display" message
protected  void renderTabHeader(javax.faces.context.ResponseWriter out, javax.faces.context.FacesContext context, java.lang.String tabId, boolean showExpandCollapseControls)
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setItemsExpanded(boolean value)
           
 void setItemsExpanded(java.lang.String tab)
           
 
Methods inherited from class org.alfresco.web.ui.wcm.component.AbstractLinkValidationReportComponent
encodeChildren, getRendersChildren, getValue, setValue
 
Methods inherited from class org.springframework.extensions.webscripts.ui.common.component.SelfRenderingComponent
outputAttribute
 
Methods inherited from class javax.faces.component.UIComponentBase
addFacesListener, broadcast, decode, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_INTIAL_TAB

public static final java.lang.String DEFAULT_INTIAL_TAB
See Also:
Constant Field Values
Constructor Detail

UILinkValidationReport

public UILinkValidationReport()
Method Detail

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class AbstractLinkValidationReportComponent

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class AbstractLinkValidationReportComponent

encodeBegin

public void encodeBegin(javax.faces.context.FacesContext context)
                 throws java.io.IOException
Overrides:
encodeBegin in class javax.faces.component.UIComponentBase
Throws:
java.io.IOException

getItemsExpanded

public boolean getItemsExpanded()
Returns:
true if broken links and generated files should be expanded

setItemsExpanded

public void setItemsExpanded(boolean value)
Parameters:
value - true if broken links and generated files should be expanded

getInitialTab

public java.lang.String getInitialTab()
Returns:
The tab that will be initially selected

setItemsExpanded

public void setItemsExpanded(java.lang.String tab)
Parameters:
tab - The initial tab to be selected

renderBrokenFile

protected void renderBrokenFile(javax.faces.context.FacesContext context,
                                javax.faces.context.ResponseWriter out,
                                java.lang.String file,
                                LinkValidationState linkState,
                                UIActions actions,
                                org.alfresco.service.cmr.avm.AVMService avmService,
                                int rootPathIndex,
                                java.lang.String storeId,
                                boolean brokenLinksExpanded)
                         throws java.io.IOException
Throws:
java.io.IOException

renderBrokenForm

protected void renderBrokenForm(javax.faces.context.FacesContext context,
                                javax.faces.context.ResponseWriter out,
                                java.lang.String file,
                                LinkValidationState linkState,
                                UIActions actions,
                                org.alfresco.service.cmr.avm.AVMService avmService,
                                boolean generatedFilesExpanded)
                         throws java.io.IOException
Throws:
java.io.IOException

renderFixedItem

protected void renderFixedItem(javax.faces.context.FacesContext context,
                               javax.faces.context.ResponseWriter out,
                               java.lang.String file,
                               LinkValidationState linkState)
                        throws java.io.IOException
Throws:
java.io.IOException

getFileNameAndPath

protected java.lang.String[] getFileNameAndPath(java.lang.String avmPath)
Returns the name and path for the given avm path

Parameters:
avmPath - The path to split
Returns:
A String array with the name in the first position and the path in the second position.

getBrokenLinks

protected java.lang.String getBrokenLinks(javax.faces.context.FacesContext context,
                                          java.lang.String avmPath,
                                          LinkValidationState linkState)
Constructs a comma separated list of broken links for the given avm path

Parameters:
avmPath - The avm path to get the broken links for
linkState - The current link valiation state
Returns:
Comma separated list of broken links

parseBrokenLink

protected java.lang.String parseBrokenLink(java.lang.String linkUrl)
Removes the virtaulisation server host name from the link if appropriate

Parameters:
linkUrl - The URL that is broken
Returns:
Parsed URL

renderTabHeader

protected void renderTabHeader(javax.faces.context.ResponseWriter out,
                               javax.faces.context.FacesContext context,
                               java.lang.String tabId,
                               boolean showExpandCollapseControls)
                        throws java.io.IOException
Throws:
java.io.IOException

renderFileDetails

protected void renderFileDetails(javax.faces.context.ResponseWriter out,
                                 javax.faces.context.FacesContext context,
                                 java.lang.String fileName,
                                 java.lang.String filePath,
                                 java.lang.String brokenLinks,
                                 int numBrokenLinks,
                                 boolean brokenLinksExpanded)
                          throws java.io.IOException
Throws:
java.io.IOException

renderNoItems

protected void renderNoItems(javax.faces.context.ResponseWriter out,
                             javax.faces.context.FacesContext context)
                      throws java.io.IOException
Renders the "No items to display" message

Parameters:
out - ResponseWriter instance to write to
context - FacesContext
Throws:
java.io.IOException

getIcon

protected java.lang.String getIcon(java.lang.String fileName)
Returns the icon to use given a file name

Parameters:
fileName - File name to find an icon for
Returns:
The path to the icon to use

aquireFileActions

protected UIActions aquireFileActions(java.lang.String id,
                                      java.lang.String store)
Aquire the UIActions component for the specified action group ID. Search for the component in the child list or create as needed.

Parameters:
id - ActionGroup id of the UIActions component
Returns:
UIActions component

aquireUpdateStatusAction

protected javax.faces.component.UICommand aquireUpdateStatusAction(javax.faces.context.FacesContext context,
                                                                   java.lang.String actionId)

aquireExpandAllAction

protected UIActionLink aquireExpandAllAction(javax.faces.context.FacesContext context,
                                             java.lang.String tabId)

aquireCollapseAllAction

protected UIActionLink aquireCollapseAllAction(javax.faces.context.FacesContext context,
                                               java.lang.String tabId)


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.