public ApplicationDefinition createApplication(String text, ContentType contentType) {
        Utils.require(!m_restClient.isClosed(), "Client has been closed");
        Utils.require(text != null && text.length() > 0, "text");
        Utils.require(contentType != null, "contentType");
        
        ApplicationDefinition appDef = new ApplicationDefinition();
        appDef.parse(UNode.parse(text, contentType));
        return createApplication(appDef);
    }
public ApplicationDefinition createApplication ( String text , ContentType contentType ) { Utils . require ( ! m_restClient . isClosed ( ) , "Client has been closed" ) ; Utils . require ( text != null && text . length ( ) > 0 , "text" ) ; Utils . require ( contentType != null , "contentType" ) ; ApplicationDefinition appDef = new ApplicationDefinition ( ) ; appDef . parse ( UNode . parse ( text , contentType ) ) ; return createApplication ( appDef ) ; }
Create a new application in the connected Doradus server as defined by the given
schema text. The text must be formatted in JSON or XML as defined by the content
type. If the given application already exists, its schema is replaced with the
given definition. The {@link ApplicationDefinition} for the same application is
returned, updated with any system-assigned defaults. An exception is thrown if an
error occurs.

@param text          Text definition of the application to create or update.
@param contentType   {@link ContentType} in which text is formatted. Only
{@link ContentType#APPLICATION_JSON} and
{@link ContentType#TEXT_XML} are supported.
@return              {@link ApplicationDefinition} of same application, updated
with any system-assigned defaults.