Class Referencer

java.lang.Object
org.pipservices3.commons.refer.Referencer

public class Referencer extends Object
Helper class that sets and unsets references to components.
See Also:
  • 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

      public static void unsetReferencesForOne(Object component)
      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

      public static void unsetReferences(Iterable<Object> components)
      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: