org.overlord.sramp.atom.services
Class ArtifactResource

java.lang.Object
  extended by org.overlord.sramp.atom.services.ArtifactResource

public class ArtifactResource
extends Object

The JAX-RS resource that handles artifact specific tasks, including:

Author:
eric.wittmann@redhat.com

Constructor Summary
ArtifactResource()
          Constructor.
 
Method Summary
 org.jboss.resteasy.plugins.providers.atom.Entry create(String contentType, String fileName, String model, String type, InputStream content)
          S-RAMP atom POST to upload an artifact to the repository.
 void delete(String model, String type, String uuid)
          Called to delete an s-ramp artifact from the repository.
 javax.ws.rs.core.Response getContent(String model, String type, String uuid)
          Returns the content of an artifact in the s-ramp repository.
 org.jboss.resteasy.plugins.providers.atom.Entry getMetaData(String model, String type, String uuid)
          Called to get the meta data for an s-ramp artifact.
 void updateContent(String contentType, String fileName, String model, String type, String uuid, InputStream content)
          S-RAMP atom PUT to upload a new version of the artifact into the repository.
 void updateMetaData(String model, String type, String uuid, org.jboss.resteasy.plugins.providers.atom.Entry atomEntry)
          Called to update the meta data for an artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactResource

public ArtifactResource()
Constructor.

Method Detail

create

public org.jboss.resteasy.plugins.providers.atom.Entry create(@HeaderParam(value="Content-Type")
                                                              String contentType,
                                                              @HeaderParam(value="Slug")
                                                              String fileName,
                                                              String model,
                                                              String type,
                                                              InputStream content)
                                                       throws SrampAtomException
S-RAMP atom POST to upload an artifact to the repository. The artifact content should be POSTed raw.

Parameters:
fileName -
model -
type -
content -
Throws:
SrampAtomException

updateMetaData

public void updateMetaData(String model,
                           String type,
                           String uuid,
                           org.jboss.resteasy.plugins.providers.atom.Entry atomEntry)
                    throws SrampAtomException
Called to update the meta data for an artifact. Note that this does *not* update the content of the artifact, just the meta data.

Parameters:
model -
type -
uuid -
atomEntry -
Throws:
SrampAtomException

updateContent

public void updateContent(@HeaderParam(value="Content-Type")
                          String contentType,
                          @HeaderParam(value="Slug")
                          String fileName,
                          String model,
                          String type,
                          String uuid,
                          InputStream content)
                   throws SrampAtomException
S-RAMP atom PUT to upload a new version of the artifact into the repository.

Parameters:
model -
type -
uuid -
content -
Throws:
SrampAtomException

getMetaData

public org.jboss.resteasy.plugins.providers.atom.Entry getMetaData(String model,
                                                                   String type,
                                                                   String uuid)
                                                            throws SrampAtomException
Called to get the meta data for an s-ramp artifact. This will return an Atom Entry with the full information about the artifact.

Parameters:
model -
type -
uuid -
Throws:
SrampAtomException

getContent

public javax.ws.rs.core.Response getContent(String model,
                                            String type,
                                            String uuid)
                                     throws SrampAtomException
Returns the content of an artifact in the s-ramp repository.

Parameters:
model -
type -
uuid -
Throws:
SrampAtomException

delete

public void delete(String model,
                   String type,
                   String uuid)
            throws SrampAtomException
Called to delete an s-ramp artifact from the repository.

Parameters:
model -
type -
uuid -
Throws:
SrampAtomException


Copyright © 2011-2012 JBoss, a division of Red Hat. All Rights Reserved.