net.sf.sail.webapp.service.file.impl
Class AuthoringJNLPModifier

java.lang.Object
  extended by net.sf.sail.webapp.service.file.impl.AuthoringJNLPModifier
All Implemented Interfaces:
StringModifyService

public class AuthoringJNLPModifier
extends Object
implements StringModifyService

Version:
$Id$
Author:
Laurel Williams

Field Summary
static String CURNIT_PROJECT_ID
           
static String CURNIT_URL_ATTRIBUTE
           
static String CURNIT_URL_ATTRIBUTE_POST
           
 
Constructor Summary
AuthoringJNLPModifier()
           
 
Method Summary
 String modifyJnlp(String inputJNLP, String curnitURL, Long projectId)
          Takes a string representation of the authoring launcher JNLP and adds a property element into the resources element which sets a system property "curnit_url" to the curnit url which we want to launch in the authoring tool.
 String modifyJnlp(String jnlpString, String curnitUrl, Long projectId, String portalBaseUrl, String postCurnitUrl)
          Takes a string representation of the authoring launcher JNLP and adds a property element into the resources element which sets a system property "curnit_url" to the curnit url which we want to launch in the authoring tool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CURNIT_URL_ATTRIBUTE

public static final String CURNIT_URL_ATTRIBUTE
See Also:
Constant Field Values

CURNIT_URL_ATTRIBUTE_POST

public static final String CURNIT_URL_ATTRIBUTE_POST
See Also:
Constant Field Values

CURNIT_PROJECT_ID

public static final String CURNIT_PROJECT_ID
See Also:
Constant Field Values
Constructor Detail

AuthoringJNLPModifier

public AuthoringJNLPModifier()
Method Detail

modifyJnlp

public String modifyJnlp(String inputJNLP,
                         String curnitURL,
                         Long projectId)
                  throws org.jdom.JDOMException,
                         IOException
Takes a string representation of the authoring launcher JNLP and adds a property element into the resources element which sets a system property "curnit_url" to the curnit url which we want to launch in the authoring tool.

Parameters:
inputJNLP - The contents of a authoring launcher jnlp file as a string.
curnitURL - The url for a curnit to be editted as a string
projectId - The id of the project to author
Returns:
A string representing the altered jnlp (with application argument added)
Throws:
org.jdom.JDOMException
IOException

modifyJnlp

public String modifyJnlp(String jnlpString,
                         String curnitUrl,
                         Long projectId,
                         String portalBaseUrl,
                         String postCurnitUrl)
                  throws org.jdom.JDOMException,
                         IOException
Takes a string representation of the authoring launcher JNLP and adds a property element into the resources element which sets a system property "curnit_url" to the curnit url which we want to launch in the authoring tool.

Parameters:
inputJNLP - The contents of a authoring launcher jnlp file as a string.
curnitURL - The url for a curnit to be editted as a string
projectId - The id of the project to author
portalBaseUrl - the url where the portal's base is, ie http://localhost:8080/webapp or http://123.45.678.901:8080/webapp
postCurnitUrl - the url to post the otml to. This url will know how to persist the otml.
Returns:
A string representing the altered jnlp (with application argument added)
Throws:
org.jdom.JDOMException
IOException


Copyright © 2012. All Rights Reserved.