org.overlord.sramp.client
Class SrampClientUtils

java.lang.Object
  extended by org.overlord.sramp.client.SrampClientUtils

public final class SrampClientUtils
extends Object

Some useful static utils for users of the s-ramp client.

Author:
eric.wittmann@redhat.com

Method Summary
static String getArtifactModel(org.jboss.resteasy.plugins.providers.atom.Entry entry)
          Figures out the S-RAMP artifact model for the given Entry.
static String getArtifactType(org.jboss.resteasy.plugins.providers.atom.Entry entry)
          Figures out the S-RAMP artifact type for the given Entry.
static BaseArtifactType unwrapSrampArtifact(ArtifactType artifactType, Artifact artifact)
          Unwraps the specific BaseArtifactType from the S-RAMP Artifact wrapper element.
static BaseArtifactType unwrapSrampArtifact(ArtifactType artifactType, org.jboss.resteasy.plugins.providers.atom.Entry entry)
          Unwraps a specific BaseArtifactType from the Atom Entry containing it.
static BaseArtifactType unwrapSrampArtifact(String artifactType, Artifact artifact)
          Unwraps the specific BaseArtifactType from the S-RAMP Artifact wrapper element.
static BaseArtifactType unwrapSrampArtifact(String artifactType, org.jboss.resteasy.plugins.providers.atom.Entry entry)
          Unwraps a specific BaseArtifactType from the Atom Entry containing it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

unwrapSrampArtifact

public static BaseArtifactType unwrapSrampArtifact(String artifactType,
                                                   Artifact artifact)
Unwraps the specific BaseArtifactType from the S-RAMP Artifact wrapper element. This method requires the artifact's type.

Parameters:
artifactType - the s-ramp artifact type
artifact - the s-ramp wrapper Artifact
Returns:
a BaseArtifactType

unwrapSrampArtifact

public static BaseArtifactType unwrapSrampArtifact(ArtifactType artifactType,
                                                   Artifact artifact)
Unwraps the specific BaseArtifactType from the S-RAMP Artifact wrapper element. This method requires the artifact's type.

Parameters:
artifactType - the s-ramp artifact type
artifact - the s-ramp wrapper Artifact
Returns:
a BaseArtifactType

unwrapSrampArtifact

public static BaseArtifactType unwrapSrampArtifact(String artifactType,
                                                   org.jboss.resteasy.plugins.providers.atom.Entry entry)
                                            throws JAXBException
Unwraps a specific BaseArtifactType from the Atom Entry containing it. This method grabs the Artifact child from the Atom Entry and then unwraps the BaseArtifactType from that.

Parameters:
artifactType - the s-ramp artifact type
entry - an Atom Entry
Returns:
a BaseArtifactType
Throws:
JAXBException

unwrapSrampArtifact

public static BaseArtifactType unwrapSrampArtifact(ArtifactType artifactType,
                                                   org.jboss.resteasy.plugins.providers.atom.Entry entry)
                                            throws JAXBException
Unwraps a specific BaseArtifactType from the Atom Entry containing it. This method grabs the Artifact child from the Atom Entry and then unwraps the BaseArtifactType from that.

Parameters:
artifactType - the s-ramp artifact type
entry - an Atom Entry
Returns:
a BaseArtifactType
Throws:
JAXBException

getArtifactModel

public static String getArtifactModel(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Figures out the S-RAMP artifact model for the given Entry.

Parameters:
entry -

getArtifactType

public static String getArtifactType(org.jboss.resteasy.plugins.providers.atom.Entry entry)
Figures out the S-RAMP artifact type for the given Entry.

Parameters:
entry -


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