org.alfresco.web.bean.content
Class DocumentDetailsDialog

java.lang.Object
  extended by org.alfresco.web.bean.dialog.BaseDialogBean
      extended by org.alfresco.web.bean.BaseDetailsBean
          extended by org.alfresco.web.bean.content.DocumentDetailsDialog
All Implemented Interfaces:
java.io.Serializable, IDialogBean, NavigationSupport

public class DocumentDetailsDialog
extends BaseDetailsBean
implements NavigationSupport

Backing bean providing access to the details of a document

See Also:
Serialized Form

Field Summary
protected  org.alfresco.service.cmr.coci.CheckOutCheckInService cociService
           
protected  org.alfresco.service.cmr.ml.ContentFilterLanguagesService contentFilterLanguagesService
           
protected  org.alfresco.service.cmr.ml.EditionService editionService
           
protected  org.alfresco.service.cmr.lock.LockService lockService
           
protected  org.alfresco.service.cmr.ml.MultilingualContentService multilingualContentService
           
protected  org.alfresco.service.cmr.version.VersionService versionService
           
 
Fields inherited from class org.alfresco.web.bean.BaseDetailsBean
imageResolver, panels, template, workflowProperties
 
Fields inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
browseBean, isFinished, navigator, parameters
 
Constructor Summary
DocumentDetailsDialog()
          Default constructor
 
Method Summary
 void applyClassifiable()
          Applies the classifiable aspect to the current document
 java.lang.String applyInlineEditable()
          Applies the inlineeditable aspect to the current document
 void applyVersionable()
          Applies the versionable aspect to the current document
 java.lang.String cancel()
          Method handler called when the cancel button of the dialog is pressed
 java.lang.String editContentProperties()
          Fixes an issue reported in https://issues.alfresco.com/jira/browse/ETWOONE-92
 void expandPanel(javax.faces.event.ActionEvent event)
          Save the state of the panel that was expanded/collapsed
protected  java.lang.String finishImpl(javax.faces.context.FacesContext context, java.lang.String outcome)
          Performs the actual processing for the wizard.
 java.lang.String getBrowserUrl()
          Returns the URL to the content for the current document
 java.lang.String getCancelButtonLabel()
          Returns the label to use for the cancel button
 java.lang.String getCategoriesOverviewHTML()
          Returns a list of objects representing the categories applied to the current document
protected  org.alfresco.service.cmr.coci.CheckOutCheckInService getCheckOutCheckInService()
           
 java.lang.String getContainerSubTitle()
          Returns the subtitle to be used for the dialog
 java.lang.String getContainerTitle()
          Returns the title to be used for the dialog
protected  org.alfresco.service.cmr.ml.ContentFilterLanguagesService getContentFilterLanguagesService()
           
 java.lang.String getCurrentItemId()
           
 SingleEditionBean getCurrentSingleEditionBean()
          For the client side iteration on the edition hitories list, return the current edition history.
 Node getDocument()
          Returns the document this bean is currently representing
 Node getDocumentMlContainer()
          Returns the ml container of the document this bean is currently representing
 java.lang.String getDownloadUrl()
          Returns the download URL to the content for the current document
protected  org.alfresco.service.cmr.ml.EditionService getEditionService()
           
protected  Node getLinkResolvedNode()
          Resolve the actual document Node from any Link object that may be proxying it
protected  org.alfresco.service.cmr.lock.LockService getLockService()
           
protected  org.alfresco.service.cmr.ml.MultilingualContentService getMultilingualContentService()
           
 SingleEditionBean getNextSingleEditionBean()
          For the client side iteration on the edition hitories list, return the next edition history.
 Node getNode()
          Returns the Node this bean is currently representing
 java.lang.String getOutcome()
           
protected  java.lang.String getPropertiesPanelId()
           
 java.util.Map getTemplateModel()
          Returns a model for use by a template on the Document Details page.
 Node getTranslationDocument()
           
 java.lang.String getUrl()
          Returns the URL to download content for the current document
 java.util.List getVersionHistory()
          Returns a list of objects representing the versions of the current document
protected  org.alfresco.service.cmr.version.VersionService getVersionService()
           
 Node getWorkingCopyDocument()
           
 void init(java.util.Map parameters)
          Initialises the dialog bean
 boolean isCategorised()
          Determines whether the current document has any categories applied
 boolean isInlineEditable()
           
 boolean isLocked()
          Returns whether the current document is locked
 boolean isMultilingual()
           
 boolean isOwner()
          Returns whether the current document is a working copy owned by the current User
 boolean isVersionable()
          Determines whether the current document is versionable
 boolean isWorkingCopy()
          Returns whether the current document is a working copy
 void nextItem(javax.faces.event.ActionEvent event)
          Navigates to next item in the list of content for the current Space
 void previousItem(javax.faces.event.ActionEvent event)
          Navigates to the previous item in the list of content for the current Space
 void reset()
          Resets any state that may be held by this bean
 void restored()
          Called when the dialog is restored after a nested dialog is closed
 void setCheckOutCheckInService(org.alfresco.service.cmr.coci.CheckOutCheckInService cociService)
          Sets the checkincheckout service instance the bean should use
 void setContentFilterLanguagesService(org.alfresco.service.cmr.ml.ContentFilterLanguagesService contentFilterLanguagesService)
           
 void setEditionService(org.alfresco.service.cmr.ml.EditionService editionService)
           
 void setLockService(org.alfresco.service.cmr.lock.LockService lockService)
          Sets the lock service instance the bean should use
 void setMultilingualContentService(org.alfresco.service.cmr.ml.MultilingualContentService multilingualContentService)
           
 void setTranslationDocument(Node node)
          Before opening the ml container details, remeber the translation from which the action comes.
 void setVersionService(org.alfresco.service.cmr.version.VersionService versionService)
          Sets the version service instance the bean should use
 void unlock(javax.faces.event.ActionEvent event)
          Action Handler to unlock a locked document
 
Methods inherited from class org.alfresco.web.bean.BaseDetailsBean
applyTemplate, approve, cancelWorkflowEdit, getApproveStepName, getBookmarkUrl, getCifsPath, getCopyService, getHasCustomView, getHasTemplateView, getHasWebscriptView, getId, getName, getNodeRefUrl, getOwnableService, getPanels, getPermissionService, getRejectStepName, getTemplate, getTemplateRef, getWebdavUrl, getWebscriptUrl, getWorkflowProperties, reject, removeTemplate, saveWorkflow, setCopyService, setOwnableService, setPanels, setPermissionService, setTemplate, takeOwnership
 
Methods inherited from class org.alfresco.web.bean.dialog.BaseDialogBean
doPostCommitProcessing, finish, formatErrorMessage, getActionsConfigId, getActionsContext, getAdditionalButtons, getContainerDescription, getDefaultCancelOutcome, getDefaultFinishOutcome, getDictionaryService, getErrorMessageId, getErrorOutcome, getFileFolderService, getFinishButtonDisabled, getFinishButtonLabel, getMoreActionsConfigId, getNamespaceService, getNodeService, getRuleService, getSearchService, getTransactionService, isFinished, setBrowseBean, setDictionaryService, setFileFolderService, setNamespaceService, setNavigator, setNodeService, setSearchService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lockService

protected transient org.alfresco.service.cmr.lock.LockService lockService

versionService

protected transient org.alfresco.service.cmr.version.VersionService versionService

cociService

protected transient org.alfresco.service.cmr.coci.CheckOutCheckInService cociService

multilingualContentService

protected transient org.alfresco.service.cmr.ml.MultilingualContentService multilingualContentService

contentFilterLanguagesService

protected transient org.alfresco.service.cmr.ml.ContentFilterLanguagesService contentFilterLanguagesService

editionService

protected transient org.alfresco.service.cmr.ml.EditionService editionService
Constructor Detail

DocumentDetailsDialog

public DocumentDetailsDialog()
Default constructor

Method Detail

reset

public void reset()
Resets any state that may be held by this bean


init

public void init(java.util.Map parameters)
Description copied from interface: IDialogBean
Initialises the dialog bean

Specified by:
init in interface IDialogBean
Overrides:
init in class BaseDialogBean
Parameters:
parameters - Map of parameters for the dialog

restored

public void restored()
Description copied from interface: IDialogBean
Called when the dialog is restored after a nested dialog is closed

Specified by:
restored in interface IDialogBean
Overrides:
restored in class BaseDialogBean

cancel

public java.lang.String cancel()
Description copied from interface: IDialogBean
Method handler called when the cancel button of the dialog is pressed

Specified by:
cancel in interface IDialogBean
Overrides:
cancel in class BaseDialogBean
Returns:
The outcome to return

getUrl

public java.lang.String getUrl()
Returns the URL to download content for the current document

Returns:
Content url to download the current document

getTranslationDocument

public Node getTranslationDocument()
Returns:
the translation document for this node

setTranslationDocument

public void setTranslationDocument(Node node)
Before opening the ml container details, remeber the translation from which the action comes.

Parameters:
node -

getBrowserUrl

public java.lang.String getBrowserUrl()
Returns the URL to the content for the current document

Returns:
Content url to the current document

getDownloadUrl

public java.lang.String getDownloadUrl()
Returns the download URL to the content for the current document

Returns:
Download url to the current document

getLinkResolvedNode

protected Node getLinkResolvedNode()
Resolve the actual document Node from any Link object that may be proxying it

Specified by:
getLinkResolvedNode in class BaseDetailsBean
Returns:
current document Node or document Node resolved from any Link object

isVersionable

public boolean isVersionable()
Determines whether the current document is versionable

Returns:
true if the document has the versionable aspect

isInlineEditable

public boolean isInlineEditable()
Returns:
true if the current document has the 'inlineeditable' aspect applied

isMultilingual

public boolean isMultilingual()
Returns:
true if the current document has the 'inlineeditable' aspect applied

editContentProperties

public java.lang.String editContentProperties()
Fixes an issue reported in https://issues.alfresco.com/jira/browse/ETWOONE-92

Returns:
Returns action

expandPanel

public void expandPanel(javax.faces.event.ActionEvent event)
Save the state of the panel that was expanded/collapsed

Overrides:
expandPanel in class BaseDetailsBean

getVersionHistory

public java.util.List getVersionHistory()
Returns a list of objects representing the versions of the current document

Returns:
List of previous versions

getNextSingleEditionBean

public SingleEditionBean getNextSingleEditionBean()
For the client side iteration on the edition hitories list, return the next edition history.

Returns:
a light weight representation of an edition history

getCurrentSingleEditionBean

public SingleEditionBean getCurrentSingleEditionBean()
For the client side iteration on the edition hitories list, return the current edition history.

Returns:
a light weight representation of an edition history

isCategorised

public boolean isCategorised()
Determines whether the current document has any categories applied

Returns:
true if the document has categories attached

getCategoriesOverviewHTML

public java.lang.String getCategoriesOverviewHTML()
Returns a list of objects representing the categories applied to the current document

Returns:
List of categories

applyClassifiable

public void applyClassifiable()
Applies the classifiable aspect to the current document


applyVersionable

public void applyVersionable()
Applies the versionable aspect to the current document


unlock

public void unlock(javax.faces.event.ActionEvent event)
Action Handler to unlock a locked document


applyInlineEditable

public java.lang.String applyInlineEditable()
Applies the inlineeditable aspect to the current document


nextItem

public void nextItem(javax.faces.event.ActionEvent event)
Navigates to next item in the list of content for the current Space

Specified by:
nextItem in interface NavigationSupport

previousItem

public void previousItem(javax.faces.event.ActionEvent event)
Navigates to the previous item in the list of content for the current Space

Specified by:
previousItem in interface NavigationSupport

getPropertiesPanelId

protected java.lang.String getPropertiesPanelId()
Specified by:
getPropertiesPanelId in class BaseDetailsBean
Returns:
id of the properties panel component
See Also:
BaseDetailsBean.getPropertiesPanelId()

getTemplateModel

public java.util.Map getTemplateModel()
Returns a model for use by a template on the Document Details page.

Specified by:
getTemplateModel in class BaseDetailsBean
Returns:
model containing current document and current space info.

isLocked

public boolean isLocked()
Returns whether the current document is locked

Returns:
true if the document is checked out

isWorkingCopy

public boolean isWorkingCopy()
Returns whether the current document is a working copy

Returns:
true if the document is a working copy

getWorkingCopyDocument

public Node getWorkingCopyDocument()
Returns:
the working copy document Node for this document if found and the current has permission or null if not

isOwner

public boolean isOwner()
Returns whether the current document is a working copy owned by the current User

Returns:
true if the document is a working copy owner by the current User

getNode

public Node getNode()
Returns the Node this bean is currently representing

Specified by:
getNode in class BaseDetailsBean
Returns:
The Node

getDocument

public Node getDocument()
Returns the document this bean is currently representing

Returns:
The document Node

getDocumentMlContainer

public Node getDocumentMlContainer()
Returns the ml container of the document this bean is currently representing

Returns:
The document multilingual container NodeRef

setLockService

public void setLockService(org.alfresco.service.cmr.lock.LockService lockService)
Sets the lock service instance the bean should use

Parameters:
lockService - The LockService

getLockService

protected org.alfresco.service.cmr.lock.LockService getLockService()

setVersionService

public void setVersionService(org.alfresco.service.cmr.version.VersionService versionService)
Sets the version service instance the bean should use

Parameters:
versionService - The VersionService

getVersionService

protected org.alfresco.service.cmr.version.VersionService getVersionService()

setCheckOutCheckInService

public void setCheckOutCheckInService(org.alfresco.service.cmr.coci.CheckOutCheckInService cociService)
Sets the checkincheckout service instance the bean should use

Parameters:
cociService - The CheckOutCheckInService

getCheckOutCheckInService

protected org.alfresco.service.cmr.coci.CheckOutCheckInService getCheckOutCheckInService()
Overrides:
getCheckOutCheckInService in class BaseDialogBean

setMultilingualContentService

public void setMultilingualContentService(org.alfresco.service.cmr.ml.MultilingualContentService multilingualContentService)
Parameters:
multilingualContentService - the multilingual ContentService to set

getMultilingualContentService

protected org.alfresco.service.cmr.ml.MultilingualContentService getMultilingualContentService()

setContentFilterLanguagesService

public void setContentFilterLanguagesService(org.alfresco.service.cmr.ml.ContentFilterLanguagesService contentFilterLanguagesService)
Parameters:
contentFilterLanguagesService - The Content Filter Languages Service to set.

getContentFilterLanguagesService

protected org.alfresco.service.cmr.ml.ContentFilterLanguagesService getContentFilterLanguagesService()

setEditionService

public void setEditionService(org.alfresco.service.cmr.ml.EditionService editionService)
Parameters:
EditionService - The Edition Service to set.

getEditionService

protected org.alfresco.service.cmr.ml.EditionService getEditionService()

getCancelButtonLabel

public java.lang.String getCancelButtonLabel()
Description copied from interface: IDialogBean
Returns the label to use for the cancel button

Specified by:
getCancelButtonLabel in interface IDialogBean
Overrides:
getCancelButtonLabel in class BaseDialogBean
Returns:
The cancel button label

getContainerSubTitle

public java.lang.String getContainerSubTitle()
Description copied from interface: IDialogBean
Returns the subtitle to be used for the dialog

If this returns null the DialogManager will lookup the subtitle via the dialog configuration

Specified by:
getContainerSubTitle in interface IDialogBean
Overrides:
getContainerSubTitle in class BaseDialogBean
Returns:
The subtitle or null if the subtitle is to be acquired via configuration

getContainerTitle

public java.lang.String getContainerTitle()
Description copied from interface: IDialogBean
Returns the title to be used for the dialog

If this returns null the DialogManager will lookup the title via the dialog configuration

Specified by:
getContainerTitle in interface IDialogBean
Overrides:
getContainerTitle in class BaseDialogBean
Returns:
The title or null if the title is to be acquired via configuration

getCurrentItemId

public java.lang.String getCurrentItemId()
Specified by:
getCurrentItemId in interface NavigationSupport

finishImpl

protected java.lang.String finishImpl(javax.faces.context.FacesContext context,
                                      java.lang.String outcome)
                               throws java.lang.Exception
Description copied from class: BaseDialogBean
Performs the actual processing for the wizard. NOTE: This method is called within the context of a transaction so no transaction handling is required

Specified by:
finishImpl in class BaseDialogBean
Parameters:
context - FacesContext
outcome - The default outcome
Returns:
The outcome
Throws:
java.lang.Exception

getOutcome

public java.lang.String getOutcome()
Specified by:
getOutcome in interface NavigationSupport


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