예제 #1
0
        public AppListGroup(AppApiGroup source, AppListActionFactory factory) : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index = source.AddAction(actions.View(nameof(Index), factory.CreateIndex));
            All   = source.AddAction
                    (
                actions.Action
                (
                    nameof(All),
                    factory.CreateAll
                )
                    );
            GetAppModifierKey = source.AddAction
                                (
                actions.Action(nameof(GetAppModifierKey), factory.CreateGetAppModifierKey)
                                );
            RedirectToApp = source.AddAction
                            (
                actions.Action
                (
                    nameof(RedirectToApp),
                    factory.CreateRedirectToApp
                )
                            );
        }
예제 #2
0
    public ProductGroup(AppApiGroup source)
        : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        Index   = source.AddAction(actions.DefaultView());
        GetInfo = source.AddAction
                  (
            actions.Action
            (
                nameof(GetInfo),
                () => new GetInfoAction()
            )
                  );
        AddProduct = source.AddAction
                     (
            actions.Action
            (
                nameof(AddProduct),
                () => new AddProductValidation(),
                () => new AddProductAction()
            )
                     );
        Product = source.AddAction
                  (
            actions.Action
            (
                nameof(Product),
                () => new ProductAction(),
                "Get Product Information"
            )
                  );
    }
예제 #3
0
        public AppUserMaintenanceGroup(AppApiGroup source, AppUserMaintenanceGroupFactory factory)
            : base(source)
        {
            var actions = new AppApiActionFactory(source);

            AssignRole   = source.AddAction(actions.Action(nameof(AssignRole), factory.CreateAssignRole));
            UnassignRole = source.AddAction(actions.Action(nameof(UnassignRole), factory.CreateUnassignRole));
        }
        public UserMaintenanceGroup(AppApiGroup source, UserMaintenanceGroupFactory factory)
            : base(source)
        {
            var actions = new AppApiActionFactory(source);

            EditUser       = source.AddAction(actions.Action(nameof(EditUser), factory.CreateEditUser));
            GetUserForEdit = source.AddAction(actions.Action(nameof(GetUserForEdit), factory.CreateGetUserForEdit));
        }
예제 #5
0
        public ResourceInquiryGroup(AppApiGroup source, ResourceInquiryActionFactory factory) : base(source)
        {
            var actions = new AppApiActionFactory(source);

            GetResource              = source.AddAction(actions.Action(nameof(GetResource), factory.CreateGetResource));
            GetRoleAccess            = source.AddAction(actions.Action(nameof(GetRoleAccess), factory.CreateGetResourceRoleAccess));
            GetMostRecentRequests    = source.AddAction(actions.Action(nameof(GetMostRecentRequests), factory.CreateGetMostRecentRequests));
            GetMostRecentErrorEvents = source.AddAction(actions.Action(nameof(GetMostRecentErrorEvents), factory.CreateGetMostRecentErrorEvents));
        }
예제 #6
0
        public VersionInquiryGroup(AppApiGroup source, IServiceProvider services)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            GetCurrentVersion = source.AddAction(actions.Action(nameof(GetCurrentVersion), () => CreateGetCurrentVersion(services)));
            GetVersion        = source.AddAction(actions.Action(nameof(GetVersion), () => CreateGetVersion(services)));
            GetResourceGroup  = source.AddAction(actions.Action(nameof(GetResourceGroup), () => CreateGetResourcegroup(services)));
        }
예제 #7
0
        public UserInquiryGroup(AppApiGroup source, UserInquiryGroupFactory factory)
            : base(source)
        {
            var actions = new AppApiActionFactory(source);

            GetUser           = source.AddAction(actions.Action(nameof(GetUser), factory.CreateGetUser));
            GetUserByUserName = source.AddAction(actions.Action(nameof(GetUserByUserName), factory.CreateGetUserByUserName));
            GetCurrentUser    = source.AddAction(actions.Action(nameof(GetCurrentUser), factory.CreateGetCurrentUser));
            RedirectToAppUser = source.AddAction(actions.Action(nameof(RedirectToAppUser), factory.CreateRedirectToAppUser));
        }
예제 #8
0
        public AppUserGroup(AppApiGroup source, AppUserGroupFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index                = source.AddAction(actions.View(nameof(Index), factory.CreateIndex));
            GetUserRoles         = source.AddAction(actions.Action(nameof(GetUserRoles), factory.CreateGetUserRoles));
            GetUserRoleAccess    = source.AddAction(actions.Action(nameof(GetUserRoleAccess), factory.CreateGetUserRoleAccess));
            GetUserModCategories = source.AddAction(actions.Action(nameof(GetUserModCategories), factory.CreateGetUserModifierCategories));
        }
예제 #9
0
        public ModCategoryGroup(AppApiGroup source, ModCategoryGroupActionFactory factory)
            : base(source)
        {
            var actions = new AppApiActionFactory(source);

            GetModCategory    = source.AddAction(actions.Action(nameof(GetModCategory), factory.CreateGetModCategory));
            GetModifiers      = source.AddAction(actions.Action(nameof(GetModifiers), factory.CreateGetModifiers));
            GetModifier       = source.AddAction(actions.Action(nameof(GetModifier), factory.CreateGetModifier));
            GetResourceGroups = source.AddAction(actions.Action(nameof(GetResourceGroups), factory.CreateGetResourceGroups));
        }
예제 #10
0
        public AppInquiryGroup(AppApiGroup source, AppInquiryActionFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index                    = source.AddAction(actions.View(nameof(Index), factory.CreateIndex));
            GetApp                   = source.AddAction(actions.Action(nameof(GetApp), factory.CreateGetApp));
            GetRoles                 = source.AddAction(actions.Action(nameof(GetRoles), factory.CreateGetRoles));
            GetRole                  = source.AddAction(actions.Action(nameof(GetRole), factory.CreateGetRole));
            GetResourceGroups        = source.AddAction(actions.Action(nameof(GetResourceGroups), factory.CreateGetResourceGroups));
            GetMostRecentRequests    = source.AddAction(actions.Action(nameof(GetMostRecentRequests), factory.CreateGetMostRecentRequests));
            GetMostRecentErrorEvents = source.AddAction(actions.Action(nameof(GetMostRecentErrorEvents), factory.CreateGetMostRecentErrorEvents));
            GetModifierCategories    = source.AddAction(actions.Action(nameof(GetModifierCategories), factory.CreateGetModifierCategories));
            GetModifierCategory      = source.AddAction(actions.Action(nameof(GetModifierCategory), factory.CreateGetModifierCategory));
            GetDefaultModiifer       = source.AddAction(actions.Action(nameof(GetDefaultModiifer), factory.CreateGetDefaultModifier));
        }
예제 #11
0
        public UserListGroup(AppApiGroup source, UserListGroupFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index          = source.AddAction(actions.Action(nameof(Index), factory.CreateIndex));
            GetUsers       = source.AddAction(actions.Action(nameof(GetUsers), factory.CreateGetUsers));
            GetSystemUsers = source.AddAction(actions.Action(nameof(GetSystemUsers), factory.CreateGetSystemUsers));
            AddUser        = source.AddAction
                             (
                actions.Action
                (
                    nameof(AddUser),
                    Access.WithAllowed(HubInfo.Roles.AddUser),
                    factory.CreateAddUserValidation,
                    factory.CreateAddUser
                )
                             );
        }
예제 #12
0
    public EmployeeGroup(AppApiGroup source)
        : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        Index       = source.AddAction(actions.DefaultView());
        AddEmployee = source.AddAction
                      (
            actions.Action
            (
                nameof(AddEmployee),
                () => new AddEmployeeValidation(),
                () => new AddEmployeeAction()
            )
                      );
        AddEmployeeFormView = source.AddAction
                              (
            actions.PartialView
            (
                nameof(AddEmployeeFormView),
                () => new AddEmployeeFormViewAction()
            )
                              );
        AddEmployeeForm = source.AddAction
                          (
            actions.Action
            (
                nameof(AddEmployeeForm),
                () => new AddEmployeeFormAction()
            )
                          );
        Employee = source.AddAction
                   (
            actions.Action
            (
                nameof(Employee),
                () => new EmployeeAction(),
                "Get Employee Information"
            )
                   );
    }
예제 #13
0
        public AuthGroup(AppApiGroup source, AuthActionFactory actionFactory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Index       = source.AddAction(actions.DefaultView());
            VerifyLogin = source.AddAction
                          (
                actions.Action
                (
                    nameof(VerifyLogin),
                    actionFactory.CreateVerifyLoginAction
                )
                          );
            VerifyLoginForm = source.AddAction
                              (
                actions.PartialView
                (
                    nameof(VerifyLoginForm),
                    () => new PartialViewAppAction <EmptyRequest>(nameof(VerifyLoginForm))
                )
                              );
            Login = source.AddAction
                    (
                actions.Action
                (
                    nameof(Login),
                    () => new LoginModelValidation(),
                    actionFactory.CreateLoginAction
                )
                    );
            Logout = source.AddAction
                     (
                actions.Action
                (
                    nameof(Logout),
                    actionFactory.CreateLogoutAction
                )
                     );
        }
예제 #14
0
        public PermanentLogGroup(AppApiGroup source, PermanentLogGroupActionFactory actionFactory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            LogBatch            = source.AddAction(actions.Action(nameof(LogBatch), actionFactory.CreateLogBatch));
            StartSession        = source.AddAction(actions.Action(nameof(StartSession), actionFactory.CreateStartSession));
            StartRequest        = source.AddAction(actions.Action(nameof(StartRequest), actionFactory.CreateStartRequest));
            EndRequest          = source.AddAction(actions.Action(nameof(EndRequest), actionFactory.CreateEndRequest));
            EndSession          = source.AddAction(actions.Action(nameof(EndSession), actionFactory.CreateEndSession));
            LogEvent            = source.AddAction(actions.Action(nameof(LogEvent), actionFactory.CreateLogEvent));
            AuthenticateSession = source.AddAction(actions.Action(nameof(AuthenticateSession), actionFactory.CreateAuthenticateSession));
            EndExpiredSessions  = source.AddAction(actions.Action(nameof(EndExpiredSessions), actionFactory.CreateEndExpiredSessions));
        }
예제 #15
0
        public AuthApiGroup(AppApiGroup source, AuthActionFactory factory)
            : base(source)
        {
            var actions = new WebAppApiActionFactory(source);

            Authenticate = source.AddAction
                           (
                actions.Action
                (
                    nameof(Authenticate),
                    () => new LoginValidation(),
                    factory.CreateAuthenticateAction
                )
                           );
        }
예제 #16
0
        public AppRegistrationGroup(AppApiGroup source, IServiceProvider services)
            : base(source)
        {
            this.services = services;
            var actions = new WebAppApiActionFactory(source);

            RegisterApp   = source.AddAction(actions.Action(nameof(RegisterApp), createRegisterApp));
            NewVersion    = source.AddAction(actions.Action(nameof(NewVersion), createNewVersion));
            BeginPublish  = source.AddAction(actions.Action(nameof(BeginPublish), createBeginPublish));
            EndPublish    = source.AddAction(actions.Action(nameof(EndPublish), createEndPublish));
            GetVersions   = source.AddAction(actions.Action(nameof(GetVersions), createGetVersions));
            GetVersion    = source.AddAction(actions.Action(nameof(GetVersion), createGetVersion));
            AddSystemUser = source.AddAction(actions.Action(nameof(AddSystemUser), createAddSystemUser));
        }
예제 #17
0
    public UserCacheGroup(AppApiGroup source, IServiceProvider sp) : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        ClearCache = source.AddAction
                     (
            actions.Action
            (
                nameof(ClearCache),
                () => new ClearCacheAction
                (
                    sp.GetRequiredService <ICachedUserContext>()
                )
            )
                     );
    }
예제 #18
0
    public UserGroup(AppApiGroup source) : base(source)
    {
        var actions = new WebAppApiActionFactory(source);

        Index = source.AddAction(actions.DefaultView <UserStartRequest>());
    }