com.atlassian.crowd.dao.directory
Class IntegrityConstraintAwareDirectoryPropertiesMapper

java.lang.Object
  extended by com.atlassian.crowd.dao.directory.DirectoryPropertiesMapper
      extended by com.atlassian.crowd.dao.directory.IntegrityConstraintAwareDirectoryPropertiesMapper

public class IntegrityConstraintAwareDirectoryPropertiesMapper
extends DirectoryPropertiesMapper

In order to prevent the instantiation of directories that do not exist in the database, this class only authorises directories that match an existing id in the database.


Field Summary
 
Fields inherited from class com.atlassian.crowd.dao.directory.DirectoryPropertiesMapper
ACTIVE_PROPERTY, ALLOWED_OPERATIONS_PROPERTY, ATTRIBUTES_PROPERTY, DESCRIPTION_PROPERTY, ENCRYPTION_TYPE_PROPERTY, IMPLEMENTATION_CLASS_PROPERTY, NAME_PROPERTY, TYPE_PROPERTY
 
Constructor Summary
IntegrityConstraintAwareDirectoryPropertiesMapper(DirectoryDao backendDirectoryDao)
           
 
Method Summary
protected  boolean canImportDirectory(Long id)
          Determines if a directory can be created using this mapper.
 
Methods inherited from class com.atlassian.crowd.dao.directory.DirectoryPropertiesMapper
exportProperties, getDirectoryAttributes, importAllDirectories, importDirectory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrityConstraintAwareDirectoryPropertiesMapper

public IntegrityConstraintAwareDirectoryPropertiesMapper(DirectoryDao backendDirectoryDao)
Method Detail

canImportDirectory

protected boolean canImportDirectory(Long id)
Description copied from class: DirectoryPropertiesMapper
Determines if a directory can be created using this mapper. Subclasses can override this method to implement their own policies.

Overrides:
canImportDirectory in class DirectoryPropertiesMapper
Parameters:
id - directory id
Returns:
true if the directory can be created


Copyright © 2013 Atlassian. All Rights Reserved.