Package org.guvnor.common.services.project.model

Examples of org.guvnor.common.services.project.model.Package


    public Path save( final Path resource,
                      final TemplateModel model,
                      final Metadata metadata,
                      final String comment ) {
        try {
            final Package pkg = projectService.resolvePackage( resource );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            model.setPackageName( packageName );

            ioService.write( paths.convert( resource ),
                             BRDRTXMLPersistence.getInstance().marshal( model ),
                             metadataService.setUpAttributes( resource, metadata ),
View Full Code Here


    public Path create( final Path context,
                        final String fileName,
                        final GuidedDecisionTable52 content,
                        final String comment ) {
        try {
            final Package pkg = projectService.resolvePackage( context );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            content.setPackageName( packageName );

            final org.kie.commons.java.nio.file.Path nioPath = paths.convert( context ).resolve( fileName );
            final Path newPath = paths.convert( nioPath,
                                                false );
View Full Code Here

    public Path save( final Path resource,
                      final GuidedDecisionTable52 model,
                      final Metadata metadata,
                      final String comment ) {
        try {
            final Package pkg = projectService.resolvePackage( resource );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            model.setPackageName( packageName );

            ioService.write( paths.convert( resource ),
                             GuidedDTXMLPersistence.getInstance().marshal( model ),
                             metadataService.setUpAttributes( resource,
View Full Code Here

    public Path create( final Path context,
                        final String fileName,
                        final ScoreCardModel content,
                        final String comment ) {
        try {
            final Package pkg = projectService.resolvePackage( context );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            content.setPackageName( packageName );

            final org.kie.commons.java.nio.file.Path nioPath = paths.convert( context ).resolve( fileName );
            final Path newPath = paths.convert( nioPath,
                                                false );
View Full Code Here

    public Path save( final Path resource,
                      final ScoreCardModel model,
                      final Metadata metadata,
                      final String comment ) {
        try {
            final Package pkg = projectService.resolvePackage( resource );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            model.setPackageName( packageName );

            ioService.write( paths.convert( resource ),
                             GuidedScoreCardXMLPersistence.getInstance().marshal( model ),
                             metadataService.setUpAttributes( resource, metadata ),
View Full Code Here

    private PackageHeaderInfo packageHeaderInfo;

    //Check if the xml contains a Package declaration, appending one if it does not exist
    public String assertPackageNameXML( final String xml,
                                        final Path resource ) {
        final Package pkg = projectService.resolvePackage( resource );
        String pkName =null;
        try{
            pkName =pkg.getPackageName();

            if(pkName!=null && pkg.getPackageName().endsWith(URIUtil.decode(resource.getFileName()))){
                pkName = pkg.getPackageName().substring(0,pkg.getPackageName().indexOf(URIUtil.decode(resource.getFileName()))-1);
            }
        }catch (Exception e){
        }
        final String requiredPackageName = pkName;
View Full Code Here

            final String existingPackageName = PackageNameParser.parsePackageName(drl);
            if ( !"".equals( existingPackageName ) ) {
                return drl;
            }

            final Package pkg = projectService.resolvePackage( resource );
            String pkName =null;
            try{
                pkName =pkg.getPackageName();
                if(pkName!=null && pkg.getPackageName().endsWith(URIUtil.decode(resource.getFileName()))){
                    pkName = pkg.getPackageName().substring(0,pkg.getPackageName().indexOf(URIUtil.decode(resource.getFileName()))-1);
                }
            }catch (Exception e){

            }
            final String requiredPackageName = pkName;
View Full Code Here

            }

            final String packageName = getPackageName( path );
            final ProjectDataModelOracle dmo = getProjectDataModelOracle( path );
            final Project project = projectService.resolveProject( Paths.convert( path ) );
            final Package pkg = projectService.resolvePackage( Paths.convert( path ) );

            final DefaultIndexBuilder builder = new DefaultIndexBuilder( project,
                                                                         pkg );
            final EnumIndexVisitor visitor = new EnumIndexVisitor( dmo,
                                                                   builder,
View Full Code Here

                                      "Pattern52" );

        GuidedDecisionTable52 model = GuidedDTXMLPersistence.getInstance().unmarshal( content );

        //Add package
        final Package pkg = projectService.resolvePackage( path );
        String pkName =pkg.getPackageName();
        try{
            if(pkName!=null && pkg.getPackageName().endsWith(path.getFileName())){
                pkName = pkg.getPackageName().substring(0,pkg.getPackageName().indexOf(path.getFileName())-1);
            }
        }catch (Exception e){

        }
        final String requiredPackageName = pkName;
View Full Code Here

    public Path create( final Path context,
                        final String fileName,
                        final GlobalsModel content,
                        final String comment ) {
        try {
            final Package pkg = projectService.resolvePackage( context );
            final String packageName = ( pkg == null ? null : pkg.getPackageName() );
            content.setPackageName( packageName );

            final org.uberfire.java.nio.file.Path nioPath = Paths.convert( context ).resolve( fileName );
            final Path newPath = Paths.convert( nioPath );
View Full Code Here

TOP

Related Classes of org.guvnor.common.services.project.model.Package

Copyright © 2018 www.massapicom. 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.