Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #3
0
 protected T GetAsset <T>(PenneoConnector con, string assetName)
 {
     return(con.ApiConnector.GetAsset <T>(this, assetName));
 }
Beispiel #4
0
 /// <summary>
 /// Activate the case file
 /// </summary>
 public bool Activate(PenneoConnector con)
 {
     return(PerformAction(con, ACTION_ACTIVATE).Success);
 }
Beispiel #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));
 }
Beispiel #6
0
 /// <summary>
 /// Get all available case file templates
 /// </summary>
 public QueryResult <CaseFileTemplate> GetTemplates(PenneoConnector con)
 {
     return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes"));
 }
Beispiel #7
0
 /// <summary>
 /// Get all errors associated with the case file
 /// </summary>
 public IEnumerable <string> GetErrors(PenneoConnector con)
 {
     return(GetStringListAsset(con, "errors"));
 }
Beispiel #8
0
 public IEnumerable <LogEntry> GetEventLog(PenneoConnector con)
 {
     return(GetLinkedEntities <LogEntry>(con).Objects);
 }
Beispiel #9
0
 public RestConnector(PenneoConnector con)
 {
     _con = con;
 }
Beispiel #10
0
 public string GetLink(PenneoConnector con)
 {
     return(GetTextAssets(con, ASSET_LINK));
 }
Beispiel #11
0
 public ValidationContents GetContents(PenneoConnector con)
 {
     return(GetAsset <ValidationContents>(con, ASSET_CONTENTS));
 }
Beispiel #12
0
 public byte[] GetPdf(PenneoConnector con)
 {
     return(GetFileAssets(con, ASSET_PDF));
 }
Beispiel #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);
        }
Beispiel #14
0
 /// <summary>
 /// The entity type mapping
 /// </summary>
 internal IMapping GetMapping(PenneoConnector con)
 {
     return(con.ServiceLocator.GetInstance <Mappings>().GetMapping(GetType()));
 }
Beispiel #15
0
 public IEnumerable <Customer> GetCustomers(PenneoConnector con)
 {
     return(_customers ?? (_customers = GetLinkedEntities <Customer>(con).Objects.ToList()));
 }
Beispiel #16
0
 public Query(PenneoConnector con)
 {
     _con = con;
 }
Beispiel #17
0
 public IEnumerable <CaseFileTemplate> GetCaseFileTemplates(PenneoConnector con)
 {
     return(GetLinkedEntities <CaseFileTemplate>(con, "casefile/casefiletypes").Objects);
 }
Beispiel #18
0
 internal override string GetRelativeUrl(PenneoConnector con)
 {
     return("/casefiles/" + CaseFileId + "/signers/" + SignerId + "/signertypes/" + SignerTypeId);
 }
Beispiel #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);
 }
Beispiel #20
0
 public bool AddCaseFile(PenneoConnector con, CaseFile caseFile)
 {
     return(LinkEntity(con, caseFile));
 }
Beispiel #21
0
 /// <summary>
 /// Send the case file for signing
 /// </summary>
 public bool Send(PenneoConnector con)
 {
     return(PerformAction(con, ACTION_SEND).Success);
 }
Beispiel #22
0
 public bool RemoveCaseFile(PenneoConnector con, CaseFile caseFile)
 {
     return(UnlinkEntity(con, caseFile));
 }
Beispiel #23
0
 /// <summary>
 /// Get the latest server result for the entity
 /// </summary>
 public ServerResult GetLatestServerResult(PenneoConnector con)
 {
     return(con.ApiConnector.GetLatestEntityServerResult(this));
 }
Beispiel #24
0
 public bool AddValidation(PenneoConnector con, Validation validation)
 {
     return(LinkEntity(con, validation));
 }
Beispiel #25
0
 /// <summary>
 /// Find a specific linked entity
 /// </summary>
 protected T FindLinkedEntity <T>(PenneoConnector con, int id)
 {
     return(con.ApiConnector.FindLinkedEntity <T>(this, id));
 }
Beispiel #26
0
 public bool RemoveValidation(PenneoConnector con, Validation validation)
 {
     return(UnlinkEntity(con, validation));
 }
Beispiel #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));
 }
Beispiel #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));
 }
Beispiel #30
0
 /// <summary>
 /// Perform the given action on this entity
 /// </summary>
 protected ServerResult PerformAction(PenneoConnector con, string action)
 {
     return(con.ApiConnector.PerformAction(this, action));
 }