Package org.nuxeo.ecm.directory
Class HierarchicalDirectoryDeleteConstraint
- java.lang.Object
-
- org.nuxeo.ecm.directory.impl.AbstractDirectoryDeleteConstraint
-
- org.nuxeo.ecm.directory.HierarchicalDirectoryDeleteConstraint
-
- All Implemented Interfaces:
Serializable
,DirectoryDeleteConstraint
public class HierarchicalDirectoryDeleteConstraint extends AbstractDirectoryDeleteConstraint
Delete constraint preventing from removing an entry from a parent directory if it is referenced in a child directory.Needs to know the child directory name and the field where parent entry id is declared on it.
- Author:
- Anahide Tchertchian
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
targetDirectory
protected String
targetDirectoryField
-
Fields inherited from class org.nuxeo.ecm.directory.impl.AbstractDirectoryDeleteConstraint
properties
-
-
Constructor Summary
Constructors Constructor Description HierarchicalDirectoryDeleteConstraint()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canDelete(DirectoryService dirService, String entryId)
Returns true if given entry can be deleted from the directory where constraint is declared.void
setProperties(Map<String,String> properties)
Sets properties that may depend on the directory configuration.
-
-
-
Method Detail
-
setProperties
public void setProperties(Map<String,String> properties)
Description copied from interface:DirectoryDeleteConstraint
Sets properties that may depend on the directory configuration.- Specified by:
setProperties
in interfaceDirectoryDeleteConstraint
- Overrides:
setProperties
in classAbstractDirectoryDeleteConstraint
-
canDelete
public boolean canDelete(DirectoryService dirService, String entryId)
Description copied from interface:DirectoryDeleteConstraint
Returns true if given entry can be deleted from the directory where constraint is declared.- Parameters:
dirService
- the directory serviceentryId
- the entry to delete id
-
-