Class ResultSpyAction

  • All Implemented Interfaces:
    org.eclipse.equinox.p2.publisher.IPublisherAction

    public class ResultSpyAction
    extends java.lang.Object
    implements org.eclipse.equinox.p2.publisher.IPublisherAction
    This publisher action does nothing but storing the root IUs of the IPublisherResult instance used by the publisher. This is a workaround for missing getters in Publisher.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> allIUs  
      private java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> rootIUs  
    • Constructor Summary

      Constructors 
      Constructor Description
      ResultSpyAction()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void checkPerformed()  
      java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> getAllIUs()
      Returns all IUs in the publisher result at the time when this action was invoked by the Publisher.
      java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> getRootIUs()
      Returns the root IUs in the publisher result at the time when this action was invoked by the Publisher.
      org.eclipse.core.runtime.IStatus perform​(org.eclipse.equinox.p2.publisher.IPublisherInfo info, org.eclipse.equinox.p2.publisher.IPublisherResult results, org.eclipse.core.runtime.IProgressMonitor monitor)  
      private boolean wasPerformed()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • rootIUs

        private java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> rootIUs
      • allIUs

        private java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> allIUs
    • Constructor Detail

      • ResultSpyAction

        public ResultSpyAction()
    • Method Detail

      • perform

        public org.eclipse.core.runtime.IStatus perform​(org.eclipse.equinox.p2.publisher.IPublisherInfo info,
                                                        org.eclipse.equinox.p2.publisher.IPublisherResult results,
                                                        org.eclipse.core.runtime.IProgressMonitor monitor)
        Specified by:
        perform in interface org.eclipse.equinox.p2.publisher.IPublisherAction
      • getRootIUs

        public java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> getRootIUs()
                                                                                          throws java.lang.IllegalStateException
        Returns the root IUs in the publisher result at the time when this action was invoked by the Publisher.
        Throws:
        java.lang.IllegalStateException - if the action has not been performed.
      • getAllIUs

        public java.util.Collection<org.eclipse.equinox.p2.metadata.IInstallableUnit> getAllIUs()
                                                                                         throws java.lang.IllegalStateException
        Returns all IUs in the publisher result at the time when this action was invoked by the Publisher.
        Throws:
        java.lang.IllegalStateException - if the action has not been performed.
      • wasPerformed

        private boolean wasPerformed()
      • checkPerformed

        private void checkPerformed()
                             throws java.lang.IllegalStateException
        Throws:
        java.lang.IllegalStateException