Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 24 Next »

Change log:

Date:

Author:

Version:

Changes:

Completed

Ext.

Int.

Is in Core

Jira Ref.

0.1

Doc. created

No

 

x

Not yet

CDRP-5829 and CDRP-6067

18 June 2013

THJ

1.0

Doc. finished in Version 1.0

Yes

 

x

8.18

CDRP-5829 and CDRP-6067

Handling Shared Campaigns in the Java Code

In order to handle campaign sharing, service interfaces and abstract classes have been defined.

The interface, abstract classes, and specific implementations can be grouped into two layers: Backend Layer and Core Layer.

Backend Layer

In this layer you find the basic building blocks. The classes you find in this layer basically only handles one thing for one class. Or it can be a bean, which is just a collection of classes that shares some kind of relationship, but it does not operate on them (= only implement getters and setters).

Core Layer

In this layer you find the elements that bind the system's basic building blocks and actions together. The classes you find in this layer often handles more than one object, using Core logic to relate the objects and the actions you perform on each of them.

The classes in this layer should operate on objects in the Backend Layer through interfaces and abstract methods, or on other objects in the Core Layer.

Core Layer

SubscriptionCampaignRelationFinder

This is the "main entry" into finding relations in the Subscription/SubscriptionCampaign area. Core logic (and business logic) should most often initiate work in this area through classes that implement this interface.

For most actual work you will get another object through this interface, and this other object will then be used to handle the more specific requests. E.g. if you want to find all the SubscriptionCampaigns that a specific Subscription owns, then you ask this interface to get an object that implements the SubscriptionCampaignFinder interface, and then you ask this other object to find the Subscription's SubscriptionCampaigns.

It is also through this interface that you can check whether SubscriptionCampaign sharing is enabled at all.

In Core, this interface is implemented by the class CoreSubscriptionCampaignRelationFinder.

SubscriptionCampaignFinder

A class that implements this interface is used for finding SubscriptionCampaigns for a specific Subscription. It can either be the SCs the subscription owns itself, or the SCs the Subscription has access to through sharing. These are the relations that are called 2A and 2B on this figure.

In Core, this interface is implemented by the class CoreSubscriptionCampaignFinder.

SubscriptionCampaignSharingMapper

A class that implements this interface is used for finding all the Sharing Groups relations a specific SubscriptionCampaign participates in. This is the relation that is called 1B on this figure.

Note that the returned result is not a specific SubscriptionCampaign, but rather a SubscriptionCampaignSharingBean (or some collection of these).

In Core, this interface is implemented by the class CoreSubscriptionCampaignSharingMapper.

Backend Layer

SubscriptionCampaignSharingBean

This class collects the information about a shared SubscriptionCampaign: Which specific SubscriptionCampaign it is, which method that is used for sharing it, and which group it is shared with.

SubscriptionCampaignSharingMethodMember

A class that implements this interface knows how to translate information about a shared SubscriptionCampaign into a SubscriptionCampaignSharingBean. There will be one class implementing this interface per sharing method. Each of these classes know which specific sharing method it covers.

In Backend, this interface is implemented by the classes SharedServiceMember and SubscriptionCampaignMember.

SubscriptionCampaignSharingGroup

A class that implements this interface can be used as a sharing group.

In Backend, this interface is implemented by the classes Subscription, BillingGroup, and Account.

Class Diagram

  • No labels