class SiddhiUtils {

    public static Boolean isStreamAllowedForThisOperation(String streamName, String operation) {

        switch (operation.toUpperCase()) {
        case STREAM_OPERATIONS.DEFINITION.ADD_QUERY:
        case STREAM_OPERATIONS.DEFINITION.ALTER:
        case STREAM_OPERATIONS.DEFINITION.CREATE:
        case STREAM_OPERATIONS.DEFINITION.DROP:
        case STREAM_OPERATIONS.DEFINITION.REMOVE_QUERY:
        case STREAM_OPERATIONS.MANIPULATION.INSERT:
            if (Arrays.asList(STREAMING.STATS_NAMES.STATS_STREAMS).contains(streamName)) {
                return Boolean.FALSE;
            }
            return Boolean.TRUE;

        case STREAM_OPERATIONS.ACTION.LISTEN:
        case STREAM_OPERATIONS.ACTION.SAVETO_CASSANDRA:
        case STREAM_OPERATIONS.ACTION.SAVETO_MONGO:
        case STREAM_OPERATIONS.ACTION.SAVETO_SOLR:
        case STREAM_OPERATIONS.ACTION.START_SENDTODROOLS:
        case STREAM_OPERATIONS.ACTION.STOP_SAVETO_MONGO:
        case STREAM_OPERATIONS.ACTION.STOP_SAVETO_CASSANDRA:
        case STREAM_OPERATIONS.ACTION.STOP_SAVETO_SOLR:
        case STREAM_OPERATIONS.ACTION.STOP_SENDTODROOLS:
        case STREAM_OPERATIONS.ACTION.INDEX:
        case STREAM_OPERATIONS.ACTION.STOP_LISTEN:
        case STREAM_OPERATIONS.ACTION.STOP_INDEX:
        case STREAM_OPERATIONS.MANIPULATION.LIST:

            return Boolean.TRUE;
        default:
            return Boolean.FALSE;
        }
    }

    private  SiddhiUtils();

}