C# Class Commencement.Controllers.Helpers.LetterGenerator

Inheritance: ILetterGenerator
ファイルを表示 Open project: ucdavis/Commencement

Public Methods

Method Description
GenerateEmailAllStudents ( Ceremony ceremony, Student student, string body, TemplateType templateType, Registration registration, Attachment attachment, System.Web.HttpRequestBase request, System.Web.Mvc.UrlHelper url ) : string
GenerateExtraTicketRequestPetitionConfirmation ( RegistrationParticipation registrationParticipation, Template template ) : string
GenerateExtraTicketRequestPetitionDecision ( RegistrationParticipation registrationParticipation, Template template, Attachment attachment, System.Web.HttpRequestBase request, System.Web.Mvc.UrlHelper url, string body = null ) : string
GenerateMoveMajor ( RegistrationParticipation registrationParticipation, Template template ) : string
GenerateRegistrationConfirmation ( RegistrationParticipation registrationParticipation, Template template ) : string
GenerateRegistrationPetitionApproved ( RegistrationPetition registrationPetition, Template template ) : string
GenerateRegistrationPetitionConfirmation ( RegistrationPetition registrationPetition, Template template ) : string
GenerateVisaLetterRequestDecision ( VisaLetter visaLetter, Template template, System.Web.HttpRequestBase request, System.Web.Mvc.UrlHelper url ) : string
ValidateTemplate ( Template template, List invalidTokens ) : bool

Private Methods

Method Description
GetAbsoluteUrl ( System.Web.HttpRequestBase request, System.Web.Mvc.UrlHelper url, string relative ) : string
HandleBody ( string body ) : string

Takes the template text from the database and converts it to the finalized text

ValidateBody ( string body, TemplateType templateType, List InvalidTokens ) : bool

Iterates through the body text and validates all tokens against list of tokens

replaceParameter ( string parameter ) : string

Returns the string data that should be replaced into the template text to create the final letter for the students.

Method Details

GenerateEmailAllStudents() public method

public GenerateEmailAllStudents ( Ceremony ceremony, Student student, string body, TemplateType templateType, Registration registration, Attachment attachment, System.Web.HttpRequestBase request, System.Web.Mvc.UrlHelper url ) : string
ceremony Ceremony
student Student
body string
templateType TemplateType
registration Registration
attachment Attachment
request System.Web.HttpRequestBase
url System.Web.Mvc.UrlHelper
return string

GenerateExtraTicketRequestPetitionConfirmation() public method

public GenerateExtraTicketRequestPetitionConfirmation ( RegistrationParticipation registrationParticipation, Template template ) : string
registrationParticipation RegistrationParticipation
template Template
return string

GenerateExtraTicketRequestPetitionDecision() public method

public GenerateExtraTicketRequestPetitionDecision ( RegistrationParticipation registrationParticipation, Template template, Attachment attachment, System.Web.HttpRequestBase request, System.Web.Mvc.UrlHelper url, string body = null ) : string
registrationParticipation RegistrationParticipation
template Template
attachment Attachment
request System.Web.HttpRequestBase
url System.Web.Mvc.UrlHelper
body string
return string

GenerateMoveMajor() public method

public GenerateMoveMajor ( RegistrationParticipation registrationParticipation, Template template ) : string
registrationParticipation RegistrationParticipation
template Template
return string

GenerateRegistrationConfirmation() public method

public GenerateRegistrationConfirmation ( RegistrationParticipation registrationParticipation, Template template ) : string
registrationParticipation RegistrationParticipation
template Template
return string

GenerateRegistrationPetitionApproved() public method

public GenerateRegistrationPetitionApproved ( RegistrationPetition registrationPetition, Template template ) : string
registrationPetition RegistrationPetition
template Template
return string

GenerateRegistrationPetitionConfirmation() public method

public GenerateRegistrationPetitionConfirmation ( RegistrationPetition registrationPetition, Template template ) : string
registrationPetition RegistrationPetition
template Template
return string

GenerateVisaLetterRequestDecision() public method

public GenerateVisaLetterRequestDecision ( VisaLetter visaLetter, Template template, System.Web.HttpRequestBase request, System.Web.Mvc.UrlHelper url ) : string
visaLetter VisaLetter
template Template
request System.Web.HttpRequestBase
url System.Web.Mvc.UrlHelper
return string

ValidateTemplate() public method

public ValidateTemplate ( Template template, List invalidTokens ) : bool
template Template
invalidTokens List
return bool