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;
}
}