Created
April 6, 2012 14:58
-
-
Save nialdarbey/2320586 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Creates a story on Pivotal TRacker | |
* | |
* {@sample.xml ../../../doc/PivotalTracker-connector.xml.sample | |
* pivotaltracker:create-story} | |
* | |
* @param storyXml | |
* details of story | |
* @return Story xml | |
*/ | |
@Processor | |
public String createStory(String storyXml) { | |
logger.info("Creating story "); | |
Client client = Client.create(); | |
WebResource webResource = client.resource(storiesUrl); | |
storyXml = webResource.type(MediaType.APPLICATION_XML).header("X-TrackerToken", trackerToken).header("Content-type", "application/xml").post(String.class, storyXml); | |
return storyXml; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment