Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.directory.api.ui
Class HierarchicalDirectoryUIDeleteConstraint

java.lang.Object
  extended by org.nuxeo.ecm.directory.api.ui.AbstractDirectoryUIDeleteConstraint
      extended by org.nuxeo.ecm.directory.api.ui.HierarchicalDirectoryUIDeleteConstraint
All Implemented Interfaces:
Serializable, DirectoryUIDeleteConstraint

public class HierarchicalDirectoryUIDeleteConstraint
extends AbstractDirectoryUIDeleteConstraint

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

Constructor Summary
HierarchicalDirectoryUIDeleteConstraint()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalDirectoryUIDeleteConstraint

public HierarchicalDirectoryUIDeleteConstraint()
Method Detail

setProperties

public void setProperties(Map<String,String> properties)
                   throws DirectoryException
Description copied from interface: DirectoryUIDeleteConstraint
Sets properties that may depend on the directory configuration.

Specified by:
setProperties in interface DirectoryUIDeleteConstraint
Overrides:
setProperties in class AbstractDirectoryUIDeleteConstraint
Throws:
DirectoryException

canDelete

public boolean canDelete(DirectoryService dirService,
                         String entryId)
                  throws DirectoryException,
                         ClientException
Description copied from interface: DirectoryUIDeleteConstraint
Returns true if given entry can be deleted from the directory where constraint is declared.

Parameters:
dirService - the directory service
entryId - the entry to delete id
Throws:
DirectoryException
ClientException

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.