Examples of listAssetsByFormat()


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

        ModuleItem mockModule = Mockito.mock( ModuleItem.class );
        when( rulesRepository.loadModuleByUUID( "newUUID" ) ).thenReturn( mockModule );

        AssetItemIterator assetIterator = mock( AssetItemIterator.class );
        when( mockModule.listAssetsByFormat( Mockito.anyString(),
                                             Mockito.anyString(),
                                             Mockito.anyString() ) ).thenReturn( assetIterator );

        when( rulesRepository.copyModule( "from",
                                          "to" ) ).thenReturn( "newUUID" );
View Full Code Here

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

       
        ModuleItem mockModule = Mockito.mock( ModuleItem.class );
        when( rulesRepository.loadModuleByUUID( "old" )).thenReturn( mockModule );

        AssetItemIterator assetIterator = mock( AssetItemIterator.class );
        when( mockModule.listAssetsByFormat( Mockito.anyString(),
                                             Mockito.anyString(),
                                             Mockito.anyString() ) ).thenReturn( assetIterator );
       
        this.repositoryPackageOperations.renameModule( "old",
                                                        "new" );
View Full Code Here

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

    public String[] listTypesInPackage(String packageUUID) throws SerializationException {
        serviceSecurity.checkSecurityPackageReadOnlyWithPackageUuid(packageUUID);

        ModuleItem pkg = this.rulesRepository.loadModuleByUUID(packageUUID);
        List<String> res = new ArrayList<String>();
        AssetItemIterator it = pkg.listAssetsByFormat(AssetFormats.MODEL,
                AssetFormats.DRL_MODEL);

        JarInputStream jis = null;

        try {
View Full Code Here

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

                //no format specified? Return all assets
                iter = p.getAssets();
            }else{
                //if the format is specified, return only the assets of
                //the specified formats.
                iter = p.listAssetsByFormat(formats);
            }
           
            while (iter.hasNext())
                feed.addEntry(toAssetEntryAbdera(iter.next(), uriInfo));
            return feed;
View Full Code Here

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

                //no format specified? Return all assets
                iter = p.getAssets();
            }else{
                //if the format is specified, return only the assets of
                //the specified formats.
                iter = p.listAssetsByFormat(formats);
            }
           
            while (iter.hasNext()) {
                ret.add(toAsset(iter.next(), uriInfo));
            }
View Full Code Here

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

            String tableConfig) {
        long start = System.currentTimeMillis();
        ModuleItem pkg = rulesRepository.loadModuleByUUID(packageUuid);
        AssetItemIterator it;
        if (formats.length > 0) {
            it = pkg.listAssetsByFormat(formats);
        } else {
            it = pkg.listAssetsNotOfFormat(AssetFormatHelper
                    .listRegisteredTypes());
        }
        TableDisplayHandler handler = new TableDisplayHandler(tableConfig);
View Full Code Here

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

        AssetItemIterator iterator;
        if (request.getFormatInList() != null) {
            if (request.getFormatIsRegistered() != null) {
                throw new IllegalArgumentException("Combining formatInList and formatIsRegistered is not yet supported.");
            }
            iterator = packageItem.listAssetsByFormat(request.getFormatInList());

        } else {
            if (request.getFormatIsRegistered() != null && request.getFormatIsRegistered().equals(Boolean.FALSE)) {
                iterator = packageItem.listAssetsNotOfFormat(registeredFormats);
            } else {
View Full Code Here

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

                        xml += "    </add>\n";
                        xml += "</change-set>";
                        out.write(xml.getBytes());
                    } else if (req.getRequestURI().endsWith("MODEL")) {
                        ModuleItem pkg = rulesRepository.loadModule(helper.getPackageName());
                        AssetItemIterator it = pkg.listAssetsByFormat(AssetFormats.MODEL);
                        BufferedInputStream inputFile = null;
                        byte[] data = new byte[1000];
                        int count = 0;
                        int numberOfAssets = 0;
                        while (it.hasNext()) {
View Full Code Here

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

    public String[] listTypesInPackage(String packageUUID) throws SerializationException {
        serviceSecurity.checkSecurityPackageReadOnlyWithPackageUuid(packageUUID);

        ModuleItem pkg = this.rulesRepository.loadModuleByUUID(packageUUID);
        List<String> res = new ArrayList<String>();
        AssetItemIterator it = pkg.listAssetsByFormat(AssetFormats.MODEL,
                AssetFormats.DRL_MODEL);

        JarInputStream jis = null;

        try {
View Full Code Here

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

    }

    //Ensure all Processes (RuleFlow, BPMN, BPMN2) have their package name updated to that of the containing Guvnor package
    private void fixProcessPackageNames(final String moduleUUID) {
        final ModuleItem newModule = rulesRepository.loadModuleByUUID( moduleUUID );
        final AssetItemIterator assetIterator = newModule.listAssetsByFormat( new String[]{AssetFormats.RULE_FLOW_RF, AssetFormats.BPMN_PROCESS, AssetFormats.BPMN2_PROCESS} );

        while ( assetIterator.hasNext() ) {
            final AssetItem asset = assetIterator.next();
            final String assetFormat = asset.getFormat();
            final ContentHandler contentHandler = ContentManager.getHandler( assetFormat );
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.