Examples of Agreement


Examples of org.jboss.gwt.circuit.Agreement

        DirectedGraph<Class<?>, DefaultEdge> dag = new DefaultDirectedGraph<>(new EdgeFactoryImpl());

        // Add vertices (stores)
        for (Map.Entry<Class<?>, Agreement> entry : approvals.entrySet()) {
            Class<?> store = entry.getKey();
            Agreement agreement = entry.getValue();
            dag.addVertex(store);
            for (Class<?> depStore : agreement.getDependencies()) {
                dag.addVertex(depStore);
            }
        }

        // Add edges (dependencies from one store to other stores)
        for (Map.Entry<Class<?>, Agreement> entry : approvals.entrySet()) {
            Class<?> store = entry.getKey();
            Agreement agreement = entry.getValue();
            for (Class<?> depStore : agreement.getDependencies()) {
                dag.addEdge(depStore, store);
            }
        }

        // cycle detection
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(ShoesStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.SocksStore.class, org.jboss.gwt.circuit.sample.wardrobe.stores.TrousersStore.class);
                }
                else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
                    return new Agreement(true);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(SocksStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.ShoesStore.class);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(CoatStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.PulloverStore.class, org.jboss.gwt.circuit.sample.wardrobe.stores.TrousersStore.class);
                }
                else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
                    return new Agreement(true);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(UndershirtStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.PulloverStore.class);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(UnderwearStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.TrousersStore.class);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(TrousersStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.UnderwearStore.class);
                }
                else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.ShoesStore.class, org.jboss.gwt.circuit.sample.wardrobe.stores.CoatStore.class);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(PulloverStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Dress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.UndershirtStore.class);
                }
                else if (action instanceof org.jboss.gwt.circuit.sample.wardrobe.actions.Undress) {
                    return new Agreement(true, org.jboss.gwt.circuit.sample.wardrobe.stores.CoatStore.class);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(ServerStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.HostSelection) {
                    return new Agreement(true, org.jboss.as.console.client.v3.stores.domain.HostStore.class);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.RefreshServer) {
                    return new Agreement(true, org.jboss.as.console.client.v3.stores.domain.HostStore.class);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.AddServer) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.RemoveServer) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.UpdateServer) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.CopyServer) {
                    return new Agreement(true);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here

Examples of org.jboss.gwt.circuit.Agreement

        dispatcher.register(HostStore.class, new StoreCallback() {
            @Override
            public Agreement voteFor(final Action action) {
                if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.RefreshServer) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.RefreshHosts) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.HostSelection) {
                    return new Agreement(true);
                }
                else if (action instanceof org.jboss.as.console.client.v3.stores.domain.actions.SelectServerInstance) {
                    return new Agreement(true);
                }
                else {
                    return Agreement.NONE;
                }
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.