Package org.nuxeo.ecm.directory
Class InverseReference
java.lang.Object
org.nuxeo.ecm.directory.AbstractReference
org.nuxeo.ecm.directory.InverseReference
- All Implemented Interfaces:
Reference
Reference that uses the matching reference of the target directory to actually do the job.
- Author:
- ogrisel
-
Field Summary
Modifier and TypeFieldDescriptionprotected Reference
protected String
protected boolean
Indicates if the target directory can be updated from the current referenceFields inherited from class org.nuxeo.ecm.directory.AbstractReference
fieldName, sourceDirectory, sourceDirectoryName, targetDirectory, targetDirectoryName
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Adds the links between the source id and the target idsvoid
void
Adds the links between the source ids and the target idgetSourceIdsForTarget
(String targetId) getTargetIdsForSource
(String sourceId) void
boolean
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
setReadOnly
(boolean readOnly) 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 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 idMethods inherited from class org.nuxeo.ecm.directory.AbstractReference
getFieldName, getSourceDirectory, getTargetDirectory, setSourceDirectoryName, setTargetDirectoryName
-
Field Details
-
readOnly
protected boolean readOnlyIndicates if the target directory can be updated from the current reference- Since:
- 5.7
-
dualReferenceName
-
dualReference
-
-
Constructor Details
-
InverseReference
-
-
Method Details
-
setReadOnly
public void setReadOnly(boolean readOnly) -
isReadOnly
public boolean isReadOnly() -
initialize
public void initialize() -
addLinks
-
addLinks
-
removeLinksForTarget
-
removeLinksForTarget
Description copied from interface:Reference
Removes all the links for a given target id- Parameters:
targetId
- the target idsession
- the session
-
removeLinksForSource
-
removeLinksForSource
Description copied from interface:Reference
Removes all the links for a given source id- Parameters:
sourceId
- the source idsession
- the session
-
getSourceIdsForTarget
-
getTargetIdsForSource
-
setTargetIdsForSource
-
setTargetIdsForSource
Description copied from interface:Reference
Sets all target ids to be associated to the given source id- Parameters:
sourceId
- the source idtargetIds
- the target idssession
- the session
-
setSourceIdsForTarget
-
setSourceIdsForTarget
Description copied from interface:Reference
Sets all source ids to be associated to the given target id- Parameters:
targetId
- the target idsourceIds
- the source idssession
- the session
-
addLinks
Description copied from interface:Reference
Adds the links between the source id and the target ids- Parameters:
sourceId
- the source idtargetIds
- the target idssession
- the session
-
addLinks
Description copied from interface:Reference
Adds the links between the source ids and the target id- Parameters:
sourceIds
- the source idstargetId
- the target idsession
- the session
-