Package org.nuxeo.ecm.directory.multi
Class MultiReference
- java.lang.Object
-
- org.nuxeo.ecm.directory.AbstractReference
-
- org.nuxeo.ecm.directory.multi.MultiReference
-
public class MultiReference extends AbstractReference implements Cloneable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interface
MultiReference.Collector
-
Field Summary
-
Fields inherited from class org.nuxeo.ecm.directory.AbstractReference
fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 idsvoid
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 idMultiReference
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 idvoid
removeLinksForTarget(String targetId)
void
removeLinksForTarget(String targetId, Session session)
Removes all the links for a given target idvoid
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 idvoid
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-
Methods inherited from class org.nuxeo.ecm.directory.AbstractReference
getFieldName, getSourceDirectory, getTargetDirectory, setSourceDirectoryName, setTargetDirectoryName
-
-
-
-
Method Detail
-
addLinks
public void addLinks(String sourceId, List<String> targetIds, Session session)
Description copied from interface:Reference
Adds the links between the source id and the target ids
-
addLinks
public void addLinks(List<String> sourceIds, String targetId, Session session)
Description copied from interface:Reference
Adds the links between the source ids and the target id
-
doCollect
protected List<String> doCollect(MultiReference.Collector extractor)
-
getSourceIdsForTarget
public List<String> getSourceIdsForTarget(String targetId)
- Specified by:
getSourceIdsForTarget
in interfaceReference
-
getTargetIdsForSource
public List<String> getTargetIdsForSource(String sourceId)
- Specified by:
getTargetIdsForSource
in interfaceReference
-
removeLinksForSource
public void removeLinksForSource(String sourceId)
- Specified by:
removeLinksForSource
in interfaceReference
-
removeLinksForSource
public void removeLinksForSource(String sourceId, Session session)
Description copied from interface:Reference
Removes all the links for a given source id- Specified by:
removeLinksForSource
in interfaceReference
- Parameters:
sourceId
- the source idsession
- the session
-
removeLinksForTarget
public void removeLinksForTarget(String targetId)
- Specified by:
removeLinksForTarget
in interfaceReference
-
removeLinksForTarget
public void removeLinksForTarget(String targetId, Session session)
Description copied from interface:Reference
Removes all the links for a given target id- Specified by:
removeLinksForTarget
in interfaceReference
- Parameters:
targetId
- the target idsession
- the session
-
setSourceIdsForTarget
public void setSourceIdsForTarget(String targetId, List<String> sourceIds)
- Specified by:
setSourceIdsForTarget
in interfaceReference
-
setSourceIdsForTarget
public void setSourceIdsForTarget(String targetId, List<String> sourceIds, Session session)
Description copied from interface:Reference
Sets all source ids to be associated to the given target id- Specified by:
setSourceIdsForTarget
in interfaceReference
- Parameters:
targetId
- the target idsourceIds
- the source idssession
- the session
-
setTargetIdsForSource
public void setTargetIdsForSource(String sourceId, List<String> targetIds)
- Specified by:
setTargetIdsForSource
in interfaceReference
-
setTargetIdsForSource
public void setTargetIdsForSource(String sourceId, List<String> targetIds, Session session)
Description copied from interface:Reference
Sets all target ids to be associated to the given source id- Specified by:
setTargetIdsForSource
in interfaceReference
- Parameters:
sourceId
- the source idtargetIds
- the target idssession
- the session
-
clone
public MultiReference clone()
-
-