org.sonatype.nexus.proxy.repository.Repository.setWritePolicy()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.sonatype.nexus.proxy.repository.Repository.setWritePolicy方法的一些代码示例,展示了Repository.setWritePolicy的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Repository.setWritePolicy方法的具体详情如下:
包路径:org.sonatype.nexus.proxy.repository.Repository
类名称:Repository
方法名:setWritePolicy

Repository.setWritePolicy介绍

[英]Sets the write policy for the repo. See RepositoryWritePolicy. This does not affect the in-repository caching using LocalStorage. It just says, that from the "outer" perspective, this repo behaves like read-only repository, and deployment is disabled for example.
[中]设置回购协议的写入策略。参见RepositoryWritePolicy。这不会影响使用LocalStorage的存储库内缓存。它只是说,从“外部”的角度来看,这个repo的行为类似于只读存储库,例如,部署被禁用。

代码示例

代码示例来源:origin: org.sonatype.nexus/nexus-proxy

@Override
  protected void doApplyConfiguration( Repository repository, ApplicationConfiguration configuration,
    CRepositoryCoreConfiguration coreConfiguration )
    throws ConfigurationException
  {        
    super.doApplyConfiguration( repository, configuration, coreConfiguration );
    
    // Groups are read only
    repository.setWritePolicy( RepositoryWritePolicy.READ_ONLY );
  }
}

代码示例来源:origin: org.sonatype.nexus/nexus-proxy

repository.setWritePolicy( RepositoryWritePolicy.READ_ONLY );

代码示例来源:origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

: RepositoryWritePolicy.READ_ONLY;
repository.setWritePolicy(writePolicy);

代码示例来源:origin: org.sonatype.nexus/nexus-rest-api

: RepositoryWritePolicy.READ_ONLY;
repository.setWritePolicy( writePolicy );

相关文章