public static void WebStart(IApplicationBuilder app, IWebHostEnvironment env, IHostApplicationLifetime lifetime) { SignumServer.Start(app, env, typeof(Startup).Assembly); AuthServer.Start(app, () => Starter.Configuration.Value.AuthTokens, "IMPORTANT SECRET FROM AtTest. CHANGE THIS STRING!!!"); CacheServer.Start(app); FilesServer.Start(app); UserQueryServer.Start(app); DashboardServer.Start(app); WordServer.Start(app); ExcelServer.Start(app); ChartServer.Start(app); MapServer.Start(app); ToolbarServer.Start(app); TranslationServer.Start(app, new AlreadyTranslatedTranslator(new AzureTranslator("Your API Key for Azure Translate"))); SchedulerServer.Start(app, lifetime); ProcessServer.Start(app); MailingServer.Start(app); ProfilerServer.Start(app); DiffLogServer.Start(app); PredictorServer.Start(app); OmniboxServer.Start(app, new EntityOmniboxResultGenenerator(), new DynamicQueryOmniboxResultGenerator(), new ChartOmniboxResultGenerator(), new DashboardOmniboxResultGenerator(DashboardLogic.Autocomplete), new UserQueryOmniboxResultGenerator(UserQueryLogic.Autocomplete), new UserChartOmniboxResultGenerator(UserChartLogic.Autocomplete), new MapOmniboxResultGenerator(type => OperationLogic.TypeOperations(type).Any()), new ReactSpecialOmniboxGenerator() //new HelpModuleOmniboxResultGenerator(), ); //Omnibox SignumCultureSelectorFilter.GetCurrentCulture = (ctx) => GetCulture(ctx); }
public EntityPackTS ExecuteLite([Required, FromBody] LiteOperationRequest request) { var op = request.GetOperationSymbol(request.lite.EntityType); var entity = OperationLogic.ServiceExecuteLite(request.lite, op, request.ParseArgs(op)); return(SignumServer.GetEntityPack(entity)); }
public static void WebStart(HttpConfiguration config) { SignumServer.Start(config, typeof(Global).Assembly); AuthServer.Start(config, () => Starter.Configuration.Value.AuthTokens, "IMPORTANT SECRET FROM Southwind. CHANGE THIS STRING!!!"); CacheServer.Start(config); FilesServer.Start(config); UserQueryServer.Start(config); DashboardServer.Start(config); WordServer.Start(config); ExcelServer.Start(config); ChartServer.Start(config); MapServer.Start(config); TranslationServer.Start(config, new AlreadyTranslatedTranslator(new BingTranslator())); SchedulerServer.Start(config); ProcessServer.Start(config); DisconnectedServer.Start(config); MailingServer.Start(config); ProfilerServer.Start(config); DiffLogServer.Start(config); OmniboxServer.Start(config, new EntityOmniboxResultGenenerator(), new DynamicQueryOmniboxResultGenerator(), new ChartOmniboxResultGenerator(), new DashboardOmniboxResultGenerator(DashboardLogic.Autocomplete), new UserQueryOmniboxResultGenerator(UserQueryLogic.Autocomplete), new UserChartOmniboxResultGenerator(UserChartLogic.Autocomplete), new MapOmniboxResultGenerator(type => OperationLogic.TypeOperations(type).Any()), new ReactSpecialOmniboxGenerator() //new HelpModuleOmniboxResultGenerator(), ); //Omnibox }
public EntityPackTS ConstructFromMany([Required, FromBody] OperationController.MultiOperationRequest request) { var type = request.Type == null ? null : TypeLogic.GetType(request.Type); var entity = PackageLogic.CreatePackageOperation(request.Lites, request.GetOperationSymbol(type !), request.Args); return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS?ConstructFromEntity([Required, FromBody] EntityOperationRequest request) { var op = request.GetOperationSymbol(request.entity.GetType()); var entity = OperationLogic.ServiceConstructFrom(request.entity, op, request.ParseArgs(op)); return(entity == null ? null : SignumServer.GetEntityPack(entity)); }
public EntityPackTS ConstructFromMany([Required, FromBody] MultiOperationRequest request) { var type = request.lites.Select(l => l.EntityType).Distinct().Only() ?? TypeLogic.GetType(request.type); var entity = OperationLogic.ServiceConstructFromMany(request.lites, type, request.GetOperationSymbol(type), request.args); return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS?Construct([Required, FromBody] ConstructOperationRequest request) { var entityType = TypeLogic.GetType(request.type); var entity = OperationLogic.ServiceConstruct(entityType, request.GetOperationSymbol(entityType), request.args); return(entity == null ? null : SignumServer.GetEntityPack(entity)); }
public EntityPackTS Construct(ConstructOperationRequest request) { var type = TypeLogic.GetType(request.type); var entity = OperationLogic.ServiceConstruct(type, request.operarionSymbol, request.args); return(entity == null ? null : SignumServer.GetEntityPack(entity)); }
public EntityPackTS ConstructFromMany(MultiOperationRequest request) { var type = request.type == null ? null : TypeLogic.GetType(request.type); var entity = OperationLogic.ServiceConstructFromMany(request.lites, type, request.GetOperationSymbol(type), request.args); return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS ConstructFromMany(OperationController.MultiOperationRequest request) { var type = request.type == null ? null : TypeLogic.GetType(request.type); var entity = PackageLogic.CreatePackageOperation(request.lites, request.operarionSymbol, request.args); return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS?ConstructFromMany([Required, FromBody] MultiOperationRequest request) { var type = request.Lites.Select(l => l.EntityType).Distinct().Only() ?? TypeLogic.GetType(request.Type); var op = request.GetOperationSymbol(type); var entity = OperationLogic.ServiceConstructFromMany(request.Lites, type, op, request.ParseArgs(op)); return(entity == null ? null : SignumServer.GetEntityPack(entity)); }
public EntityPackTS GetEntityPack(string type, string id) { var entityType = TypeLogic.GetType(type); var primaryKey = PrimaryKey.Parse(id, entityType); var entity = Database.Retrieve(entityType, primaryKey); return(SignumServer.GetEntityPack(entity)); }
public EntityPackCaseFlow GetCaseFlowPack(string caseActivityId) { var lite = Lite.ParsePrimaryKey <CaseActivityEntity>(caseActivityId); var dbValues = lite.InDB(a => new { a.Case, a.WorkflowActivity }); return(new EntityPackCaseFlow { pack = SignumServer.GetEntityPack(dbValues.Case), workflowActivity = dbValues.WorkflowActivity, }); }
public EntityPackTS GetEntityPack(string type, string id) { var entityType = TypeLogic.GetType(type); var primaryKey = PrimaryKey.Parse(id, entityType); var entity = Database.Retrieve(entityType, primaryKey); using (ExecutionMode.ApiRetrievedScope(entity, "EntitiesController.GetEntityPack")) { return(SignumServer.GetEntityPack(entity)); } }
public ActionResult <EntityPackTS> ExecuteEntity([Required, FromBody] EntityOperationRequest request) { Entity entity; try { entity = OperationLogic.ServiceExecute(request.entity, request.GetOperationSymbol(request.entity.GetType()), request.args); } catch (IntegrityCheckException ex) { GraphExplorer.SetValidationErrors(GraphExplorer.FromRoot(request.entity), ex); this.TryValidateModel(request, "request"); return(BadRequest(this.ModelState)); } return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS ExecuteEntity(EntityOperationRequest request) { Entity entity; try { entity = OperationLogic.ServiceExecute(request.entity, request.GetOperationSymbol(request.entity.GetType()), request.args); } catch (IntegrityCheckException ex) { GraphExplorer.SetValidationErrors(GraphExplorer.FromRoot(request.entity), ex); this.Validate(request, "request"); throw new HttpResponseException(Request.CreateErrorResponse(HttpStatusCode.BadRequest, this.ModelState)); } return(SignumServer.GetEntityPack(entity)); }
public ActionResult <EntityPackWithIssues> SaveWorkflow([Required, FromBody] EntityOperationRequest request) { WorkflowEntity entity; List <WorkflowIssue> issuesContainer = new List <WorkflowIssue>(); try { entity = ((WorkflowEntity)request.entity).Execute(WorkflowOperation.Save, (request.args.EmptyIfNull()).And(issuesContainer).ToArray()); } catch (IntegrityCheckException ex) { GraphExplorer.SetValidationErrors(GraphExplorer.FromRoot(request.entity), ex); this.TryValidateModel(request, "request"); this.ModelState.AddModelError("workflowIssues", JsonConvert.SerializeObject(issuesContainer, SignumServer.JsonSerializerSettings)); return(BadRequest(this.ModelState)); } return(new EntityPackWithIssues(SignumServer.GetEntityPack(entity), issuesContainer)); }
public EntityPackWorkflow GetEntity(string caseActivityId) { var lite = Lite.ParsePrimaryKey <CaseActivityEntity>(caseActivityId); var activity = CaseActivityLogic.RetrieveForViewing(lite); using (WorkflowActivityInfo.Scope(new WorkflowActivityInfo { CaseActivity = activity })) { var ep = SignumServer.GetEntityPack((Entity)activity.Case.MainEntity); return(new EntityPackWorkflow { activity = activity, canExecuteActivity = OperationLogic.ServiceCanExecute(activity).ToDictionary(a => a.Key.Key, a => a.Value), canExecuteMainEntity = ep.canExecute, Extension = ep.extension, }); } }
public EntityPackTS?ConstructFromLite([Required, FromBody] LiteOperationRequest request) { var entity = OperationLogic.ServiceConstructFromLite(request.lite, request.GetOperationSymbol(request.lite.EntityType), request.args); return(entity == null ? null: SignumServer.GetEntityPack(entity)); }
public EntityPackTS ConstructFromLite(LiteOperationRequest request) { var entity = OperationLogic.ServiceConstructFromLite(request.lite, request.operarionSymbol, request.args); return(entity == null ? null: SignumServer.GetEntityPack(entity)); }
public EntityPackTS GetEntityPackEntity(Entity entity) { return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS ExecuteLite(LiteOperationRequest request) { var entity = OperationLogic.ServiceExecuteLite(request.lite, request.GetOperationSymbol(request.lite.EntityType), request.args); return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS ConstructFromEntity(EntityOperationRequest request) { var entity = OperationLogic.ServiceConstructFrom(request.entity, request.GetOperationSymbol(request.entity.GetType()), request.args); return(entity == null ? null: SignumServer.GetEntityPack(entity)); }
public EntityPackTS GetEntityPackEntity([Required, FromBody] Entity entity) { return(SignumServer.GetEntityPack(entity)); }
public EntityPackTS ConstructFromEntity(EntityOperationRequest request) { var entity = OperationLogic.ServiceConstructFrom(request.entity, request.operarionSymbol, request.args); return(SignumServer.GetEntityPack(entity)); }