Package org.drools.workbench.screens.globals.model

Examples of org.drools.workbench.screens.globals.model.GlobalsModel


        }

        //Create new asset for Globals. All Globals can be in one file.
        final String assetName = makeNewAssetName( "Global",
                                                   globalsType );
        final GlobalsModel model = makeGlobalsModel( globals );
        globalsService.create( context,
                               assetName,
                               model,
                               "Converted from XLS Decision Table" );
View Full Code Here


        result.addMessage( "Created Globals '" + assetName + "'",
                           ConversionMessageType.INFO );
    }

    private GlobalsModel makeGlobalsModel( final List<Global> globals ) {
        final GlobalsModel model = new GlobalsModel();
        for ( Global global : globals ) {
            model.getGlobals().add( new org.drools.workbench.screens.globals.model.Global( global.getIdentifier(),
                                                                                           global.getClassName() ) );
        }
        return model;
    }
View Full Code Here

    @Override
    public void create( final Package pkg,
                        final String baseFileName,
                        final NewResourcePresenter presenter ) {
        final GlobalsModel model = new GlobalsModel();
        busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() );
        globalsService.call( getSuccessCallback( presenter ),
                             new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(),
                                                                                                     buildFileName( baseFileName,
                                                                                                                    resourceType ),
View Full Code Here

    @Override
    public GlobalsEditorContent loadContent( final Path path ) {
        try {
            //De-serialize model
            final GlobalsModel model = load( path );
            final ProjectDataModelOracle oracle = dataModelService.getProjectDataModel( path );
            final String[] fullyQualifiedClassNames = DataModelOracleUtilities.getFactTypes( oracle );

            return new GlobalsEditorContent( model,
                                             Arrays.asList( fullyQualifiedClassNames ) );
View Full Code Here

        }

        //Create new asset for Globals. All Globals can be in one file.
        final String assetName = makeNewAssetName( "Global",
                                                   globalsType );
        final GlobalsModel model = makeGlobalsModel( globals );
        globalsService.create( context,
                               assetName,
                               model,
                               "Converted from XLS Decision Table" );
View Full Code Here

        result.addMessage( "Created Globals '" + assetName + "'",
                           ConversionMessageType.INFO );
    }

    private GlobalsModel makeGlobalsModel( final List<Global> globals ) {
        final GlobalsModel model = new GlobalsModel();
        for ( Global global : globals ) {
            model.getGlobals().add( new org.drools.workbench.screens.globals.model.Global( global.getIdentifier(),
                                                                                           global.getClassName() ) );
        }
        return model;
    }
View Full Code Here

    @Override
    public void create( final Package pkg,
                        final String baseFileName,
                        final NewResourcePresenter presenter ) {
        final GlobalsModel model = new GlobalsModel();
        busyIndicatorView.showBusyIndicator( CommonConstants.INSTANCE.Saving() );
        globalsService.call( getSuccessCallback( presenter ),
                             new HasBusyIndicatorDefaultErrorCallback( busyIndicatorView ) ).create( pkg.getPackageMainResourcesPath(),
                                                                                                     buildFileName( resourceType,
                                                                                                                    baseFileName ),
View Full Code Here

    @Override
    public GlobalsEditorContent loadContent( final Path path ) {
        try {
            //De-serialize model
            final GlobalsModel model = load( path );
            final ProjectDataModelOracle oracle = dataModelService.getProjectDataModel( path );
            final String[] fullyQualifiedClassNames = new String[ oracle.getProjectModelFields().size() ];
            oracle.getProjectModelFields().keySet().toArray( fullyQualifiedClassNames );

            //Signal opening to interested parties
View Full Code Here

    @Override
    public GlobalsEditorContent loadContent( final Path path ) {
        try {
            //De-serialize model
            final GlobalsModel model = load( path );
            final PackageDataModelOracle oracle = dataModelService.getDataModel( path );

            return new GlobalsEditorContent( model,
                                             oracle );
View Full Code Here

*/
public class GlobalsPersistenceTest {

    @Test
    public void testMarshalling() {
        final GlobalsModel model = new GlobalsModel();
        final String expected = "global java.lang.String myString;\n";

        model.getGlobals().add( new Global( "myString",
                                            "java.lang.String" ) );
        final String actual = GlobalsPersistence.getInstance().marshal( model );

        assertNotNull( actual );
        assertEquals( expected,
View Full Code Here

TOP

Related Classes of org.drools.workbench.screens.globals.model.GlobalsModel

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.