Example #1
0
 public void RemoveResourceSecurityInformation(string cluster, string resource)
 {
     lock (_store)
     {
         //JsonSerializer<IResourceItem> serializer = new JsonSerializer<IResourceItem>();
         ICollectionStore      collection    = ((SystemDatabaseStore)_store).Collections[Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.SecurityInformationCollection];
         IList <IJSONDocument> jsonDocuments = new List <IJSONDocument>();
         JSONDocument          doc           = new JSONDocument();
         bool found = false;
         if (resource != null)
         {
             doc.Key = resource;
             found   = FindDocument(resource, Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.SecurityInformationCollection, out doc);
             if (found)
             {
                 IDocumentsWriteOperation deleteOperation = new DeleteDocumentsOperation();
                 deleteOperation.Collection = Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.SecurityInformationCollection;
                 deleteOperation.Database   = MiscUtil.SYSTEM_DATABASE;
                 jsonDocuments.Add(doc);
                 deleteOperation.Documents = jsonDocuments;
                 _store.DeleteDocuments(deleteOperation);
             }
         }
     }
 }
Example #2
0
 public PaymentActor(
     ICollectionStore<Order> orderRepo,
     ICollectionStore<Payment> paymentRepo,
     PaymentGateway paymentGateway)
 {
     _orderRepo = orderRepo;
     _paymentRepo = paymentRepo;
     _paymentGateway = paymentGateway;
 }
Example #3
0
 public PaymentActor(
     ICollectionStore <Order> orderRepo,
     ICollectionStore <Payment> paymentRepo,
     PaymentGateway paymentGateway)
 {
     _orderRepo      = orderRepo;
     _paymentRepo    = paymentRepo;
     _paymentGateway = paymentGateway;
 }
Example #4
0
 public FraudCheckActor(ICollectionStore<Customer> customeStore,
     ICollectionStore<Order> ordeStore,
     ICollectionStore<Payment> paymentStore,
     FraudChecker fraudChecker)
 {
     _fraudChecker = fraudChecker;
     _paymentStore = paymentStore;
     _ordeStore = ordeStore;
     _customeStore = customeStore;
 }
 public OrderShippedEmailActor(ICollectionStore<Order> orderStore,
     ICollectionStore<Customer> customerStore,
     ICollectionStore<Shipment> shipmentStore,
     Emailer emailer)
 {
     _shipmentStore = shipmentStore;
     _emailer = emailer;
     _customerStore = customerStore;
     _orderStore = orderStore;
 }
Example #6
0
 public OrderShippedEmailActor(ICollectionStore <Order> orderStore,
                               ICollectionStore <Customer> customerStore,
                               ICollectionStore <Shipment> shipmentStore,
                               Emailer emailer)
 {
     _shipmentStore = shipmentStore;
     _emailer       = emailer;
     _customerStore = customerStore;
     _orderStore    = orderStore;
 }
Example #7
0
 public FraudCheckActor(ICollectionStore <Customer> customeStore,
                        ICollectionStore <Order> ordeStore,
                        ICollectionStore <Payment> paymentStore,
                        FraudChecker fraudChecker)
 {
     _fraudChecker = fraudChecker;
     _paymentStore = paymentStore;
     _ordeStore    = ordeStore;
     _customeStore = customeStore;
 }
Example #8
0
        public Common.Security.Interfaces.IResourceItem[] GetAllResourcesSecurityInformation()
        {
            ICollectionStore collection = ((SystemDatabaseStore)_store).Collections[Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.SecurityInformationCollection];

            IResourceItem[] resources = new IResourceItem[collection.Count()];
            int             i         = 0;

            foreach (JSONDocument doc in collection)
            {
                resources[i] = JsonSerializer.Deserialize <IResourceItem>(doc);
                i++;
            }
            return(resources);
        }
Example #9
0
        public IUser[] GetAllUserInformation()
        {
            ICollectionStore collection = ((SystemDatabaseStore)_store).Collections[Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.UserInformationCollection];

            IUser[] users = new IUser[collection.Count()];
            int     i     = 0;

            foreach (JSONDocument doc in collection)
            {
                users[i] = JsonSerializer.Deserialize <IUser>(doc);
                i++;
            }
            return(users);
        }
Example #10
0
        public override bool OnStart()
        {
            // Set the maximum number of concurrent connections
            ServicePointManager.DefaultConnectionLimit = 1200;

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.

            var container = new WindsorContainer();

            ConfigureDI(container);

            _orchestrator = container.Resolve <Orchestrator>();
            _orchestrator.SetupAsync().Wait();
            _orchestrator.Start();

            _queueOperator = container.Resolve <IEventQueueOperator>();
            _orderStore    = container.Resolve <ICollectionStore <Order> >();
            _customerStore = container.Resolve <ICollectionStore <Customer> >();


            return(base.OnStart());
        }
Example #11
0
 public void RemoveUserInformation(string username)
 {
     lock (_store)
     {
         ICollectionStore      collection    = ((SystemDatabaseStore)_store).Collections[Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.UserInformationCollection];
         IList <IJSONDocument> jsonDocuments = new List <IJSONDocument>();
         JSONDocument          doc           = new JSONDocument();
         bool found = false;
         if (username != null)
         {
             doc.Key = username;
             found   = FindDocument(username, Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.UserInformationCollection, out doc);
             if (found)
             {
                 IDocumentsWriteOperation deleteOperation = new DeleteDocumentsOperation();
                 deleteOperation.Collection = Alachisoft.NosDB.Core.Util.MiscUtil.SystemCollection.UserInformationCollection;
                 deleteOperation.Database   = MiscUtil.SYSTEM_DATABASE;
                 jsonDocuments.Add(doc);
                 deleteOperation.Documents = jsonDocuments;
                 _store.DeleteDocuments(deleteOperation);
             }
         }
     }
 }
 public CollectionV3Controller(
     ICollectionStore store,
     IRoleAssignmentStore roleStore,
     IRepresenter <Collection, Collection.Version3> representer) : base(store, roleStore, representer)
 {
 }
Example #13
0
 public RoleAssignmentV3Controller(IRoleAssignmentStore store, ICollectionStore collectionStore, IRepresenter <RoleAssignment, RoleAssignment.Version3> representer)
     : base(store, collectionStore, representer)
 {
 }
Example #14
0
        public override bool OnStart()
        {
            // Set the maximum number of concurrent connections 
            ServicePointManager.DefaultConnectionLimit = 1200;

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.

            var container = new WindsorContainer();
            ConfigureDI(container);

            _orchestrator = container.Resolve<Orchestrator>();
            _orchestrator.SetupAsync().Wait();
            _orchestrator.Start();

            _queueOperator = container.Resolve<IEventQueueOperator>();
            _orderStore = container.Resolve<ICollectionStore<Order>>();
            _customerStore = container.Resolve<ICollectionStore<Customer>>();


            return base.OnStart();
        }
 public NewsFeedPulseActor(ICollectionStore <FeedChannel> channelStore)
 {
     _channelStore = channelStore;
 }
Example #16
0
 public FulfilmentActor(ICollectionStore<Order> orderStore,
     ICollectionStore<Shipment> shipmentStore)
 {
     _shipmentStore = shipmentStore;
     _orderStore = orderStore;
 }
Example #17
0
 public PaymenyFailedActor(ICollectionStore<Order> orderStore)
 {
     _orderStore = orderStore;
 }
Example #18
0
 public NewsFeedPulseActor(ICollectionStore<FeedChannel> channelStore)
 {
     _channelStore = channelStore;
 }
Example #19
0
 public FulfilmentActor(ICollectionStore <Order> orderStore,
                        ICollectionStore <Shipment> shipmentStore)
 {
     _shipmentStore = shipmentStore;
     _orderStore    = orderStore;
 }
Example #20
0
 public OrderInventoryActor(ICollectionStore <Order> orderStore)
 {
     _orderStore = orderStore;
 }
Example #21
0
 public PaymenyFailedActor(ICollectionStore <Order> orderStore)
 {
     _orderStore = orderStore;
 }
Example #22
0
 public FraudCancelOrderActor(ICollectionStore<Order> orderStore)
 {
     _orderStore = orderStore;
 }
 public FraudCancelOrderActor(ICollectionStore <Order> orderStore)
 {
     _orderStore = orderStore;
 }
Example #24
0
 public OrderInventoryActor(ICollectionStore<Order> orderStore)
 {
     _orderStore = orderStore;
 }