public class MultiReference extends AbstractReference implements Cloneable
Modifier and Type | Class and Description |
---|---|
protected static interface |
MultiReference.Collector |
fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
Modifier and Type | Method and Description |
---|---|
void |
addLinks(List<String> sourceIds,
String targetId) |
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) |
void |
addLinks(String sourceId,
List<String> targetIds,
Session session)
Adds the links between the source id and the target ids
|
MultiReference |
clone() |
protected List<String> |
doCollect(MultiReference.Collector extractor) |
List<String> |
getSourceIdsForTarget(String targetId) |
List<String> |
getTargetIdsForSource(String sourceId) |
void |
removeLinksForSource(String sourceId) |
void |
removeLinksForSource(String sourceId,
Session session)
Removes all the links for a given source id
|
void |
removeLinksForTarget(String targetId) |
void |
removeLinksForTarget(String targetId,
Session session)
Removes all the links for a given target id
|
void |
setSourceIdsForTarget(String targetId,
List<String> sourceIds) |
void |
setSourceIdsForTarget(String targetId,
List<String> sourceIds,
Session session)
Sets all source ids to be associated to the given target id
|
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds) |
void |
setTargetIdsForSource(String sourceId,
List<String> targetIds,
Session session)
Sets all target ids to be associated to the given source id
|
getFieldName, getSourceDirectory, getTargetDirectory, setSourceDirectoryName, setTargetDirectoryName
public void addLinks(String sourceId, List<String> targetIds) throws DirectoryException
addLinks
in interface Reference
DirectoryException
public void addLinks(String sourceId, List<String> targetIds, Session session) throws DirectoryException
Reference
addLinks
in interface Reference
sourceId
- the source idtargetIds
- the target idssession
- the sessionDirectoryException
public void addLinks(List<String> sourceIds, String targetId, Session session) throws DirectoryException
Reference
addLinks
in interface Reference
sourceIds
- the source idstargetId
- the target idsession
- the sessionDirectoryException
public void addLinks(List<String> sourceIds, String targetId) throws DirectoryException
addLinks
in interface Reference
DirectoryException
protected List<String> doCollect(MultiReference.Collector extractor) throws DirectoryException
DirectoryException
public List<String> getSourceIdsForTarget(String targetId) throws DirectoryException
getSourceIdsForTarget
in interface Reference
DirectoryException
public List<String> getTargetIdsForSource(String sourceId) throws DirectoryException
getTargetIdsForSource
in interface Reference
DirectoryException
public void removeLinksForSource(String sourceId) throws DirectoryException
removeLinksForSource
in interface Reference
DirectoryException
public void removeLinksForSource(String sourceId, Session session) throws DirectoryException
Reference
removeLinksForSource
in interface Reference
sourceId
- the source idsession
- the sessionDirectoryException
public void removeLinksForTarget(String targetId) throws DirectoryException
removeLinksForTarget
in interface Reference
DirectoryException
public void removeLinksForTarget(String targetId, Session session) throws DirectoryException
Reference
removeLinksForTarget
in interface Reference
targetId
- the target idsession
- the sessionDirectoryException
public void setSourceIdsForTarget(String targetId, List<String> sourceIds) throws DirectoryException
setSourceIdsForTarget
in interface Reference
DirectoryException
public void setSourceIdsForTarget(String targetId, List<String> sourceIds, Session session) throws DirectoryException
Reference
setSourceIdsForTarget
in interface Reference
targetId
- the target idsourceIds
- the source idssession
- the sessionDirectoryException
public void setTargetIdsForSource(String sourceId, List<String> targetIds) throws DirectoryException
setTargetIdsForSource
in interface Reference
DirectoryException
public void setTargetIdsForSource(String sourceId, List<String> targetIds, Session session) throws DirectoryException
Reference
setTargetIdsForSource
in interface Reference
sourceId
- the source idtargetIds
- the target idssession
- the sessionDirectoryException
public MultiReference clone()
Copyright © 2018 Nuxeo. All rights reserved.