Nuxeo Enterprise Platform 5.3

org.nuxeo.ecm.directory.ldap
Class LDAPTreeReference

java.lang.Object
  extended by org.nuxeo.ecm.directory.AbstractReference
      extended by org.nuxeo.ecm.directory.ldap.LDAPTreeReference
All Implemented Interfaces:
Reference

public class LDAPTreeReference
extends AbstractReference

Implementation of the directory Reference interface that makes it possible to retrieve children of a node in the LDAP tree structure.

Author:
Anahide Tchertchian

Field Summary
static List<String> EMPTY_STRING_LIST
           
protected  int scope
           
protected  LDAPDirectoryDescriptor targetDirectoryDescriptor
           
 
Fields inherited from class org.nuxeo.ecm.directory.AbstractReference
directoryService, fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
 
Constructor Summary
LDAPTreeReference()
           
 
Method Summary
 void addLinks(List<String> sourceIds, String targetId)
          NOT IMPLEMENTED: Store new links.
 void addLinks(String sourceId, List<String> targetIds)
          NOT IMPLEMENTED: Store new links
protected  LDAPFilterMatcher getFilterMatcher()
           
protected  String getParentDn(String dn)
           
 int getScope()
           
 Directory getSourceDirectory()
           
 List<String> getSourceIdsForTarget(String targetId)
          Fetches single parent, cutting the dn and trying to get the given entry.
protected  LDAPDirectory getSourceLDAPDirectory()
           
 Directory getTargetDirectory()
           
protected  LDAPDirectoryDescriptor getTargetDirectoryDescriptor()
           
 List<String> getTargetIdsForSource(String sourceId)
          Fetches children, onelevel or subtree given the reference configuration.
protected  LDAPDirectory getTargetLDAPDirectory()
           
protected static String pseudoNormalizeDn(String dn)
          Simple helper that replaces ", " by "," in the provided dn and returns the lower case version of the result for comparison purpose.
 void removeLinksForSource(String sourceId)
          NOT IMPLEMENTED: Remove existing statically defined links for the given source id
 void removeLinksForTarget(String targetId)
          NOT IMPLEMENTED: Remove existing statically defined links for the given target id
 void setFieldName(String fieldName)
           
 void setScope(String scope)
           
 void setSourceIdsForTarget(String targetId, List<String> sourceIds)
          NOT IMPLEMENTED: Edit the list of statically defined references for a given target
 void setTargetDirectoryName(String targetDirectoryName)
           
 void setTargetIdsForSource(String sourceId, List<String> targetIds)
          NOT IMPLEMENTED: Set the list of statically defined references for a given source
 String toString()
           
 
Methods inherited from class org.nuxeo.ecm.directory.AbstractReference
getDirectoryService, getFieldName, setSourceDirectoryName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY_STRING_LIST

public static final List<String> EMPTY_STRING_LIST

targetDirectoryDescriptor

protected LDAPDirectoryDescriptor targetDirectoryDescriptor

scope

protected int scope
Constructor Detail

LDAPTreeReference

public LDAPTreeReference()
Method Detail

setFieldName

public void setFieldName(String fieldName)

getFilterMatcher

protected LDAPFilterMatcher getFilterMatcher()

setTargetDirectoryName

public void setTargetDirectoryName(String targetDirectoryName)
Specified by:
setTargetDirectoryName in interface Reference
Overrides:
setTargetDirectoryName in class AbstractReference

getScope

public int getScope()

setScope

public void setScope(String scope)
              throws DirectoryException
Throws:
DirectoryException

getSourceDirectory

public Directory getSourceDirectory()
                             throws DirectoryException
Specified by:
getSourceDirectory in interface Reference
Overrides:
getSourceDirectory in class AbstractReference
Throws:
DirectoryException

getTargetDirectory

public Directory getTargetDirectory()
                             throws DirectoryException
Specified by:
getTargetDirectory in interface Reference
Overrides:
getTargetDirectory in class AbstractReference
Throws:
DirectoryException

getTargetLDAPDirectory

protected LDAPDirectory getTargetLDAPDirectory()
                                        throws DirectoryException
Throws:
DirectoryException

getSourceLDAPDirectory

protected LDAPDirectory getSourceLDAPDirectory()
                                        throws DirectoryException
Throws:
DirectoryException

getTargetDirectoryDescriptor

protected LDAPDirectoryDescriptor getTargetDirectoryDescriptor()
                                                        throws DirectoryException
Throws:
DirectoryException

addLinks

public void addLinks(String sourceId,
                     List<String> targetIds)
              throws DirectoryException
NOT IMPLEMENTED: Store new links

Throws:
DirectoryException
See Also:
Reference.addLinks(String, List)

addLinks

public void addLinks(List<String> sourceIds,
                     String targetId)
              throws DirectoryException
NOT IMPLEMENTED: Store new links.

Throws:
DirectoryException
See Also:
Reference.addLinks(List, String)

getSourceIdsForTarget

public List<String> getSourceIdsForTarget(String targetId)
                                   throws DirectoryException
Fetches single parent, cutting the dn and trying to get the given entry.

Throws:
DirectoryException
See Also:
Reference.getSourceIdsForTarget(String)

getTargetIdsForSource

public List<String> getTargetIdsForSource(String sourceId)
                                   throws DirectoryException
Fetches children, onelevel or subtree given the reference configuration.

Removes entries with same id than parent to only get real children.

Throws:
DirectoryException
See Also:
Reference.getTargetIdsForSource(String)

pseudoNormalizeDn

protected static String pseudoNormalizeDn(String dn)
Simple helper that replaces ", " by "," in the provided dn and returns the lower case version of the result for comparison purpose.

Parameters:
dn - the raw unnormalized dn
Returns:
lowercase version without whitespace after commas

getParentDn

protected String getParentDn(String dn)

removeLinksForSource

public void removeLinksForSource(String sourceId)
                          throws DirectoryException
NOT IMPLEMENTED: Remove existing statically defined links for the given source id

Throws:
DirectoryException
See Also:
Reference.removeLinksForSource(String)

removeLinksForTarget

public void removeLinksForTarget(String targetId)
                          throws DirectoryException
NOT IMPLEMENTED: Remove existing statically defined links for the given target id

Throws:
DirectoryException
See Also:
Reference.removeLinksForTarget(String)

setSourceIdsForTarget

public void setSourceIdsForTarget(String targetId,
                                  List<String> sourceIds)
                           throws DirectoryException
NOT IMPLEMENTED: Edit the list of statically defined references for a given target

Throws:
DirectoryException
See Also:
Reference.setSourceIdsForTarget(String, List)

setTargetIdsForSource

public void setTargetIdsForSource(String sourceId,
                                  List<String> targetIds)
                           throws DirectoryException
NOT IMPLEMENTED: Set the list of statically defined references for a given source

Throws:
DirectoryException
See Also:
Reference.setTargetIdsForSource(String, List)

toString

public String toString()
Overrides:
toString in class Object

Nuxeo Enterprise Platform 5.3

Copyright © 2010 Nuxeo SAS. All Rights Reserved.