Package org.jbpm.designer.repository

Examples of org.jbpm.designer.repository.Repository.loadAsset()


        Asset asset1 = assets.next();
        assertEquals("evaluate-taskform", asset1.getName());
        assertEquals("/defaultPackage", asset1.getAssetLocation());

        Asset<String> form1 = repository.loadAsset(asset1.getUniqueId());
        assertNotNull(form1.getAssetContent());
        assertEquals("this is simple task content", form1.getAssetContent());

    }
View Full Code Here


        Collection<Asset> dictionary = repository.listAssets("/global", new FilterByExtension("json"));
        assertNotNull(dictionary);
        assertEquals(1, dictionary.size());

        Asset<String> dictionaryAsset = repository.loadAsset(dictionary.iterator().next().getUniqueId());
        assertNotNull(dictionaryAsset);
        assertEquals("this is dictionary", dictionaryAsset.getAssetContent());
    }

    @Test
View Full Code Here

        Collection<Asset> dictionary = repository.listAssets("/global", new FilterByExtension("json"));
        assertNotNull(dictionary);
        assertEquals(1, dictionary.size());

        Asset<String> dictionaryAsset = repository.loadAsset(dictionary.iterator().next().getUniqueId());
        assertNotNull(dictionaryAsset);
        assertEquals("custom editors content", dictionaryAsset.getAssetContent());
    }
}
View Full Code Here

        Collection<Asset> serviceAssets = repository.listAssets("/global");
        assertNotNull(serviceAssets);
        assertEquals(2, serviceAssets.size());

        Asset<String> form = repository.loadAsset(serviceAssets.iterator().next().getUniqueId());
        assertNotNull(form.getAssetContent());
    }
}
View Full Code Here

        assertNotNull(forms);
        assertEquals(1, forms.size());
        assertEquals("hello-taskform", forms.iterator().next().getName());
        assertEquals("/defaultPackage", forms.iterator().next().getAssetLocation());

        Asset<String> form = repository.loadAsset(forms.iterator().next().getUniqueId());
        assertNotNull(form.getAssetContent());
    }

    @Ignore
    @Test
View Full Code Here

        Asset asset2 = assets.next();
        assertEquals("testprocess-taskform", asset2.getName());
        assertEquals("/defaultPackage", asset2.getAssetLocation());

        Asset<String> form1 = repository.loadAsset(asset1.getUniqueId());
        assertNotNull(form1.getAssetContent());
        Asset<String> form2 = repository.loadAsset(asset2.getUniqueId());
        assertNotNull(form2.getAssetContent());
    }
View Full Code Here

        assertEquals("testprocess-taskform", asset2.getName());
        assertEquals("/defaultPackage", asset2.getAssetLocation());

        Asset<String> form1 = repository.loadAsset(asset1.getUniqueId());
        assertNotNull(form1.getAssetContent());
        Asset<String> form2 = repository.loadAsset(asset2.getUniqueId());
        assertNotNull(form2.getAssetContent());
    }

    private String readFile(String pathname) throws IOException {
        StringBuilder fileContents = new StringBuilder();
View Full Code Here

         }
         Repository repository = profile.getRepository();

         Asset<String> processAsset = null;
         try {
             processAsset = repository.loadAsset(uuid);


             if(action != null && action.equals(ACTION_LOAD)) {
                 resp.setContentType("text/html");
                 resp.setCharacterEncoding("UTF-8");
View Full Code Here

        Repository repository = profile.getRepository();

        String[] pkgassetinfo = new String[2];
        try {
        Asset asset = repository.loadAsset(uuid);

        pkgassetinfo[0] = asset.getAssetLocation();
        pkgassetinfo[1] = asset.getName();
        } catch (AssetNotFoundException e) {
            _logger.error("Asset " + uuid + " not found");
View Full Code Here

 
  public static Asset getProcessSourceContent(String uuid, IDiagramProfile profile) {
    try {
            Repository repository = profile.getRepository();

            Asset<String> processAsset = repository.loadAsset(uuid);

            return processAsset;
        } catch (Exception e) {
          _logger.error("Error retrieving asset content: " + e.getMessage());
            return null;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.