public class LDAPTreeReference extends AbstractReference implements Cloneable
Modifier and Type | Field and Description |
---|---|
static List<String> |
EMPTY_STRING_LIST |
protected int |
scope |
protected LDAPDirectoryDescriptor |
targetDirectoryDescriptor |
fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
Constructor and Description |
---|
LDAPTreeReference() |
LDAPTreeReference(ReferenceDescriptor referenceDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
addLinks(List<String> sourceIds,
String targetId)
NOT IMPLEMENTED: Store new links.
|
void |
addLinks(List<String> sourceIds,
String targetId,
Session session)
Adds the links between the source ids and the target id
|
void |
addLinks(String sourceId,
List<String> targetIds)
NOT IMPLEMENTED: Store new links
|
void |
addLinks(String sourceId,
List<String> targetIds,
Session session)
NOT IMPLEMENTED: Store new links
|
LDAPTreeReference |
clone() |
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 |
removeLinksForSource(String sourceId,
Session session)
Removes all the links for a given source id
|
void |
removeLinksForTarget(String targetId)
NOT IMPLEMENTED: Remove existing statically defined links for the given target id
|
void |
removeLinksForTarget(String targetId,
Session session)
Removes all the links for a 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 |
setSourceIdsForTarget(String targetId,
List<String> sourceIds,
Session session)
Sets all source ids to be associated to the given target id
|
void |
setTargetDirectoryName(String targetDirectoryName) |
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds)
NOT IMPLEMENTED: Set the list of statically defined references for a given source
|
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds,
Session session)
Sets all target ids to be associated to the given source id
|
String |
toString() |
getFieldName, setSourceDirectoryName
public static final List<String> EMPTY_STRING_LIST
protected LDAPDirectoryDescriptor targetDirectoryDescriptor
protected int scope
public LDAPTreeReference()
public LDAPTreeReference(ReferenceDescriptor referenceDescriptor)
public void setFieldName(String fieldName)
protected LDAPFilterMatcher getFilterMatcher()
public void setTargetDirectoryName(String targetDirectoryName)
setTargetDirectoryName
in interface Reference
setTargetDirectoryName
in class AbstractReference
public int getScope()
public Directory getSourceDirectory()
getSourceDirectory
in interface Reference
getSourceDirectory
in class AbstractReference
public Directory getTargetDirectory()
getTargetDirectory
in interface Reference
getTargetDirectory
in class AbstractReference
protected LDAPDirectory getTargetLDAPDirectory()
protected LDAPDirectory getSourceLDAPDirectory()
protected LDAPDirectoryDescriptor getTargetDirectoryDescriptor()
public void addLinks(String sourceId, List<String> targetIds)
addLinks
in interface Reference
Reference.addLinks(String, List)
public void addLinks(String sourceId, List<String> targetIds, Session session)
addLinks
in interface Reference
sourceId
- the source idtargetIds
- the target idssession
- the sessionReference.addLinks(String, List, Session)
public void addLinks(List<String> sourceIds, String targetId, Session session)
Reference
public void addLinks(List<String> sourceIds, String targetId)
addLinks
in interface Reference
Reference.addLinks(List, String)
public List<String> getSourceIdsForTarget(String targetId)
getSourceIdsForTarget
in interface Reference
Reference.getSourceIdsForTarget(String)
public List<String> getTargetIdsForSource(String sourceId)
Removes entries with same id than parent to only get real children.
getTargetIdsForSource
in interface Reference
Reference.getTargetIdsForSource(String)
protected static String pseudoNormalizeDn(String dn) throws InvalidNameException
dn
- the raw unnormalized dnInvalidNameException
protected String getParentDn(String dn)
public void removeLinksForSource(String sourceId)
removeLinksForSource
in interface Reference
Reference.removeLinksForSource(String)
public void removeLinksForTarget(String targetId)
removeLinksForTarget
in interface Reference
Reference.removeLinksForTarget(String)
public void setSourceIdsForTarget(String targetId, List<String> sourceIds)
setSourceIdsForTarget
in interface Reference
Reference.setSourceIdsForTarget(String, List)
public void setSourceIdsForTarget(String targetId, List<String> sourceIds, Session session)
Reference
setSourceIdsForTarget
in interface Reference
targetId
- the target idsourceIds
- the source idssession
- the sessionpublic void setTargetIdsForSource(String sourceId, List<String> targetIds)
setTargetIdsForSource
in interface Reference
Reference.setTargetIdsForSource(String, List)
public void setTargetIdsForSource(String sourceId, List<String> targetIds, Session session)
Reference
setTargetIdsForSource
in interface Reference
sourceId
- the source idtargetIds
- the target idssession
- the sessionpublic void removeLinksForTarget(String targetId, Session session)
Reference
removeLinksForTarget
in interface Reference
targetId
- the target idsession
- the sessionpublic void removeLinksForSource(String sourceId, Session session)
Reference
removeLinksForSource
in interface Reference
sourceId
- the source idsession
- the sessionpublic LDAPTreeReference clone()
Copyright © 2018 Nuxeo. All rights reserved.