agave-jobs/jobs-core/src/test/java/org/iplantc/service/jobs/submission/AbstractJobSubmissionTest.java
/**
     * Creates and persists a {@link Software} object for every {@link ExecutionSystem} and 
     * {@link BatchQueue}.
     * 
     * @throws Exception if things go sideways
     */
Creates and persists a  Software object for every  ExecutionSystem and
BatchQueue.

@throws Exception if things go sideways
Creates and persists a Software object for every ExecutionSystem and BatchQueue . @throws Exception if things go sideways
protected void initSoftware() throws Exception 
    {
        JSONObject json = jtd.getTestDataObject(SOFTWARE_SYSTEM_TEMPLATE_DIR + "/system-software.json");
        RemoteSystem deploymentSystem = systemManager.getUserDefaultStorageSystem(SYSTEM_OWNER);
        for (ExecutionSystem executionSystem: systemDao.getAllExecutionSystems()) {
            for (BatchQueue q: executionSystem.getBatchQueues()) {
                json.put("executionSystem", executionSystem.getSystemId());
                json.put("deploymentSystem", deploymentSystem.getSystemId());
                Software original = Software.fromJSON(json, SYSTEM_OWNER);
                Software software = original.clone();
                software.setName("test-" + executionSystem.getSystemId() + "-" + q.getName() );
                software.setOwner(SYSTEM_OWNER);
                software.setDefaultQueue(q.getName());
                software.setDefaultMaxRunTime(q.getMaxRequestedTime());
                software.setDefaultMemoryPerNode(q.getMaxMemoryPerNode() == null ? 1024 : q.getMaxMemoryPerNode());
                software.setDefaultNodes(q.getMaxNodes() == null ? 1024 : q.getMaxNodes());
                software.setDefaultProcessorsPerNode(q.getMaxProcessorsPerNode() == null ? 1024 : q.getMaxProcessorsPerNode());
                software.setAvailable(true);
                software.setExecutionType(executionSystem.getExecutionType());
                SoftwareDao.persist(software);
            }
        }
    }
protected void initSoftware ( ) throws Exception { JSONObject json = jtd . getTestDataObject ( SOFTWARE_SYSTEM_TEMPLATE_DIR + "/system-software.json" ) ; RemoteSystem deploymentSystem = systemManager . getUserDefaultStorageSystem ( SYSTEM_OWNER ) ; for ( ExecutionSystem executionSystem : systemDao . getAllExecutionSystems ( ) ) { for ( BatchQueue q : executionSystem . getBatchQueues ( ) ) { json . put ( "executionSystem" , executionSystem . getSystemId ( ) ) ; json . put ( "deploymentSystem" , deploymentSystem . getSystemId ( ) ) ; Software original = Software . fromJSON ( json , SYSTEM_OWNER ) ; Software software = original . clone ( ) ; software . setName ( "test-" + executionSystem . getSystemId ( ) + "-" + q . getName ( ) ) ; software . setOwner ( SYSTEM_OWNER ) ; software . setDefaultQueue ( q . getName ( ) ) ; software . setDefaultMaxRunTime ( q . getMaxRequestedTime ( ) ) ; software . setDefaultMemoryPerNode ( q . getMaxMemoryPerNode ( ) == null ? 1024 : q . getMaxMemoryPerNode ( ) ) ; software . setDefaultNodes ( q . getMaxNodes ( ) == null ? 1024 : q . getMaxNodes ( ) ) ; software . setDefaultProcessorsPerNode ( q . getMaxProcessorsPerNode ( ) == null ? 1024 : q . getMaxProcessorsPerNode ( ) ) ; software . setAvailable ( true ) ; software . setExecutionType ( executionSystem . getExecutionType ( ) ) ; SoftwareDao . persist ( software ) ; } } }
Creates and persists a {@link Software} object for every {@link ExecutionSystem} and
 {@link BatchQueue}.
Creates and persists a { @link Software } object for every { @link ExecutionSystem } and { @link BatchQueue } .