Package org.nuxeo.ecm.directory
Class InverseReference
- java.lang.Object
-
- org.nuxeo.ecm.directory.AbstractReference
-
- org.nuxeo.ecm.directory.InverseReference
-
- All Implemented Interfaces:
Reference
public class InverseReference extends AbstractReference
Reference that uses the matching reference of the target directory to actually do the job.- Author:
- ogrisel
-
-
Field Summary
Fields Modifier and Type Field Description protected ReferencedualReferenceprotected StringdualReferenceNameprotected booleanreadOnlyIndicates if the target directory can be updated from the current reference-
Fields inherited from class org.nuxeo.ecm.directory.AbstractReference
fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
-
-
Constructor Summary
Constructors Constructor Description InverseReference(InverseReferenceDescriptor referenceDescriptor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLinks(String sourceId, List<String> targetIds)voidaddLinks(String sourceId, List<String> targetIds, Session session)Adds the links between the source id and the target idsvoidaddLinks(List<String> sourceIds, String targetId)voidaddLinks(List<String> sourceIds, String targetId, Session session)Adds the links between the source ids and the target idList<String>getSourceIdsForTarget(String targetId)List<String>getTargetIdsForSource(String sourceId)voidinitialize()booleanisReadOnly()voidremoveLinksForSource(String sourceId)voidremoveLinksForSource(String sourceId, Session session)Removes all the links for a given source idvoidremoveLinksForTarget(String targetId)voidremoveLinksForTarget(String targetId, Session session)Removes all the links for a given target idvoidsetReadOnly(boolean readOnly)voidsetSourceIdsForTarget(String targetId, List<String> sourceIds)voidsetSourceIdsForTarget(String targetId, List<String> sourceIds, Session session)Sets all source ids to be associated to the given target idvoidsetTargetIdsForSource(String sourceId, List<String> targetIds)voidsetTargetIdsForSource(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
-
-
-
-
Field Detail
-
readOnly
protected boolean readOnly
Indicates if the target directory can be updated from the current reference- Since:
- 5.7
-
dualReferenceName
protected String dualReferenceName
-
dualReference
protected Reference dualReference
-
-
Constructor Detail
-
InverseReference
public InverseReference(InverseReferenceDescriptor referenceDescriptor)
-
-
Method Detail
-
setReadOnly
public void setReadOnly(boolean readOnly)
-
isReadOnly
public boolean isReadOnly()
-
initialize
public void initialize()
-
removeLinksForTarget
public void removeLinksForTarget(String targetId)
-
removeLinksForTarget
public void removeLinksForTarget(String targetId, Session session)
Description copied from interface:ReferenceRemoves all the links for a given target id- Parameters:
targetId- the target idsession- the session
-
removeLinksForSource
public void removeLinksForSource(String sourceId)
-
removeLinksForSource
public void removeLinksForSource(String sourceId, Session session)
Description copied from interface:ReferenceRemoves all the links for a given source id- Parameters:
sourceId- the source idsession- the session
-
getSourceIdsForTarget
public List<String> getSourceIdsForTarget(String targetId)
-
getTargetIdsForSource
public List<String> getTargetIdsForSource(String sourceId)
-
setTargetIdsForSource
public void setTargetIdsForSource(String sourceId, List<String> targetIds)
-
setTargetIdsForSource
public void setTargetIdsForSource(String sourceId, List<String> targetIds, Session session)
Description copied from interface:ReferenceSets all target ids to be associated to the given source id- Parameters:
sourceId- the source idtargetIds- the target idssession- the session
-
setSourceIdsForTarget
public void setSourceIdsForTarget(String targetId, List<String> sourceIds)
-
setSourceIdsForTarget
public void setSourceIdsForTarget(String targetId, List<String> sourceIds, Session session)
Description copied from interface:ReferenceSets all source ids to be associated to the given target id- Parameters:
targetId- the target idsourceIds- the source idssession- the session
-
addLinks
public void addLinks(String sourceId, List<String> targetIds, Session session)
Description copied from interface:ReferenceAdds the links between the source id and the target ids- Parameters:
sourceId- the source idtargetIds- the target idssession- the session
-
-