Exemple #1
0
 /// <summary>
 /// The relative url (rest resource) of the entity type
 /// </summary>
 internal virtual string GetRelativeUrl(PenneoConnector con)
 {
     return(con.ServiceLocator.GetInstance <RestResources>().GetResource(GetType(), Parent));
 }
Exemple #2
0
 /// <summary>
 /// Get file assets with the given name for this entity
 /// </summary>
 protected byte[] GetFileAssets(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetFileAssets(this, assetName));
 }
Exemple #3
0
 protected T GetAsset <T>(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetAsset <T>(this, assetName));
 }
Exemple #4
0
 /// <summary>
 /// Activate the case file
 /// </summary>
 public bool Activate(PenneoConnector con)
 {
     return(PerformAction(con, ACTION_ACTIVATE).Success);
 }
Exemple #5
0
 /// <summary>
 /// Get entity linked with this entity based on url
 /// </summary>
 protected QuerySingleObjectResult <T> GetLinkedEntity <T>(PenneoConnector con, string url = null)
     where T : Entity
 {
     return(con.ApiConnector.GetLinkedEntity <T>(this, url));
 }
Exemple #6
0
 /// <summary>
 /// Get all available case file templates
 /// </summary>
 public QueryResult <CaseFileTemplate> GetTemplates(PenneoConnector con)
 {
     return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes"));
 }
Exemple #7
0
 /// <summary>
 /// Get all errors associated with the case file
 /// </summary>
 public IEnumerable <string> GetErrors(PenneoConnector con)
 {
     return(GetStringListAsset(con, "errors"));
 }
Exemple #8
0
 public IEnumerable <LogEntry> GetEventLog(PenneoConnector con)
 {
     return(GetLinkedEntities <LogEntry>(con).Objects);
 }
Exemple #9
0
 public RestConnector(PenneoConnector con)
 {
     _con = con;
 }
Exemple #10
0
 public string GetLink(PenneoConnector con)
 {
     return(GetTextAssets(con, ASSET_LINK));
 }
Exemple #11
0
 public ValidationContents GetContents(PenneoConnector con)
 {
     return(GetAsset <ValidationContents>(con, ASSET_CONTENTS));
 }
Exemple #12
0
 public byte[] GetPdf(PenneoConnector con)
 {
     return(GetFileAssets(con, ASSET_PDF));
 }
Exemple #13
0
        /// <summary>
        /// Get request data from the entity as a property->value dictionary
        /// </summary>
        public Dictionary <string, object> GetRequestData(PenneoConnector con)
        {
            var values = IsNew ? GetMapping(con).GetCreateValues(this) : GetMapping(con).GetUpdateValues(this);

            return(values);
        }
Exemple #14
0
 /// <summary>
 /// The entity type mapping
 /// </summary>
 internal IMapping GetMapping(PenneoConnector con)
 {
     return(con.ServiceLocator.GetInstance <Mappings>().GetMapping(GetType()));
 }
Exemple #15
0
 public IEnumerable <Customer> GetCustomers(PenneoConnector con)
 {
     return(_customers ?? (_customers = GetLinkedEntities <Customer>(con).Objects.ToList()));
 }
Exemple #16
0
 public Query(PenneoConnector con)
 {
     _con = con;
 }
Exemple #17
0
 public IEnumerable <CaseFileTemplate> GetCaseFileTemplates(PenneoConnector con)
 {
     return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes").Objects);
 }
Exemple #18
0
 internal override string GetRelativeUrl(PenneoConnector con)
 {
     return("/casefiles/" + CaseFileId + "/signers/" + SignerId + "/signertypes/" + SignerTypeId);
 }
Exemple #19
0
 /// <summary>
 /// Get all available documents types for this case file
 /// </summary>
 public IEnumerable <DocumentType> GetDocumentTypes(PenneoConnector con)
 {
     return(GetLinkedEntities <DocumentType>(con, "casefiles/" + Id + "/documenttypes").Objects);
 }
Exemple #20
0
 public bool AddCaseFile(PenneoConnector con, CaseFile caseFile)
 {
     return(LinkEntity(con, caseFile));
 }
Exemple #21
0
 /// <summary>
 /// Send the case file for signing
 /// </summary>
 public bool Send(PenneoConnector con)
 {
     return(PerformAction(con, ACTION_SEND).Success);
 }
Exemple #22
0
 public bool RemoveCaseFile(PenneoConnector con, CaseFile caseFile)
 {
     return(UnlinkEntity(con, caseFile));
 }
Exemple #23
0
 /// <summary>
 /// Get the latest server result for the entity
 /// </summary>
 public ServerResult GetLatestServerResult(PenneoConnector con)
 {
     return(con.ApiConnector.GetLatestEntityServerResult(this));
 }
Exemple #24
0
 public bool AddValidation(PenneoConnector con, Validation validation)
 {
     return(LinkEntity(con, validation));
 }
Exemple #25
0
 /// <summary>
 /// Find a specific linked entity
 /// </summary>
 protected T FindLinkedEntity <T>(PenneoConnector con, int id)
 {
     return(con.ApiConnector.FindLinkedEntity <T>(this, id));
 }
Exemple #26
0
 public bool RemoveValidation(PenneoConnector con, Validation validation)
 {
     return(UnlinkEntity(con, validation));
 }
Exemple #27
0
 /// <summary>
 /// Get text assets with the given name for this entity
 /// </summary>
 protected string GetTextAssets(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetTextAssets(this, assetName));
 }
 public bool SetSigner(PenneoConnector con, Signer signer)
 {
     Signer = signer;
     return(LinkEntity(con, Signer));
 }
Exemple #29
0
 /// <summary>
 /// Get list of string asset with the given name for this entity
 /// </summary>
 protected IEnumerable <string> GetStringListAsset(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetStringListAsset(this, assetName));
 }
Exemple #30
0
 /// <summary>
 /// Perform the given action on this entity
 /// </summary>
 protected ServerResult PerformAction(PenneoConnector con, string action)
 {
     return(con.ApiConnector.PerformAction(this, action));
 }