Class PilotageStatusButtonClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.cms.clientsideelement.SmartContentClientSideElement
-
- org.ametys.plugins.odfpilotage.clientsideelement.PilotageStatusButtonClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class PilotageStatusButtonClientSideElement extends SmartContentClientSideElement
Client side element for pilotage status button
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.core.ui.ClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
-
-
Field Summary
Fields Modifier and Type Field Description protected ODFHelper
_odfHelper
The ODF helperprotected PilotageStatusHelper
_pilotageStatusHelper
The pilotage status helper-
Fields inherited from class org.ametys.cms.clientsideelement.SmartContentClientSideElement
_contentHelper, _resolver, _smartHelper
-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description PilotageStatusButtonClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected I18nizableText
_getMainlyGoBackDescription(Content content)
Get content i18n description when we go back to previous step in pilotage statusprotected I18nizableText
_getMainlyGoBackDisabledDescription(Content content)
Get content i18n description when we can't go back to previous step in pilotage statusprotected I18nizableText
_getMainlyGoNextDescription(Content content)
Get content i18n description when we go to next step in pilotage statusprotected I18nizableText
_getMainlyGoNextDisabledDescription(Content content)
Get content i18n description when we can't go to next step in pilotage statusList<String>
getSharedChildName(String contentId)
Get the list of shared first child name of the contentMap<String,Object>
getStatus(List<String> contentsId, String buttonStatus)
Get informations on contents' stateLocalDate
getValidationDate(String contentId)
Get the validation date from content idboolean
isEnable(PilotageStatusHelper.PilotageStatus buttonPilotageStatus, PilotageStatusHelper.PilotageStatus contentPilotageStatus)
True if the button is enableboolean
isToggle(PilotageStatusHelper.PilotageStatus buttonPilotageStatus, PilotageStatusHelper.PilotageStatus contentPilotageStatus)
True if the button is togglevoid
removePilotageStatus(String contentId, String status)
Remove the pilotage status from the contentvoid
service(ServiceManager manager)
void
setPilotageStatus(String contentId, String status, String validationDateAsString, String comment)
Set the pilotage status to the content-
Methods inherited from class org.ametys.cms.clientsideelement.SmartContentClientSideElement
_getAllRightDescription, _getIncorrectWorkflowStepDescription, _getLockedDescription, _getNoModifiableDescription, _getNoRightDescription, _getWorkflowActionUnvailableDescription, _hasRight, _isAllRight, _isLocked, _isModifiable, _isWorkflowStepCorrect, _workflowAction, getContentDefaultParameters, getStatus
-
Methods inherited from class org.ametys.core.ui.StaticClientSideElement
_configureClass, _configureParameters, _configureScript, configureInitialParameters
-
Methods inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
-
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
-
-
-
Field Detail
-
_pilotageStatusHelper
protected PilotageStatusHelper _pilotageStatusHelper
The pilotage status helper
-
_odfHelper
protected ODFHelper _odfHelper
The ODF helper
-
-
Constructor Detail
-
PilotageStatusButtonClientSideElement
public PilotageStatusButtonClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classSmartContentClientSideElement
- Throws:
ServiceException
-
getStatus
public Map<String,Object> getStatus(List<String> contentsId, String buttonStatus)
Get informations on contents' state- Parameters:
contentsId
- the ids of contentsbuttonStatus
- the button status- Returns:
- informations on contents' state
-
getValidationDate
public LocalDate getValidationDate(String contentId)
Get the validation date from content id- Parameters:
contentId
- the contentId- Returns:
- the validation date
-
getSharedChildName
public List<String> getSharedChildName(String contentId)
Get the list of shared first child name of the content- Parameters:
contentId
- the contentId- Returns:
- the list of child name
-
isEnable
public boolean isEnable(PilotageStatusHelper.PilotageStatus buttonPilotageStatus, PilotageStatusHelper.PilotageStatus contentPilotageStatus)
True if the button is enable- Parameters:
buttonPilotageStatus
- the button statuscontentPilotageStatus
- the content status- Returns:
- true if the button is enable
-
isToggle
public boolean isToggle(PilotageStatusHelper.PilotageStatus buttonPilotageStatus, PilotageStatusHelper.PilotageStatus contentPilotageStatus)
True if the button is toggle- Parameters:
buttonPilotageStatus
- the button statuscontentPilotageStatus
- the content status- Returns:
- true if the button is toggle
-
setPilotageStatus
public void setPilotageStatus(String contentId, String status, String validationDateAsString, String comment)
Set the pilotage status to the content- Parameters:
contentId
- the content idstatus
- the pilotage statusvalidationDateAsString
- the validation date as stringcomment
- the comment
-
removePilotageStatus
public void removePilotageStatus(String contentId, String status)
Remove the pilotage status from the content- Parameters:
contentId
- the content idstatus
- the pilotage status
-
_getMainlyGoBackDescription
protected I18nizableText _getMainlyGoBackDescription(Content content)
Get content i18n description when we go back to previous step in pilotage status- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getMainlyGoBackDisabledDescription
protected I18nizableText _getMainlyGoBackDisabledDescription(Content content)
Get content i18n description when we can't go back to previous step in pilotage status- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getMainlyGoNextDescription
protected I18nizableText _getMainlyGoNextDescription(Content content)
Get content i18n description when we go to next step in pilotage status- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
_getMainlyGoNextDisabledDescription
protected I18nizableText _getMainlyGoNextDisabledDescription(Content content)
Get content i18n description when we can't go to next step in pilotage status- Parameters:
content
- The content- Returns:
- The
I18nizableText
description
-
-