Examples of updateValid()


Examples of org.drools.repository.AssetItem.updateValid()

                lazarus.checkin( "restored by webdav" );
            } else {
                AssetItem asset = packageItem.addAsset( resource[0],
                                                        "" );
                asset.updateFormat( resource[1] );
                asset.updateValid(assetValidator.validate(asset));
                asset.checkin( "from webdav" );
            }
        } else if ( isGlobalAreas( path ) ) {
            String[] resource = AssetItem.getAssetNameFromFileName( path[1] );
            ModuleItem packageItem = loadGlobalAreaFromRepository();
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

                lazarus.checkin( "restored by webdav" );
            } else {
                AssetItem asset = packageItem.addAsset( resource[0],
                                                        "" );
                asset.updateFormat( resource[1] );
                asset.updateValid(assetValidator.validate(asset));
                asset.checkin( "from webdav" );
            }
        } else {
            throw new UnsupportedOperationException( "Can't add assets here." );
        }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

                asset.updateBinaryContentAttachment( content );
            }
            //here we could save, or check in, depending on if enough time has passed to justify
            //a new version. Otherwise we will pollute the version history with lots of trivial versions.
            //if (shouldCreateNewVersion(asset.getLastModified())) {
            asset.updateValid(assetValidator.validate(asset));
            asset.checkin( "content from webdav" );
            //}
        } else if ( isGlobalAreas( path ) ) {
            if ( path[1].startsWith( "._" ) ) {
                try {
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

                asset.updateBinaryContentAttachment( content );
            }
            //here we could save, or check in, depending on if enough time has passed to justify
            //a new version. Otherwise we will pollute the version history with lots of trivial versions.
            //if (shouldCreateNewVersion(asset.getLastModified())) {
            asset.updateValid(assetValidator.validate(asset));
            asset.checkin( "content from webdav" );
            //}
        } else {
            throw new UnsupportedOperationException( "Unable to save content to this location." );
        }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

        repoAsset.updateDescription(asset.getDescription());

        ContentHandler handler = ContentManager.getHandler(repoAsset.getFormat());
        handler.storeAssetContent(asset,
                repoAsset);
        repoAsset.updateValid(assetValidator.validate(repoAsset));

        if (AssetFormats.affectsBinaryUpToDate(asset.getFormat())) {
            ModuleItem pkg = repoAsset.getModule();
            pkg.updateBinaryUpToDate(false);
            RuleBaseCache.getInstance().remove(pkg.getUUID());
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

                        asset.updateContent(readContent(in));
                    } else {
                        asset.updateBinaryContentAttachment(in);
                    }
                }
                asset.updateValid(assetValidator.validate(asset));
                asset.checkin(comment);
            }
        } else {
            throw new IllegalArgumentException("Unknown rest path for post.");
        }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

                if (as.isBinary()) {
                    as.updateBinaryContentAttachment(in);
                } else {
                    as.updateContent(readContent(in));
                }
                as.updateValid(assetValidator.validate(as));
                as.checkin(comment);
            }

        } else {
            throw new IllegalArgumentException("Unknown rest path for put");
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

            if (extension != null) {
                ai.updateFormat(extension);
            }
            ai.updateBinaryContentAttachment(is);
            ai.getModule().updateBinaryUpToDate(false);
            ai.updateValid(assetValidator.validate(ai));
            ai.checkin("update binary");
            rulesRepository.save();
            return toAssetEntryAbdera(ai, uriInfo);
        } catch (RuntimeException e) {
            //catch RulesRepositoryException and other exceptions. For example when the package already exists.
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

                ai.updateCategoryList(assetMetadata.getCategories());
            }
            if (assetMetadata.getState() != null) {
                ai.updateState(assetMetadata.getState());
            }
            ai.updateValid(assetValidator.validate(ai));
            if (AssetFormats.affectsBinaryUpToDate(ai.getFormat())) {
                ModuleItem pkg = ai.getModule();
                pkg.updateBinaryUpToDate(false);
                RuleBaseCache.getInstance().remove(pkg.getUUID());
            }
View Full Code Here

Examples of org.drools.repository.AssetItem.updateValid()

            AssetItem ai = rulesRepository.loadModule(packageName).loadAsset(assetName);
            /* Update asset */
            ai.checkout();
            ai.updateTitle(asset.getTitle());
            ai.updateDescription(asset.getDescription());
            ai.updateValid(assetValidator.validate(ai));
            if (AssetFormats.affectsBinaryUpToDate(ai.getFormat())) {
                ModuleItem pkg = ai.getModule();
                pkg.updateBinaryUpToDate(false);
                RuleBaseCache.getInstance().remove(pkg.getUUID());
            }
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.