Package org.ametys.odf.clientsideelement
Class DeleteContentClientSideElement
- 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.cms.clientsideelement.DeleteContentClientSideElement
-
- org.ametys.odf.clientsideelement.DeleteContentClientSideElement
-
- All Implemented Interfaces:
ClientSideElement,LogEnabled,PluginAware,Configurable,Serviceable
- Direct Known Subclasses:
DeleteODFPilotageContentClientSideElement
public class DeleteContentClientSideElement extends DeleteContentClientSideElement
This element creates an action button to delete a ODF content
-
-
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 DeleteODFContentHelper_deleteODFContentHelperThe delete ODF content helperprotected RootOrgUnitProvider_rootOrgUnitProviderThe root orgunit provider-
Fields inherited from class org.ametys.cms.clientsideelement.DeleteContentClientSideElement
_observationManager
-
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 DeleteContentClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean_hasRight(Content content)Determines if the user has sufficient right for the given contentprotected boolean_isContentReferenced(Content content)Test if content is still referenced before removing itprotected boolean_isModifiable(Content content)Determines if the content is modifiableMap<String,Object>deleteContents(List<String> contentsId, Map<String,Object> parameters)Delete ODF contentsprotected Map<String,Object>getContentDefaultParameters(Content content)Get the default content's parametersvoidservice(ServiceManager manager)-
Methods inherited from class org.ametys.cms.clientsideelement.DeleteContentClientSideElement
_getReferencedDescription, getStatus
-
Methods inherited from class org.ametys.cms.clientsideelement.SmartContentClientSideElement
_getAllRightDescription, _getIncorrectWorkflowStepDescription, _getLockedDescription, _getNoModifiableDescription, _getNoRightDescription, _getWorkflowActionUnvailableDescription, _isAllRight, _isLocked, _isWorkflowStepCorrect, _workflowAction
-
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
-
_rootOrgUnitProvider
protected RootOrgUnitProvider _rootOrgUnitProvider
The root orgunit provider
-
_deleteODFContentHelper
protected DeleteODFContentHelper _deleteODFContentHelper
The delete ODF content helper
-
-
Constructor Detail
-
DeleteContentClientSideElement
public DeleteContentClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classDeleteContentClientSideElement- Throws:
ServiceException
-
_hasRight
protected boolean _hasRight(Content content)
Description copied from class:SmartContentClientSideElementDetermines if the user has sufficient right for the given content- Overrides:
_hasRightin classSmartContentClientSideElement- Parameters:
content- the content- Returns:
- true if user has sufficient right
-
_isModifiable
protected boolean _isModifiable(Content content)
Description copied from class:SmartContentClientSideElementDetermines if the content is modifiable- Overrides:
_isModifiablein classSmartContentClientSideElement- Parameters:
content- the content- Returns:
- true if the content is modifiable
-
_isContentReferenced
protected boolean _isContentReferenced(Content content)
Description copied from class:DeleteContentClientSideElementTest if content is still referenced before removing it- Overrides:
_isContentReferencedin classDeleteContentClientSideElement- Parameters:
content- The content to remove- Returns:
- true if content is still referenced
-
deleteContents
public Map<String,Object> deleteContents(List<String> contentsId, Map<String,Object> parameters)
Delete ODF contents- Parameters:
contentsId- The ids of contents to deleteparameters- the additional parameters- Returns:
- the deleted and undeleted contents
-
getContentDefaultParameters
protected Map<String,Object> getContentDefaultParameters(Content content)
Description copied from class:SmartContentClientSideElementGet the default content's parameters- Overrides:
getContentDefaultParametersin classSmartContentClientSideElement- Parameters:
content- The content- Returns:
- The default parameters
-
-