Sha256: f06c61257cef0c4a4281c657a873e40017b570b79fc91477c71dd49a16365d50

Contents?: true

Size: 1.32 KB

Versions: 6

Compression:

Stored size: 1.32 KB

Contents

package <%= base_package %>.controllers {
  import <%= base_package %>.models.*;
  import <%= base_package %>.commands.*;

	import mx.core.Application;		
  import org.ruboss.Ruboss;
  import org.ruboss.controllers.RubossApplicationController;
  import org.ruboss.utils.RubossUtils;

  public class <%= command_controller_name %> extends RubossApplicationController {
    private static var controller:<%= command_controller_name %>;
    
    public static var models:Array = [<%= model_names %>]; /* Models */
    
    public static var commands:Array = [<%= command_names %>]; /* Commands */
    
    public function <%= command_controller_name %>(enforcer:SingletonEnforcer, extraServices:Array,
      defaultServiceId:int = -1) {
      super(commands, models, extraServices, defaultServiceId);
    }
    
    public static function get instance():<%= command_controller_name %> {
      if (controller == null) initialize();
      return controller;
    }
    
    public static function initialize(extraServices:Array = null, defaultServiceId:int = -1,
      airDatabaseName:String = null):void {
      if (!RubossUtils.isEmpty(airDatabaseName)) Ruboss.airDatabaseName = airDatabaseName;
      controller = new <%= command_controller_name %>(new SingletonEnforcer, extraServices,
        defaultServiceId);
    }
  }
}

class SingletonEnforcer {}

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
dima-ruboss4ruby-1.1.0 generators/ruboss_controller/templates/controller.as.erb
dima-ruboss4ruby-1.1.1 generators/ruboss_controller/templates/controller.as.erb
dima-ruboss4ruby-1.1.2 generators/ruboss_controller/templates/controller.as.erb
ruboss4ruby-1.1.0 generators/ruboss_controller/templates/controller.as.erb
ruboss4ruby-1.1.2 generators/ruboss_controller/templates/controller.as.erb
ruboss4ruby-1.1.1 generators/ruboss_controller/templates/controller.as.erb