Examples of updateStringProperty()


Examples of org.drools.repository.ModuleItem.updateStringProperty()

    @Test
    public void testGetBasics() throws Exception {
        RulesRepository repo = RepositorySessionUtil.getRepository();
        ModuleItem pkg = repo.createModule("testRestGetBasics", "", ModuleItem.MODULE_FORMAT);
        pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
        repo.save();


        AssetItem asset1 = pkg.addAsset("asset1", "");
        asset1.updateContent("this is content");
View Full Code Here

Examples of org.drools.repository.ModuleItem.updateStringProperty()

    @Test
    public void testPost() throws Exception {
        RulesRepository repo = RepositorySessionUtil.getRepository();
        ModuleItem pkg = repo.createModule("testRestPost", "", ModuleItem.MODULE_FORMAT);
        pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
        repo.save();

        RestAPI api = new RestAPI(repo);
        ByteArrayInputStream in = new ByteArrayInputStream("abc".getBytes());
        api.post("/packages/testRestPost/asset1.drl", in, "a comment");
View Full Code Here

Examples of org.drools.repository.ModuleItem.updateStringProperty()

    @Test
    public void testPut() throws Exception {
        //need to test both asset and .package shite.
        RulesRepository repo = RepositorySessionUtil.getRepository();
        ModuleItem pkg = repo.createModule("testRestPut", "", ModuleItem.MODULE_FORMAT);
        pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
        repo.save();

        AssetItem asset1 = pkg.addAsset("asset1", "");
        asset1.updateContent("this is content");
        asset1.updateFormat("drl");
View Full Code Here

Examples of org.drools.repository.ModuleItem.updateStringProperty()

    @Test
    public void testGetBasics() throws Exception {
        RulesRepository repo = RepositorySessionUtil.getRepository();
        ModuleItem pkg = repo.createModule("testRestGetBasics", "", ModuleItem.MODULE_FORMAT);
        pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
        repo.save();


        AssetItem asset1 = pkg.addAsset("asset1", "");
        asset1.updateContent("this is content");
View Full Code Here

Examples of org.drools.repository.ModuleItem.updateStringProperty()

    @Test
    public void testPost() throws Exception {
        RulesRepository repo = RepositorySessionUtil.getRepository();
        ModuleItem pkg = repo.createModule("testRestPost", "", ModuleItem.MODULE_FORMAT);
        pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
        repo.save();

        RestAPI api = new RestAPI(repo);
        api.setAssetValidator(new AssetValidator());
        ByteArrayInputStream in = new ByteArrayInputStream("abc".getBytes());
View Full Code Here

Examples of org.drools.repository.ModuleItem.updateStringProperty()

    @Test
    public void testPut() throws Exception {
        //need to test both asset and .package shite.
        RulesRepository repo = RepositorySessionUtil.getRepository();
        ModuleItem pkg = repo.createModule("testRestPut", "", ModuleItem.MODULE_FORMAT);
        pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
        repo.save();

        AssetItem asset1 = pkg.addAsset("asset1", "");
        asset1.updateContent("this is content");
        asset1.updateFormat("drl");
View Full Code Here

Examples of org.drools.repository.ModuleItem.updateStringProperty()

    @Test
    public void testDelete() throws Exception {
        RulesRepository repo = RepositorySessionUtil.getRepository();
        ModuleItem pkg = repo.createModule("testRestDelete", "", ModuleItem.MODULE_FORMAT);
        pkg.updateStringProperty("This is some header", ModuleItem.HEADER_PROPERTY_NAME);
        repo.save();

        AssetItem asset1 = pkg.addAsset("asset1", "");
        asset1.updateContent("this is content");
        asset1.updateFormat("drl");
View Full Code Here

Examples of org.drools.repository.PackageItem.updateStringProperty()

      String[] a = fileName.split("\\.");
      if (a[1].equals("package")) {
        //new package
        PackageItem pkg = repo.createPackage(bits[1], "<added remotely>");
        pkg.updateCheckinComment(comment);
        pkg.updateStringProperty(readContent(in), PackageItem.HEADER_PROPERTY_NAME);
        repo.save();
      } else {
        //new asset
        PackageItem pkg = repo.loadPackage(bits[1]);
        AssetItem asset;
View Full Code Here

Examples of org.drools.repository.PackageItem.updateStringProperty()

      if (a[1].equals("package")) {
        //updating package header
        if (lastModified != null && pkg.getLastModified().after(lastModified)) {
          throw new RulesRepositoryException("The package was modified by: " + pkg.getLastContributor() + ", unable to write changes.");
        }
        pkg.updateStringProperty(readContent(in), PackageItem.HEADER_PROPERTY_NAME);
        pkg.checkin(comment);
        repo.save();
      } else {
        AssetItem as = pkg.loadAsset(a[0]);
        if (lastModified != null && as.getLastModified().after(lastModified)) {
View Full Code Here

Examples of org.drools.repository.PackageItem.updateStringProperty()

      String[] a = fileName.split("\\.");
      if (a[1].equals("package")) {
        //new package
        PackageItem pkg = repo.createPackage(bits[1], "<added remotely>");
        pkg.updateCheckinComment(comment);
        pkg.updateStringProperty(readContent(in), PackageItem.HEADER_PROPERTY_NAME);
        repo.save();
      } else {
        //new asset
        PackageItem pkg = repo.loadPackage(bits[1]);
        AssetItem asset;
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.