public class RemoveContentTypeClientSideElement extends StaticClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
private static String |
__CONTENT_TYPES_DIR
The directory path of content types
|
protected AmetysObjectResolver |
_ametysObjectResolver
The ametys object resolver instance
|
protected ContentTypeExtensionPoint |
_contentTypeExtensionPoint
The content type extension point instance
|
protected EditContentTypeHelper |
_editContentTypeHelper
The edit content type component instance
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
RemoveContentTypeClientSideElement() |
Modifier and Type | Method and Description |
---|---|
private boolean |
_isAutomaticContentType(String contentTypeId) |
Map<String,Object> |
getRemovedContentTypeInfo(String contentTypeId)
Recover information about a content type
|
boolean |
isDeletableContentType(String contentTypeId)
Check if a content type is deletable
|
private boolean |
isLeafContentType(String contentTypeId) |
boolean |
isUnusedContentType(String contentTypeId)
Check if a content type is unused
|
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. |
void |
service(ServiceManager manager) |
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
private static final String __CONTENT_TYPES_DIR
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
protected EditContentTypeHelper _editContentTypeHelper
protected AmetysObjectResolver _ametysObjectResolver
public RemoveContentTypeClientSideElement()
public void service(ServiceManager manager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public boolean removeContentType(String contentTypeId)
contentTypeId
- the id of content type to removepublic boolean isDeletableContentType(String contentTypeId)
contentTypeId
- Id of content typepublic boolean isUnusedContentType(String contentTypeId)
contentTypeId
- Id of content typepublic Map<String,Object> getRemovedContentTypeInfo(String contentTypeId)
contentTypeId
- Id of content typeprivate boolean _isAutomaticContentType(String contentTypeId)
private boolean isLeafContentType(String contentTypeId)