public boolean shouldServiceRequest() { return IN_SERVICE.equals( this ); } }
/** * The repository is in service for indexing purposes */ private boolean INSERVICE(Repository repository) { return LocalStatus.IN_SERVICE.equals(repository.getLocalStatus()); }
@Deprecated public Collection<String> evictAllUnusedProxiedItems( ResourceStoreRequest req, long timestamp ) throws IOException { ArrayList<String> result = new ArrayList<String>(); for ( Repository repository : repositoryRegistry.getRepositories() ) { if ( LocalStatus.IN_SERVICE.equals( repository.getLocalStatus() ) ) { result.addAll( repository.evictUnusedItems( req, timestamp ) ); } } return result; }
@Subscribe @AllowConcurrentEvents public void inspect(final RepositoryEventLocalStatusChanged revt) { StringBuilder sb = new StringBuilder("The repository '"); sb.append(revt.getRepository().getName()); sb.append("' (ID='").append(revt.getRepository().getId()).append("') was put "); LocalStatus newStatus = revt.getNewLocalStatus(); if (LocalStatus.IN_SERVICE.equals(newStatus)) { sb.append("IN SERVICE."); } else if (LocalStatus.OUT_OF_SERVICE.equals(newStatus)) { sb.append("OUT OF SERVICE."); } else { sb.append(revt.getRepository().getLocalStatus().toString()).append("."); } sb.append(" The previous state was "); if (LocalStatus.IN_SERVICE.equals(revt.getOldLocalStatus())) { sb.append("IN SERVICE."); } else if (LocalStatus.OUT_OF_SERVICE.equals(revt.getOldLocalStatus())) { sb.append("OUT OF SERVICE."); } else { sb.append(revt.getOldLocalStatus().toString()).append("."); } getFeedRecorder().addSystemEvent(FeedRecorder.SYSTEM_REPO_LSTATUS_CHANGES_ACTION, sb.toString()); }
public void reindexAllRepositories( String path, boolean fullReindex ) throws IOException { List<Repository> reposes = repositoryRegistry.getRepositories(); for ( Repository repository : reposes ) { if ( LocalStatus.IN_SERVICE.equals( repository.getLocalStatus() ) ) { reindexRepository( repository, fullReindex ); } } publishAllIndex(); }
public void downloadAllIndex() throws IOException { List<ProxyRepository> reposes = repositoryRegistry.getRepositoriesWithFacet( ProxyRepository.class ); for ( ProxyRepository repository : reposes ) { if ( repository.isIndexable() ) { if ( LocalStatus.IN_SERVICE.equals( repository.getLocalStatus() ) && downloadRepositoryIndex( repository ) ) { mergeRepositoryGroupIndexWithMember( repository ); } } } }
@Override public void setLocalStatus( LocalStatus localStatus ) { if ( !localStatus.equals( getLocalStatus() ) ) { LocalStatus oldLocalStatus = getLocalStatus(); super.setLocalStatus( localStatus ); localStatusChanged = true; eventBus().post( new RepositoryEventLocalStatusChanged( this, oldLocalStatus, localStatus ) ); } }
if ( LocalStatus.IN_SERVICE.equals( repo.getLocalStatus() ) )
public void publishAllIndex() throws IOException { List<Repository> reposes = repositoryRegistry.getRepositories(); for ( Repository repository : reposes ) { if ( LocalStatus.IN_SERVICE.equals( repository.getLocalStatus() ) && !repository.getRepositoryKind().isFacetAvailable( GroupRepository.class ) && repository.isIndexable() ) { publishRepositoryIndex( repository ); } } List<GroupRepository> groups = repositoryRegistry.getRepositoriesWithFacet( GroupRepository.class ); for ( GroupRepository group : groups ) { publishRepositoryIndex( group ); } }
|| repository.getRepositoryContentClass().isCompatible( maven1ContentClass ) ) if ( LocalStatus.OUT_OF_SERVICE.equals( repository.getLocalStatus() ) )