コード例 #1
0
 @Override
 public boolean isOld(StorageItem item) {
   if (AbstractP2MetadataSource.isP2MetadataItem(item.getPath())) {
     return super.isOld(getMetadataMaxAge(), item);
   } else {
     return super.isOld(getArtifactMaxAge(), item);
   }
 }
コード例 #2
0
  @Override
  protected StorageItem doRetrieveItem(ResourceStoreRequest request)
      throws IllegalOperationException, ItemNotFoundException, StorageException {
    fixRemoteUrl(request);

    if (P2Constants.SITE_XML.equals(request.getRequestPath())) {
      throw new ItemNotFoundException(request, this);
    }

    if (AbstractP2MetadataSource.isP2MetadataItem(request.getRequestPath())) {
      if (!isItemValid(P2Constants.SITE_XML)) {
        mirror(false);
      }
    }

    return super.doRetrieveItem(request);
  }
コード例 #3
0
 public boolean shouldProcess(WalkerContext context, StorageItem item) {
   return !item.getPath().startsWith(".")
       && !AbstractP2MetadataSource.isP2MetadataItem(item.getPath());
 }