Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.commonjava.maven.galley.maven.internal;
  
  import static org.commonjava.maven.galley.maven.util.ArtifactPathUtils.formatMetadataPath;
  
  import java.util.List;
  
  import  javax.inject.Inject;
  
 
     implements ArtifactMetadataManager
 {
 
     private final Logger logger = new LoggergetClass() );
 
     @Inject
     private TransferManager transferManager;
 
     @Inject
     private LocationExpander expander;
 
     protected ArtifactMetadataManagerImpl()
     {
     }
 
     public ArtifactMetadataManagerImplfinal TransferManager transferManagerfinal LocationExpander expander )
     {
         this. = transferManager;
         this. = expander;
     }
 
     /* (non-Javadoc)
      * @see org.commonjava.maven.galley.ArtifactMetadataManager#delete(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef)
      */
     @Override
     public boolean deletefinal Location locationfinal ProjectRef ref )
         throws TransferException
     {
         return deletelocationrefnull );
     }
 
     /* (non-Javadoc)
      * @see org.commonjava.maven.galley.ArtifactMetadataManager#delete(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.lang.String)
      */
     @Override
     public boolean deletefinal Location locationfinal ProjectRef reffinal String filename )
         throws TransferException
     {
         final String path = formatMetadataPathreffilename );
         return .deleteAllnew VirtualResource.expandlocation ), path ) );
     }
 
     /* (non-Javadoc)
      * @see org.commonjava.maven.galley.ArtifactMetadataManager#delete(org.commonjava.maven.galley.model.Location, java.lang.String)
      */
     @Override
     public boolean deletefinal Location locationfinal String groupId )
         throws TransferException
     {
         return deletelocationgroupIdnull );
     }
 
     /* (non-Javadoc)
      * @see org.commonjava.maven.galley.ArtifactMetadataManager#delete(org.commonjava.maven.galley.model.Location, java.lang.String, java.lang.String)
      */
     @Override
     public boolean deletefinal Location locationfinal String groupIdfinal String filename )
         throws TransferException
     {
         final String path = formatMetadataPathgroupIdfilename );
         return .deleteAllnew VirtualResource.expandlocation ), path ) );
     }
 
     /* (non-Javadoc)
      * @see org.commonjava.maven.galley.ArtifactMetadataManager#deleteAll(java.util.List, java.lang.String)
      */
     @Override
     public boolean deleteAllfinal List<? extends Locationlocationsfinal String groupId )
         throws TransferException
     {
         return deleteAlllocationsgroupIdnull );
     }
 
     /* (non-Javadoc)
      * @see org.commonjava.maven.galley.ArtifactMetadataManager#deleteAll(java.util.List, java.lang.String, java.lang.String)
      */
     @Override
    public boolean deleteAllfinal List<? extends Locationlocationsfinal String groupIdfinal String filename )
        throws TransferException
    {
        return .deleteAllnew VirtualResource.expandlocations ), formatMetadataPathgroupIdfilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#deleteAll(java.util.List, org.commonjava.maven.atlas.ident.ref.ProjectRef)
     */
    @Override
    public boolean deleteAllfinal List<? extends Locationlocationsfinal ProjectRef ref )
        throws TransferException
    {
        return deleteAlllocationsrefnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#deleteAll(java.util.List, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.lang.String)
     */
    @Override
    public boolean deleteAllfinal List<? extends Locationlocationsfinal ProjectRef reffinal String filename )
        throws TransferException
    {
        return .deleteAllnew VirtualResource.expandlocations ), formatMetadataPathreffilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieve(org.commonjava.maven.galley.model.Location, java.lang.String)
     */
    @Override
    public Transfer retrievefinal Location locationfinal String groupId )
        throws TransferException
    {
        return retrievelocationgroupIdnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieve(org.commonjava.maven.galley.model.Location, java.lang.String, java.lang.String)
     */
    @Override
    public Transfer retrievefinal Location locationfinal String groupIdfinal String filename )
        throws TransferException
    {
        return .retrieveFirstnew VirtualResource.expandlocation ), formatMetadataPathgroupIdfilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieve(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef)
     */
    @Override
    public Transfer retrievefinal Location locationfinal ProjectRef ref )
        throws TransferException
    {
        return retrievelocationrefnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieve(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.lang.String)
     */
    @Override
    public Transfer retrievefinal Location locationfinal ProjectRef reffinal String filename )
        throws TransferException
    {
        return .retrieveFirstnew VirtualResource.expandlocation ), formatMetadataPathreffilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveAll(java.util.List, java.lang.String)
     */
    @Override
    public List<TransferretrieveAllfinal List<? extends Locationlocationsfinal String groupId )
        throws TransferException
    {
        return retrieveAlllocationsgroupIdnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveAll(java.util.List, java.lang.String, java.lang.String)
     */
    @Override
    public List<TransferretrieveAllfinal List<? extends Locationlocationsfinal String groupIdfinal String filename )
        throws TransferException
    {
        return .retrieveAllnew VirtualResource.expandlocations ), formatMetadataPathgroupIdfilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveAll(java.util.List, org.commonjava.maven.atlas.ident.ref.ProjectRef)
     */
    @Override
    public List<TransferretrieveAllfinal List<? extends Locationlocationsfinal ProjectRef ref )
        throws TransferException
    {
        return retrieveAlllocationsrefnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveAll(java.util.List, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.lang.String)
     */
    @Override
    public List<TransferretrieveAllfinal List<? extends Locationlocationsfinal ProjectRef reffinal String filename )
        throws TransferException
    {
        return .retrieveAllnew VirtualResource.expandlocations ), formatMetadataPathreffilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveFirst(java.util.List, java.lang.String)
     */
    @Override
    public Transfer retrieveFirstfinal List<? extends Locationlocationsfinal String groupId )
        throws TransferException
    {
        return retrieveFirstlocationsgroupIdnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveFirst(java.util.List, java.lang.String, java.lang.String)
     */
    @Override
    public Transfer retrieveFirstfinal List<? extends Locationlocationsfinal String groupIdfinal String filename )
        throws TransferException
    {
        return .retrieveFirstnew VirtualResource.expandlocations ), formatMetadataPathgroupIdfilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveFirst(java.util.List, org.commonjava.maven.atlas.ident.ref.ProjectRef)
     */
    @Override
    public Transfer retrieveFirstfinal List<? extends Locationlocationsfinal ProjectRef ref )
        throws TransferException
    {
        return retrieveFirstlocationsrefnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#retrieveFirst(java.util.List, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.lang.String)
     */
    @Override
    public Transfer retrieveFirstfinal List<? extends Locationlocationsfinal ProjectRef reffinal String filename )
        throws TransferException
    {
        return .retrieveFirstnew VirtualResource.expandlocations ), formatMetadataPathreffilename ) ) );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#store(org.commonjava.maven.galley.model.Location, java.lang.String, java.io.InputStream)
     */
    @Override
    public Transfer storefinal Location locationfinal String groupIdfinal InputStream stream )
        throws TransferException
    {
        return storelocationgroupIdnullstream );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#store(org.commonjava.maven.galley.model.Location, java.lang.String, java.lang.String, java.io.InputStream)
     */
    @Override
    public Transfer storefinal Location locationfinal String groupIdfinal String filenamefinal InputStream stream )
        throws TransferException
    {
        final VirtualResource virt = new VirtualResource.expandlocation ), formatMetadataPathgroupIdfilename ) );
        final ConcreteResource selected = ArtifactRules.selectStorageResourcevirt );
        if ( selected == null )
        {
            .warn"Cannot deploy. No valid deploy points in group." );
            throw new TransferException"No deployment locations available for: %s in: %s"virt.getPath(), virt.getLocations() );
        }
        return .storeselectedstream );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#store(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.io.InputStream)
     */
    @Override
    public Transfer storefinal Location locationfinal ProjectRef reffinal InputStream stream )
        throws TransferException
    {
        return storelocationrefnullstream );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#store(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.lang.String, java.io.InputStream)
     */
    @Override
    public Transfer storefinal Location locationfinal ProjectRef reffinal String filenamefinal InputStream stream )
        throws TransferException
    {
        final VirtualResource virt = new VirtualResource.expandlocation ), formatMetadataPathreffilename ) );
        final ConcreteResource selected = ArtifactRules.selectStorageResourcevirt );
        if ( selected == null )
        {
            .warn"Cannot deploy. No valid deploy points in group." );
            throw new TransferException"No deployment locations available for: %s in: %s"virt.getPath(), virt.getLocations() );
        }
        return .storeselectedstream );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#publish(org.commonjava.maven.galley.model.Location, java.lang.String, java.io.InputStream, long)
     */
    @Override
    public boolean publishfinal Location locationfinal String groupIdfinal InputStream streamfinal long length )
        throws TransferException
    {
        return publishlocationgroupIdnullstreamlengthnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#publish(org.commonjava.maven.galley.model.Location, java.lang.String, java.lang.String, java.io.InputStream, long, java.lang.String)
     */
    @Override
    public boolean publishfinal Location locationfinal String groupIdfinal String filenamefinal InputStream streamfinal long length,
                            final String contentType )
        throws TransferException
    {
        return .publishnew ConcreteResourcelocationformatMetadataPathgroupIdfilename ) ), streamlengthcontentType );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#publish(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.io.InputStream, long)
     */
    @Override
    public boolean publishfinal Location locationfinal ProjectRef reffinal InputStream streamfinal long length )
        throws TransferException
    {
        return publishlocationrefnullstreamlengthnull );
    }
    /* (non-Javadoc)
     * @see org.commonjava.maven.galley.ArtifactMetadataManager#publish(org.commonjava.maven.galley.model.Location, org.commonjava.maven.atlas.ident.ref.ProjectRef, java.lang.String, java.io.InputStream, long, java.lang.String)
     */
    @Override
    public boolean publishfinal Location locationfinal ProjectRef reffinal String filenamefinal InputStream streamfinal long length,
                            final String contentType )
        throws TransferException
    {
        return .publishnew ConcreteResourcelocationformatMetadataPathreffilename ) ), streamlengthcontentType );
    }
New to GrepCode? Check out our FAQ X