Business Case of Manager-Client Contract System

Note
This business case has been conceived for the demonstration purpose and serves well for a typical manager-client system. There may be simpler or complex scenarios in real life businesses.

Business Case

  1. There are many managers offering their services.
  2. There are multiple clients in the market.
  3. A manager can sign multiple contracts and start working.
  4. A contract may contain multiple clients.
  5. The data is fetched from custom objects and report is generated.

Reporting Requirements

  1. A report based on some criteria is to be generated.
  2. The report can be in any of the formats: Documents, Spreadsheets, Presentations.
  3. The report developer must be able to define templates and then generate reports.

Business Objects

Custom Objects

Here are our customer objects:

// For complete examples and data files, please go to https://github.com/groupdocs-assembly/GroupDocs.Assembly-for-Java
public static class Manager {
public Manager(String name, int age, String color,Iterable<Contract> contracts) {
mName = name;
mAge = age;
mColor = color;
mContracts = contracts;
}
public String getName() {
return mName;
}
public int getAge() {
return mAge;
}
public String getColor() {
return mColor;
}
public String getPhoto() throws Exception {
return CommonUtilities.image + "/no-photo.jpg";
}
public String getOuterDoc() throws Exception{
return CommonUtilities.outerDoc + "/OuterDoc.docx";
}
public String getNestedOuterDoc() throws Exception{
return CommonUtilities.outerDoc + "/NestedOuterDocument.docx";
}
public Iterable<Contract> getContracts() {
return mContracts;
}
private final String mName;
private final int mAge;
private final Iterable<Contract> mContracts;
private final String mColor;
}
public static class Contract {
public Contract(Manager manager, Client client, float price, Date date) {
mManager = manager;
mClient = client;
mPrice = price;
mDate = date;
mServices = null;
}
public Contract(Manager manager, Client client, float price, Date date,Iterable<Service> services) {
mManager = manager;
mClient = client;
mPrice = price;
mDate = date;
mServices = services;
}
public Manager getManager() {
return mManager;
}
public Client getClient() {
return mClient;
}
public float getPrice() {
return mPrice;
}
public Date getDate() {
return mDate;
}
public Iterable<Service> getServices() {
return mServices;
}
private final Manager mManager;
private final Client mClient;
private final float mPrice;
private final Date mDate;
private final Iterable<Service> mServices;
}
public static class Client {
public Client(String name) {
mName = name;
}
public String getName() {
return mName;
}
private final String mName;
}
public static class Service {
public Service(String name) {
mName = name;
}
public String getName() {
return mName;
}
private final String mName;
}

Templates Location

There is a fixed location of templates somewhere /Date/Source/. The report developer may create any number of templates and can create sub directories under /Data/Source/ in order to organize the templates as per convenience.

Reports Location

The reports can be placed anywhere under directory /Data/Destination/. The report developer can create sub directories and give name to the output reports as per convenience.

Close
Loading

Analyzing your prompt, please hold on...

An error occurred while retrieving the results. Please refresh the page and try again.