Examples of loadAsset()


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

        repositoryPackageService.saveModule( data );
        data = repositoryPackageService.loadModule( uuid );
        it = rulesRepository.loadModule( data.getName() );
        assertFalse( data.isArchived() );
        assertFalse( it.loadAsset( "drools" ).isArchived() );
        assertTrue( it.loadAsset( "rule_1" ).isArchived() );

        data.setArchived( true );

        repositoryPackageService.saveModule( data );
        data = repositoryPackageService.loadModule( uuid );
View Full Code Here

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

        repositoryPackageService.saveModule( data );
        data = repositoryPackageService.loadModule( uuid );
        it = rulesRepository.loadModule( data.getName() );
        assertTrue( data.isArchived() );
        assertTrue( it.loadAsset( "drools" ).isArchived() );
        assertTrue( it.loadAsset( "rule_1" ).isArchived() );

    }

    @Test
View Full Code Here

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

        repositoryPackageService.saveModule( data );
        data = repositoryPackageService.loadModule( uuid );
        it = rulesRepository.loadModule( data.getName() );
        assertTrue( data.isArchived() );
        assertTrue( it.loadAsset( "drools" ).isArchived() );
        assertTrue( it.loadAsset( "rule_1" ).isArchived() );

    }

    @Test
    public void testPackageConfSave() throws Exception {
View Full Code Here

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

        } else {
            pkg = repository.loadModuleSnapshot( packageName,
                                                  packageVersion );
        }

        AssetItem item = pkg.loadAsset( assetName );
        ContentHandler handler = ContentManager.getHandler( item.getFormat() );
        StringBuilder stringBuilder = new StringBuilder();
        if ( handler.isRuleAsset() ) {

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
View Full Code Here

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

    @WebRemote
    @LoggedIn
    public TableDataResult loadAssetHistory(String packageUUID,
                                            String assetName) throws SerializationException {
        ModuleItem pi = rulesRepository.loadModuleByUUID(packageUUID);
        AssetItem assetItem = pi.loadAsset(assetName);
        serviceSecurity.checkSecurityPackageReadOnlyWithPackageUuid(assetItem.getModule().getUUID());

        return repositoryAssetOperations.loadItemHistory(assetItem);
    }
View Full Code Here

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

        } else {
            pkg = repository.loadModuleSnapshot( packageName,
                                                  packageVersion );
        }

        AssetItem item = pkg.loadAsset( assetName );
        ContentHandler handler = ContentManager.getHandler( item.getFormat() );
        StringBuilder stringBuilder = new StringBuilder();
        if ( handler.isRuleAsset() ) {

            BRMSPackageBuilder builder = new BRMSPackageBuilder();
View Full Code Here

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

                    builder.writePDF(out);

                } else if (helper.isPng()) {
                    ModuleItem pkg = rulesRepository.loadModule(helper.getPackageName());
                    AssetItem asset = pkg.loadAsset(helper.getAssetName());

                    fileName = fileManagerService.loadFileAttachmentByUUID(asset.getUUID(),
                            out);
                } else {
                    if (req.getRequestURI().endsWith("SCENARIOS")) {
View Full Code Here

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

                        int lastIndexOfSlash = uri.lastIndexOf('/');
                        String assetName = uri.substring(lastIndexOfSlash + 1);
                        fileName = assetName + ".xml";

                        ModuleItem pkg = rulesRepository.loadModule(helper.getPackageName());
                        AssetItem asset = pkg.loadAsset(assetName);
                        out.write(asset.getBinaryContentAsBytes());

                    } else {
                        fileName = fileManagerService.loadBinaryPackage(helper.getPackageName(),
                                helper.getVersion(),
View Full Code Here

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

    } else {
      if (resourceFile.indexOf("?version=") > -1) {
        String[] v = resourceFile.split("\\?version\\=");
        String version = v[1];
        String assetName = AssetItem.getAssetNameFromFileName(v[0])[0];
        AssetItem asset = pkg.loadAsset(assetName);
        if (asset.isArchived()) {
          Text r = new Text();
          r.data = "";
          return r;
        }
View Full Code Here

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

          r.data = "Unknown version number : " + versionNumber;
          return r;
        }
      } else {
         String assetName = AssetItem.getAssetNameFromFileName(resourceFile)[0];
        AssetItem asset = pkg.loadAsset(assetName);
        return buildAssetContentResponse(pkg, 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.