Package org.pipservices3.commons.refer
Class Referencer
java.lang.Object
org.pipservices3.commons.refer.Referencer
Helper class that sets and unsets references to components.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
setReferences
(IReferences references, Iterable<Object> components) Sets references to multiple components.static void
setReferencesForOne
(IReferences references, Object component) Sets references to specific component.static void
unsetReferences
(Iterable<Object> components) Unsets references in multiple components.static void
unsetReferencesForOne
(Object component) Unsets references in specific component.
-
Constructor Details
-
Referencer
public Referencer()
-
-
Method Details
-
setReferencesForOne
public static void setReferencesForOne(IReferences references, Object component) throws ReferenceException, ConfigException Sets references to specific component.To set references components must implement IReferenceable interface. If they don't the call to this method has no effect.
- Parameters:
references
- the references to be set.component
- the component to set references to.- Throws:
ReferenceException
- when no references found.ConfigException
- when configuration is wrong.- See Also:
-
setReferences
public static void setReferences(IReferences references, Iterable<Object> components) throws ReferenceException, ConfigException Sets references to multiple components.To set references components must implement IReferenceable interface. If they don't the call to this method has no effect.
- Parameters:
references
- the references to be set.components
- a list of components to set the references to.- Throws:
ReferenceException
- when no references found.ConfigException
- when configuration is wrong.- See Also:
-
unsetReferencesForOne
Unsets references in specific component.To unset references components must implement IUnreferenceable interface. If they don't the call to this method has no effect.
- Parameters:
component
- the component to unset references.- See Also:
-
unsetReferences
Unsets references in multiple components.To unset references components must implement IUnreferenceable interface. If they don't the call to this method has no effect.
- Parameters:
components
- the list of components, whose references must be cleared.- See Also:
-