Skip to content

Commit

Permalink
Fixes #375
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrossie committed Aug 19, 2015
1 parent 8205c8b commit 6de3d1d
Show file tree
Hide file tree
Showing 23 changed files with 18 additions and 4,015 deletions.
Expand Up @@ -30,20 +30,9 @@
/** /**
* The interface {@code} shows a view of all the events for a particular {@code SubscriptionBase}. * The interface {@code} shows a view of all the events for a particular {@code SubscriptionBase}.
* <p/> * <p/>
* It can be used to display information, or it can be used to modify the subscription stream of events
* and 'repair' the stream by versioning the events.
*/ */
public interface SubscriptionBaseTimeline extends Entity { public interface SubscriptionBaseTimeline extends Entity {


/**
* @return the list of events that should be deleted when repairing the stream.
*/
public List<DeletedEvent> getDeletedEvents();

/**
* @return the list of events that should be added when repairing the stream
*/
public List<NewEvent> getNewEvents();


/** /**
* @return the current list of events for that {@code SubscriptionBase} * @return the current list of events for that {@code SubscriptionBase}
Expand All @@ -56,17 +45,16 @@ public interface SubscriptionBaseTimeline extends Entity {
public long getActiveVersion(); public long getActiveVersion();




public interface DeletedEvent {
public interface ExistingEvent {


/** /**
* @return the unique if for the event to delete * @return the unique if for the event to delete
*/ */
public UUID getEventId(); public UUID getEventId();
}

public interface NewEvent {


/** /**
*
* @return the description for the event to be added * @return the description for the event to be added
*/ */
public PlanPhaseSpecifier getPlanPhaseSpecifier(); public PlanPhaseSpecifier getPlanPhaseSpecifier();
Expand All @@ -81,10 +69,6 @@ public interface NewEvent {
*/ */
public SubscriptionBaseTransitionType getSubscriptionTransitionType(); public SubscriptionBaseTransitionType getSubscriptionTransitionType();


}

public interface ExistingEvent extends DeletedEvent, NewEvent {

/** /**
* @return the date at which this event was effective * @return the date at which this event was effective
*/ */
Expand Down
Expand Up @@ -16,23 +16,11 @@


package org.killbill.billing.subscription.api.timeline; package org.killbill.billing.subscription.api.timeline;


import java.util.UUID;

import org.killbill.billing.subscription.api.user.SubscriptionBaseBundle; import org.killbill.billing.subscription.api.user.SubscriptionBaseBundle;
import org.killbill.billing.util.callcontext.CallContext;
import org.killbill.billing.util.callcontext.TenantContext; import org.killbill.billing.util.callcontext.TenantContext;


public interface SubscriptionBaseTimelineApi { public interface SubscriptionBaseTimelineApi {


public BundleBaseTimeline getBundleTimeline(SubscriptionBaseBundle bundle, TenantContext context) public BundleBaseTimeline getBundleTimeline(SubscriptionBaseBundle bundle, TenantContext context)
throws SubscriptionBaseRepairException; throws SubscriptionBaseRepairException;

public BundleBaseTimeline getBundleTimeline(UUID accountId, String bundleName, TenantContext context)
throws SubscriptionBaseRepairException;

public BundleBaseTimeline getBundleTimeline(UUID bundleId, TenantContext context)
throws SubscriptionBaseRepairException;

public BundleBaseTimeline repairBundle(BundleBaseTimeline input, boolean dryRun, CallContext context)
throws SubscriptionBaseRepairException;
} }

0 comments on commit 6de3d1d

Please sign in to comment.