Class RemoveContentTypeClientSideElement
- java.lang.Object
-
- org.ametys.runtime.plugin.component.AbstractLogEnabled
-
- org.ametys.core.ui.StaticFileImportsClientSideElement
-
- org.ametys.core.ui.StaticClientSideElement
-
- org.ametys.plugins.contenttypeseditor.edition.clientsideelement.RemoveContentTypeClientSideElement
-
- All Implemented Interfaces:
ClientSideElement
,LogEnabled
,PluginAware
,Configurable
,Serviceable
public class RemoveContentTypeClientSideElement extends StaticClientSideElement
Tool client side element for remove a content type
-
-
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 private static String
__CONTENT_TYPES_DIR
The directory path of content typesprotected AmetysObjectResolver
_ametysObjectResolver
The ametys object resolver instanceprotected ContentTypeExtensionPoint
_contentTypeExtensionPoint
The content type extension point instanceprotected EditContentTypeHelper
_editContentTypeHelper
The edit content type component instance-
Fields inherited from class org.ametys.core.ui.StaticFileImportsClientSideElement
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
-
-
Constructor Summary
Constructors Constructor Description RemoveContentTypeClientSideElement()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private boolean
_isAutomaticContentType(String contentTypeId)
Map<String,Object>
getRemovedContentTypeInfo(String contentTypeId)
Recover information about a content typeboolean
isDeletableContentType(String contentTypeId)
Check if a content type is deletableprivate boolean
isLeafContentType(String contentTypeId)
boolean
isUnusedContentType(String contentTypeId)
Check if a content type is unusedboolean
removeContentType(String contentTypeId)
Remove a existing content type defined in WEB-INF/param/content-types directory.
This method archived the content type into the WEB-INF/param/content-types/_archive/pluginName folder.void
service(ServiceManager manager)
-
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
-
__CONTENT_TYPES_DIR
private static final String __CONTENT_TYPES_DIR
The directory path of content types- See Also:
- Constant Field Values
-
_contentTypeExtensionPoint
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
The content type extension point instance
-
_editContentTypeHelper
protected EditContentTypeHelper _editContentTypeHelper
The edit content type component instance
-
_ametysObjectResolver
protected AmetysObjectResolver _ametysObjectResolver
The ametys object resolver instance
-
-
Constructor Detail
-
RemoveContentTypeClientSideElement
public RemoveContentTypeClientSideElement()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classStaticFileImportsClientSideElement
- Throws:
ServiceException
-
removeContentType
public boolean removeContentType(String contentTypeId)
Remove a existing content type defined in WEB-INF/param/content-types directory.
This method archived the content type into the WEB-INF/param/content-types/_archive/pluginName folder.- Parameters:
contentTypeId
- the id of content type to remove- Returns:
- True if the content type was removed
-
isDeletableContentType
public boolean isDeletableContentType(String contentTypeId)
Check if a content type is deletable- Parameters:
contentTypeId
- Id of content type- Returns:
- True if the content type is deletable
-
isUnusedContentType
public boolean isUnusedContentType(String contentTypeId)
Check if a content type is unused- Parameters:
contentTypeId
- Id of content type- Returns:
- True if the content type is unused
-
getRemovedContentTypeInfo
public Map<String,Object> getRemovedContentTypeInfo(String contentTypeId)
Recover information about a content type- Parameters:
contentTypeId
- Id of content type- Returns:
- Information about a content type
-
_isAutomaticContentType
private boolean _isAutomaticContentType(String contentTypeId)
-
isLeafContentType
private boolean isLeafContentType(String contentTypeId)
-
-