[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] IProfileUpdateRequest

Hi John,

Thanks.

Scott

John Arthorne wrote:
The expectation is that you use an IProfileChangeRequest instance created by the planner you want to invoke:

IPlanner planner = ...;//
IProfileChangeRequest pcr = planner.createChangeRequest(profile);
pcr.add(...);
planner.getProvisioningPlan(pcr, context, monitor);

You can't create your own implementation of IProfileChangeRequest and pass it to an arbitrary planner if that's what you are asking. The planner and change request are tightly coupled, which is why the IProfileChangeRequest factory method is located on the planner.

John

On Sun, Mar 28, 2010 at 5:59 PM, Scott Lewis <slewis@xxxxxxxxxxxxx <mailto:slewis@xxxxxxxxxxxxx>> wrote:

    In the 3.6 planner, the API signature of the getProvisioningPlan
    method is this:

      public IProvisioningPlan
    getProvisioningPlan(IProfileChangeRequest profileChangeRequest,
    ProvisioningContext context, IProgressMonitor monitor);

    The first param...i.e. profileChangeRequest has type
    IProfileChangeRequest.  But in the SimplePlanner implementation,
    however, is this code:

       public IProvisioningPlan
    getProvisioningPlan(IProfileChangeRequest request,
    ProvisioningContext context, IProgressMonitor monitor) {
          ProfileChangeRequest pcr = (ProfileChangeRequest) request;
         ...

    Note that this first line of the getProvisioningPlan
    implementation requires that the request be of type
    ProfileChangeRequest...or subclass...and ProfileChangeRequest is a
    non-API class (at least in m6)...i.e.

    org.eclipse.equinox.internal.provisional.p2.director.ProfileChangeRequest

    meaning that other clients of the IPlanner (at least using the
    simple planner), must use ProfileChangeRequest to use the
    SimplePlanner.  Is this desired?

    Thanks,

    Scott



    _______________________________________________
    p2-dev mailing list
    p2-dev@xxxxxxxxxxx <mailto:p2-dev@xxxxxxxxxxx>
    https://dev.eclipse.org/mailman/listinfo/p2-dev


------------------------------------------------------------------------

_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev