Vous êtes sur la page 1sur 13

Post Project

Business Layer Technical Design

Revision History
Date

Author

Change Summary

Version

09/11/2012 Abhishek Pandey

Create new design document by transforming requirements into


business use-cases which will drive the technical design process

1.0

09/12/2012 Abhishek Pandey

Added Details in Use Cases

1.1

09/13/2012 Abhishek Pandey

Added more description and added linking

1.2

09/14/2012 Abhishek Pandey

Made changes as per review comment given by Shrinivas Comments

1.2

References
Key

Document Location & Name

BRS

Guru Home > BRS > Shar ed Documents > Emplo yers > Post Project

Post Project v1.0.doc Dated Thu 8/6/2012


Post Project v1.1.doc Dated Thu 9/10/2012
Mockups

http://guru-sharepoint.a2zmoonlighter.com/mockups/Register-Dashboard/

Contents
Revision History ...................................................................................................................................................................... 1
1

Business Use Cases.......................................................................................................................................................... 3


1.1
Post a project with logged in employer/ Post a project with user credentials/ Post a project with newly
registered employer............................................................................................................................................................ 3
1.2

Post a new project to rehire a freelancer ............................................................................................................... 3

1.3

Post a new project to invite freelancer ................................................................................................................... 4

1.4

Modify project......................................................................................................................................................... 4

1.5

Repost project ......................................................................................................................................................... 4

1.6

Close initial project upon reposting project............................................................................................................ 5

1.7

Add new skill ........................................................................................................................................................... 5

1.8

Retrieve matching skills .......................................................................................................................................... 6

1.9

Retrieve matching cities .......................................................................................................................................... 6

1.10 Retrieve matching countries ................................................................................................................................... 6


Tuesday, September 11, 2012 by Abhishek Pandey
Page 1

1.11

Retrieve industry ..................................................................................................................................................... 6

1.12

Retrieve fixed price budget ..................................................................................................................................... 7

1.13

Retrieve project duration ........................................................................................................................................ 7

1.14

Retrieve hours per week ......................................................................................................................................... 7

1.15

Add skill based on project description .................................................................................................................... 7

Business Activity API ....................................................................................................................................................... 8


2.1

Guru.Business.Activities.Projects.ProjectData........................................................................................................ 8

2.1.1

ProjectData.PostProject .................................................................................................................................. 8

2.1.2

ProjectData.ModifyProject ............................................................................................................................. 9

2.1.3

ProjectData.RepostProject .............................................................................................................................. 9

2.1.4

ProjectData.CloseProjectOnRepost ................................................................................................................ 9

2.1.5

ProjectData.AddSkill...................................................................................................................................... 10

2.1.6

Web Method GetSkills .................................................................................................................................. 10

2.1.7

Web Method GetCities ................................................................................................................................. 10

2.1.8

Web Method GetCountry ............................................................................................................................. 10

2.1.9

ProjectData.GetIndustry ............................................................................................................................... 11

2.1.10

ProjectData.GetFixedPriceBudget ................................................................................................................ 11

2.1.11

ProjectData.GetDuration .............................................................................................................................. 11

2.1.12

ProjectData.GetHoursPerWeek .................................................................................................................... 11

2.1.13

ProjectData.GetInvitees ................................................................................................................................ 12

2.2

Supporting activity classes and enumerations ..................................................................................................... 12

2.2.1

PrivacySetting................................................................................................................................................ 12

2.2.2

LocationPreference ....................................................................................................................................... 12

2.2.3

BudgetType ................................................................................................................................................... 12

2.2.4

PostProjectType ............................................................................................... Error! Bookmark not defined.

2.3

DTO Classes ........................................................................................................................................................... 12

2.3.1

Project budget ............................................................................................................................................... 12

2.3.2

Project Location ............................................................................................................................................ 13

Data Provider API .......................................................................................................................................................... 13

Data Layer Notes ........................................................................................................................................................... 13


4.1

Mapped Entities .................................................................................................................................................... 13

Tuesday, September 11, 2012 by Abhishek Pandey

Page 2

1 Business Use Cases


1.1 Post a project with logged in employer/ Post a project with user credentials/ Post a
project with newly registered employer
Actor(s):

Employer

Input:

Authenticated Employer
Project title
Description
Privacy Setting information
Location Information
Industry Information
Attachments
Skills Information
Budget Information
Timeline
Project Type (PostProject)

Updates:
1. All specified information will be inserted in database.
Output:

None

See also:
Post a project with user credentials
1. Based on user credentials (User Name and Password) we need to login user first, after maintaining login with
provided credentials,
UI will call a method to post a project: all project related information will be inserted in database.
Post a project with newly registered employer
1. Need to register with user information (Full name, email address, Username, Password) once successful
registration done;
UI will call a method to post a project: All project related information will be inserted in database.

2.1.1 ProjectData.PostProject

1.2 Post a new project to rehire a freelancer


Actor(s):

Employer

Input:

Same as 1.1
Profile Id

Tuesday, September 11, 2012 by Abhishek Pandey

Page 3

Project Type (Rehire)

Updates:
1. A pre-approved new project will be posted with dummy proposal and awarded particular freelancer.
See also:
2.1.1 ProjectData.PostProject

1.3 Post a new project to invite freelancer


Actor(s):

Employer

Input:

Same as 1.1
Profile Id(s)
Project Type (Invite)

Updates:
1. A new project will be posted and invitation will be set to one or more specified freelancer.
See also:
2.1.1 ProjectData.PostProject

1.4 Modify project


Actor(s):

Employer

Input:

Same as 1.1
Project Id

Updates:

All modified information will be updated in database.

Output:

None.

See also:

2.1.2 ProjectData.ModifyProject

1.5 Repost project


Actor(s):

Employer

Tuesday, September 11, 2012 by Abhishek Pandey

Page 4

Input:

Authenticated Employer
Project id
Flag indicating whether initial project will remain open or close.

Updates:

None

Output:

A new project will be posted upon reposting initial project, it depends on user selection that initial project will
close or remain open.

See also:

2.1.3 ProjectData.RepostProject

1.6 Close initial project upon reposting project


Actor(s):

Employer

Input:

Authenticated Employer
Project id
Flag indicating whether initial project will remain open or close.

Updates:

Specified column in tProject table will update.

Output:

None.

See also:

2.1.4 ProjectData.CloseProjectOnRepost

1.7 Add new skill


Actor(s):

Employer

Input:

Skill

Updates:
1. All specified information will be inserted in database.
See also:

2.1.5 ProjectData.AddSkill

Tuesday, September 11, 2012 by Abhishek Pandey

Page 5

1.8 Retrieve matching skills


Actor(s):

Employer

Input:

3 char of skill entered by user

Output:

List of 8 skills matching the characters entered by the user will return as output.

See also:

2.1.6 GetSkills

1.9 Retrieve matching cities


Actor(s):

Employer

Input:

3 char of city entered by user

Output:

List of 5 cities will be return as output.

See also:

1.9 GetCities

1.10 Retrieve matching countries


Actor(s):

Employer

Input:

3 char of country entered by user

Output:

List of 5 countries will be return as output.

See also:

2.1.8 GetCountry

1.11 Retrieve industry


Actor(s):

Employer

Input:
Tuesday, September 11, 2012 by Abhishek Pandey

Page 6

None

Output:

List of industry return as output.

See also:

2.1.9 ProjectData.GetIndustry

1.12 Retrieve fixed price budget


Actor(s):

Employer

Output:

List of fixed price budget.

See also:

2.1.10 ProjectData.GetFixedPriceBudget

1.13 Retrieve project duration


Actor(s):

Employer

Output:

List of project duration.

See also:

2.1.11 ProjectData.GetDuration

1.14 Retrieve hours per week


Actor(s):

Employer

Output:

List of hours per week.

See also:

2.1.12 ProjectData.GetHoursPerWeek

1.15 Add skill based on project description


TBD
Tuesday, September 11, 2012 by Abhishek Pandey

Page 7

2 Business Activity API


2.1 Guru.Business.Activities.Projects.ProjectData
2.1.1 ProjectData.PostProject
Method signature in case of simple project being posted:
public void PostProject(string title,string description, PrivacySetting privacySetting,int?
allowSearch, ProjectLocation projectLocation,int industryId, IList<Attachments> Attachments,
IList<int> skillId, ProjectBudget projectBudget,datetime timeline)

Method signature in case of rehire:


public void PostProject(string title,string description, PrivacySetting privacySetting,int?
allowSearch, ProjectLocation projectLocation,int industryId, IList<Attachments> Attachments,
IList<int> skillId, ProjectBudget projectBudget,datetime timeline,int profileId)

Method signature in case of invite:


public void PostProject(string title,string description, PrivacySetting privacySetting,int?
allowSearch, ProjectLocation projectLocation,int industryId, IList<Attachments> Attachments,
IList<int> skillId, ProjectBudget projectBudget,datetime timeline,IList<int> profileIds)

Method details:
1.
2.
3.
4.

Retrieves the currently authenticated employer user.


If there is no such authenticated user, a GuruAuthenticationException is thrown.
Ensures all mandatory fields content is not null or empty
ProjectLocation and ProjectBudget is DTO object that will be used to pass location and budget information.
Method signature in case of simple project being posted
i. Construct and save the project in the database using the data layer
ii. Will call private method to check or add any new skill ref: 2.1.5 ProjectData.AddSkill
Method signature in case of rehire
i. Construct and save the project in the database using the data layer
ii. Will call private method to check or add any new skill ref: 2.1.5 ProjectData.AddSkill
iii.
Need to call existing method of projectdata.RehireFavoriteFreelancer that will take care all
required action.
Method signature in case of invite
i. Construct and save the project in the database using the data layer
ii. Will call private method to check or add any new skill ref: 2.1.5 ProjectData.AddSkill
iii.
Custom query against tGuruInvitations to insert invitation information.
Call a store procedure Project_updateInvitationCount to update invitation sent count.

Assumption :
Assuming that UI will pass all invites profiles ids in case of project posting for invitation.
As per current implemented logic we have lid being passed at time of invitation.
That belongs to table tCompanyInvite_temp table.
I guess we have to display all invitees profiles in post project page as we are displaying in current
functionality, if this is case than at presenter label to get all invitees profile through lid we need to call a
private method that will return all profiles through lid, Kindly ref section 2.1.13ProjectData.GetInvitees
Tuesday, September 11, 2012 by Abhishek Pandey

Page 8

otherwise we need to pass lid in post project method and inside that method we need to call
2.1.13ProjectData.GetInvitees method to get all profile ids.
Use cases:
1. 1.1, Post a Project

2.1.2 ProjectData.ModifyProject
Method signature:
public void ModifyProject(string title,string description,int industryId, IList<Attachments>
Attachments, IList<int> skillId, ProjectBudget projectBudget,datetime timeline,Project project)

Method details:
1.
2.
3.
4.
5.
6.

Retrieves the currently authenticated employer user.


If there is no such authenticated user, a GuruAuthenticationException is thrown.
Ensures the employer matches the employer associated with the project.
Ensures all mandatory fields content is not null or empty
ProjectBudget DTO object that will be used to pass budget information.
Update all information in database.

Use cases:
1. 1.4, Modify Project

2.1.3 ProjectData.RepostProject
Method signature:
public void RepostProject(int projectId,bool closeIntitialProject)

Method details:
1.
2.
3.
4.
5.
6.

Retrieves the currently authenticated employer user.


If there is no such authenticated user, a GuruAuthenticationException is thrown.
Ensures the employer matches the employer associated with the project.
Ensures all project id is not null or empty
Construct and save the project in the database using the data layer
Check if closeIntitialProject value is true then call private method 2.1.4 CloseProjectOnRepost.

Use cases:
1. 1.5, Repost Project

2.1.4 ProjectData.CloseProjectOnRepost
Method signature:
private void CloseProjectOnRepost(int projectId)

Method details:
1. Ensures all project id is not null or empty.
2. Update dateexpire, dateupdate column in of tproject table.
Tuesday, September 11, 2012 by Abhishek Pandey

Page 9

3. Custom query against tProjectClosures to insert information.


4. Custom query against tProject_ClosedEmail_temp to insert information.
5. Call a method to trigger an email after reposting a project.
Use cases:
1. 1.6 Close initial project upon reposting project

2.1.5 ProjectData.AddSkill
private void AddSkill(IList<skill> skill)

Method details:
1. Ensures all list of skill is not null or empty
2. Check all skill with existing skills if any new skill found call data layer to add new skills in database.
Use cases:
1. 1.7 Add new skill

2.1.6 Web Method GetSkills


public List<skill> GetSkills(string keyword)

Method details:
1. Ensure keyword is not null or empty
2. Retrieve List of 8 skills matching the characters entered by the user through Custom query against tSkillList.
Use cases:
1. 1.8 Retrieve matching skills

2.1.7 Web Method GetCities


public List<city> GetWordCities(string keyword)

Method details:
1. Ensure keyword is not null or empty
2. Retrieve List of 5 cities matching the characters entered by the user through Custom query against tWorldCities
Use cases:
1. 1.9 Retrieve matching cities

2.1.8 Web Method GetCountry


public List<country> GetCountry(string keyword)

Method details:
1. Ensure keyword is not null or empty
Tuesday, September 11, 2012 by Abhishek Pandey

Page 10

2. Retrieve List of 5 countries matching the characters entered by the user through Custom query against
tCountries.
Use cases:
1. 1.10 Retrieve matching countries

2.1.9 ProjectData.GetIndustry
public List<Industry> GetIndustry()

Method details:
1. Retrieve List of All industry through Custom query against tIndustry.
Use cases:
1. 1.11, Retrieve industry

2.1.10 ProjectData.GetFixedPriceBudget
public List<FixedPriceBudget> GetFixedPriceBudget()

Method details:
1. Retrieve List of All Fixed Price Budget through Custom query against tProjectBudget
Use cases:
1. 1.12, Retrieve fixed price budget

2.1.11 ProjectData.GetDuration
public List<Duration> GetProjectDuration()

Method details:
1. Retrieve List of All Duration through Custom query against tProjectDuration
Use cases:
1. 1.13, Retrieve project duration

2.1.12 ProjectData.GetHoursPerWeek
Public List<HoursPerWeek> GetHoursPerWeek()

Method details:
1. Retrieve List of All Hours per Week through Custom query against tHoursPerWeek.
Use cases:
1. 1.14, Retrieve hours per week
Tuesday, September 11, 2012 by Abhishek Pandey

Page 11

2.1.13 ProjectData.GetInvitees
private List<Profile> GetInvitees (int lid)

Method details:
1. Ensures lid is not null or empty
2. Retrieve List of invitees profiles.
3. Through Custom query against tCompanyInvite_temp
Use cases:
1. 2.1.1 ProjectData.PostProject

2.2 Supporting activity classes and enumerations


2.2.1 ProjectPrivacySetting

2.2.2 ProjectLocationPreference

2.2.3 BudgetType

2.3 DTO Classes


2.3.1 Project budget

Tuesday, September 11, 2012 by Abhishek Pandey

Page 12

2.3.2 Project Location

3 Data Provider API


TBD

4 Data Layer Notes


4.1 Mapped Entities
For reference, these mapped entities include the following:

Project tProject

Tuesday, September 11, 2012 by Abhishek Pandey

Page 13

Vous aimerez peut-être aussi