tmp9eca

Upload: skrishatguru

Post on 14-Apr-2018

216 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/27/2019 tmp9ECA

    1/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 1

    Post ProjectBusiness 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>BR S>Shared Documents>Employers > Post ProjectPost 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/

    ContentsRevision 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

    http://guru-sharepoint.a2zmoonlighter.com/http://guru-sharepoint.a2zmoonlighter.com/http://guru-sharepoint.a2zmoonlighter.com/BRShttp://guru-sharepoint.a2zmoonlighter.com/BRShttp://guru-sharepoint.a2zmoonlighter.com/BRShttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2FBRS%2FShared%20Documents%2FEmployers&View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2FBRS%2FShared%20Documents%2FEmployers&View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2FBRS%2FShared%20Documents%2FEmployers&View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/mockups/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2fmockups%2fShared%20Documents%2fhtml%2fRegister-Dashboard&FolderCTID=&View=%7bA5F45951-3164-46C6-B11C-BFCD31EFA0E4%7dhttp://guru-sharepoint.a2zmoonlighter.com/mockups/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2fmockups%2fShared%20Documents%2fhtml%2fRegister-Dashboard&FolderCTID=&View=%7bA5F45951-3164-46C6-B11C-BFCD31EFA0E4%7dhttp://guru-sharepoint.a2zmoonlighter.com/mockups/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2fmockups%2fShared%20Documents%2fhtml%2fRegister-Dashboard&FolderCTID=&View=%7bA5F45951-3164-46C6-B11C-BFCD31EFA0E4%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?RootFolder=%2FBRS%2FShared%20Documents%2FEmployers&View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRS/Shared%20Documents/Forms/AllItems.aspx?View=%7b648CBA5F%2dC557%2d4F41%2dAA19%2d2B3E8A9E67CB%7dhttp://guru-sharepoint.a2zmoonlighter.com/BRShttp://guru-sharepoint.a2zmoonlighter.com/
  • 7/27/2019 tmp9ECA

    2/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 2

    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

    2 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

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

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

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

  • 7/27/2019 tmp9ECA

    3/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 3

    1 Business Use Cases1.1 Post a project with logged in employer/ Post a project with user credentials/ Post a

    project with newly registered employer

    Actor(s):

    EmployerInput:

    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:

    NoneSee 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 withprovided 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 successfulregistration 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 freelancerActor(s):

    EmployerInput:

    Same as 1.1 Profile Id

  • 7/27/2019 tmp9ECA

    4/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 4

    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 freelancerActor(s):

    EmployerInput:

    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 projectActor(s):

    EmployerInput:

    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 projectActor(s):

    Employer

  • 7/27/2019 tmp9ECA

    5/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 5

    Input:

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

    Updates:

    NoneOutput:

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

    See also:

    2.1.3 ProjectData.RepostProject

    1.6 Close initial project upon reposting projectActor(s):

    EmployerInput:

    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 skillActor(s):

    EmployerInput:

    SkillUpdates:

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

    2.1.5 ProjectData.AddSkill

  • 7/27/2019 tmp9ECA

    6/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 6

    1.8 Retrieve matching skillsActor(s):

    EmployerInput:

    3 char of skill entered by userOutput:

    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 citiesActor(s):

    EmployerInput:

    3 char of city entered by userOutput:

    List of 5 cities will be return as output.See also:

    1.9 GetCities1.10Retrieve matching countriesActor(s):

    EmployerInput:

    3 char of country entered by userOutput:

    List of 5 countries will be return as output.See also:

    2.1.8 GetCountry

    1.11Retrieve industryActor(s):

    EmployerInput:

  • 7/27/2019 tmp9ECA

    7/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 7

    NoneOutput:

    List of industry return as output.See also:

    2.1.9 ProjectData.GetIndustry

    1.12Retrieve fixed price budgetActor(s):

    EmployerOutput:

    List of fixed price budget.See also:

    2.1.10 ProjectData.GetFixedPriceBudget

    1.13Retrieve project durationActor(s):

    EmployerOutput:

    List of project duration.See also:

    2.1.11 ProjectData.GetDuration

    1.14Retrieve hours per weekActor(s):

    EmployerOutput:

    List of hours per week.See also:

    2.1.12 ProjectData.GetHoursPerWeek

    1.15Add skill based on project descriptionTBD

  • 7/27/2019 tmp9ECA

    8/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 8

    2 Business Activity API

    2.1 Guru.Business.Activities.Projects.ProjectData2.1.1 ProjectData.PostProjectMethod 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,

    IList 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,

    IList 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,

    IList skillId, ProjectBudget projectBudget,datetime timeline,IList profileIds)

    Method details:

    1. Retrieves the currently authenticated employer user.2. If there is no such authenticated user, a GuruAuthenticationException is thrown.3. Ensures all mandatory fields content is not null or empty4. ProjectLocation and ProjectBudget is DTO object that will be used to pass location and budget information.

    Method signature in case of simple project being postedi. Construct and save the project in the database using the data layerii. Will call private method to check or add any new skill ref: 2.1.5 ProjectData.AddSkill

    Method signature in case of rehirei. Construct and save the project in the database using the data layerii.Will call private method to check or add any new skill ref: 2.1.5 ProjectData.AddSkilliii. Need to call existing method of projectdata.RehireFavoriteFreelancer that will take care all

    required action.

    Method signature in case of invitei. Construct and save the project in the database using the data layerii.Will call private method to check or add any new skill ref: 2.1.5 ProjectData.AddSkilliii. 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 section2.1.13ProjectData.GetInvitees

  • 7/27/2019 tmp9ECA

    9/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 9

    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 Project2.1.2 ProjectData.ModifyProjectMethod signature:

    public void ModifyProject(string title,string description,int industryId, IList

    Attachments, IList skillId, ProjectBudget projectBudget,datetime timeline,Project project)

    Method details:

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

    Use cases:

    1. 1.4, Modify Project2.1.3 ProjectData.RepostProjectMethod signature:

    public void RepostProject(int projectId,bool closeIntitialProject)

    Method details:

    1. Retrieves the currently authenticated employer user.2. If there is no such authenticated user, a GuruAuthenticationException is thrown.3. Ensures the employer matches the employer associated with the project.4. Ensures all project id is not null or empty5. Construct and save the project in the database using the data layer6. 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.CloseProjectOnRepostMethod 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.

  • 7/27/2019 tmp9ECA

    10/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 10

    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.AddSkillprivate void AddSkill(IList skill)

    Method details:

    1. Ensures all list of skill is not null or empty2. 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 skill2.1.6 Web Method GetSkillspublic List GetSkills(string keyword)

    Method details:

    1. Ensure keyword is not null or empty2. Retrieve List of 8 skills matching the characters entered by the user through Custom query againsttSkillList.

    Use cases:

    1. 1.8 Retrieve matching skills2.1.7 Web Method GetCitiespublic List GetWordCities(string keyword)

    Method details:

    1. Ensure keyword is not null or empty2. Retrieve List of 5 cities matching the characters entered by the user through Custom query againsttWorldCities

    Use cases:

    1. 1.9 Retrieve matching cities2.1.8 Web Method GetCountrypublic List GetCountry(string keyword)

    Method details:

    1. Ensure keyword is not null or empty

  • 7/27/2019 tmp9ECA

    11/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 11

    2. Retrieve List of 5 countries matching the characters entered by the user through Custom query againsttCountries.

    Use cases:

    1. 1.10 Retrieve matching countries

    2.1.9 ProjectData.GetIndustrypublic List GetIndustry()

    Method details:

    1. Retrieve List of All industry through Custom query against tIndustry.Use cases:

    1. 1.11, Retrieve industry2.1.10ProjectData.GetFixedPriceBudgetpublic List GetFixedPriceBudget()

    Method details:

    1. Retrieve List of All Fixed Price Budget through Custom query against tProjectBudgetUse cases:

    1. 1.12, Retrieve fixed price budget2.1.11ProjectData.GetDurationpublic List GetProjectDuration()

    Method details:

    1. Retrieve List of All Duration through Custom query against tProjectDurationUse cases:

    1. 1.13, Retrieve project duration2.1.12ProjectData.GetHoursPerWeekPublic List GetHoursPerWeek()

    Method details:

    1. Retrieve List of All Hours per Week through Custom query againsttHoursPerWeek.Use cases:

    1. 1.14, Retrieve hours per week

  • 7/27/2019 tmp9ECA

    12/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 12

    2.1.13ProjectData.GetInviteesprivate List GetInvitees (int lid)

    Method details:

    1. Ensures lid is not null or empty2. 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 enumerations2.2.1 ProjectPrivacySetting

    2.2.2 ProjectLocationPreference

    2.2.3 BudgetType

    2.3 DTO Classes2.3.1 Project budget

  • 7/27/2019 tmp9ECA

    13/13

    Tuesday, September 11, 2012 by Abhishek Pandey Page 13

    2.3.2 Project Location

    3 Data Provider APITBD

    4 Data Layer Notes4.1 Mapped EntitiesFor reference, these mapped entities include the following:

    Project tProject