@Deprecated @Override public String getMasterRepositoryId() { // NEXUS-4901: this change is to lessen the logging noise, that is otherwise harmless but ugly return getExternalConfiguration( false ).getMasterRepositoryId(); }
@Override public Repository getMasterRepository() { try { return getRepositoryRegistry().getRepository( getExternalConfiguration( false ).getMasterRepositoryId() ); } catch ( NoSuchRepositoryException e ) { getLogger().warn( "ShadowRepository ID='" + getId() + "' cannot fetch it's master repository with ID='" + getExternalConfiguration( false ).getMasterRepositoryId() + "'!", e ); return null; } }
private RepositoryBaseResource createShadow(RepositoryTemplate template) { RepositoryShadowResource repoRes = new RepositoryShadowResource(); repoRes.setRepoType("virtual"); AbstractShadowRepositoryConfiguration cfg = (AbstractShadowRepositoryConfiguration) template.getConfigurableRepository().getCurrentCoreConfiguration() .getExternalConfiguration().getConfiguration(false); repoRes.setSyncAtStartup(cfg.isSynchronizeAtStartup()); repoRes.setShadowOf(cfg.getMasterRepositoryId()); return repoRes; }
private RepositoryBaseResource createShadow( RepositoryTemplate template ) { RepositoryShadowResource repoRes = new RepositoryShadowResource(); repoRes.setRepoType( "virtual" ); AbstractShadowRepositoryConfiguration cfg = (AbstractShadowRepositoryConfiguration) template.getConfigurableRepository().getCurrentCoreConfiguration().getExternalConfiguration().getConfiguration( false ); repoRes.setSyncAtStartup( cfg.isSynchronizeAtStartup() ); repoRes.setShadowOf( cfg.getMasterRepositoryId() ); return repoRes; }
shadowRepository.setMasterRepositoryId( extConf.getMasterRepositoryId() );