class LocalProtocolSupportService extends GenericReactiveCrudService<ProtocolSupportEntity, String> {

    @Autowired
    private ProtocolSupportManager supportManager;

    @Autowired
    private DataReferenceManager referenceManager;

    @Override
    public Mono<Integer> deleteById(Publisher<String> idPublisher) {
        return Flux.from(idPublisher)
                   .flatMap(id -> supportManager.remove(id).thenReturn(id))
                   .as(super::deleteById);
    }

    public Mono<Boolean> deploy(String id) {<FILL_FUNCTION_BODY>}

    public Mono<Boolean> unDeploy(String id) {
        // 消息协议被使用时，不能禁用
        return referenceManager
            .assertNotReferenced(DataReferenceManager.TYPE_PROTOCOL, id)
            .then(findById(Mono.just(id)))
            .switchIfEmpty(Mono.error(NotFoundException::new))
            .flatMap(r -> createUpdate()
                .set(ProtocolSupportEntity::getState, 0)
                .where(ProtocolSupportEntity::getId, id)
                .execute())
            .map(i -> i > 0);
    }

}

        return findById(Mono.just(id))
            .switchIfEmpty(Mono.error(NotFoundException::new))
            .flatMap(r -> createUpdate()
                .set(ProtocolSupportEntity::getState, 1)
                .where(ProtocolSupportEntity::getId, id)
                .execute())
            .map(i -> i > 0);
    
<no_super_class>