test_class.declarator: spaceEnvironment
test_class.modifier: private
test_class.original_string: private InteractiveSpacesEnvironment spaceEnvironment;
test_class.type: InteractiveSpacesEnvironment
test_class.var_name: spaceEnvironment
test_class.declarator: spaceSystemControl
test_class.modifier: private
test_class.original_string: private InteractiveSpacesSystemControl spaceSystemControl;
test_class.type: InteractiveSpacesSystemControl
test_class.var_name: spaceSystemControl
test_class.declarator: masterApiControllerManager
test_class.modifier: private
test_class.original_string: private MasterApiSpaceControllerManager masterApiControllerManager;
test_class.type: MasterApiSpaceControllerManager
test_class.var_name: masterApiControllerManager
test_class.declarator: masterApiAutomationManager
test_class.modifier: private
test_class.original_string: private MasterApiAutomationManager masterApiAutomationManager;
test_class.type: MasterApiAutomationManager
test_class.var_name: masterApiAutomationManager
test_class.declarator: fileControl
test_class.modifier: private
test_class.original_string: private MasterFileControl fileControl;
test_class.type: MasterFileControl
test_class.var_name: fileControl
test_class.declarator: log
test_class.modifier: private
test_class.original_string: private Log log;
test_class.type: Log
test_class.var_name: log
test_class.file: runtime/master/interactivespaces-master/src/test/java/interactivespaces/master/server/control/MasterFileControlTest.java
test_class.identifier: MasterFileControlTest
test_case.body: @Test
    public void testShutdownAllControllersCall() {
      fileControl.handleCommand(MasterFileControl.COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL);
  
      verify(masterApiControllerManager, times(1)).shutdownAllSpaceControllers();
    }
test_case.class_method_signature: MasterFileControlTest.testShutdownAllControllersCall()
test_case.full_signature: @Test public void testShutdownAllControllersCall()
test_case.identifier: testShutdownAllControllersCall
test_case.invocations: handleCommand shutdownAllSpaceControllers verify times
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testShutdownAllControllersCall()
focal_class.declarator: DIRECTORY_SCAN_TIME = 10
focal_class.modifier: public static final
focal_class.original_string: public static final int DIRECTORY_SCAN_TIME = 10;
focal_class.type: int
focal_class.var_name: DIRECTORY_SCAN_TIME
focal_class.declarator: FOLDER_RUN_CONTROL = "run/control"
focal_class.modifier: public static final
focal_class.original_string: public static final String FOLDER_RUN_CONTROL = "run/control";
focal_class.type: String
focal_class.var_name: FOLDER_RUN_CONTROL
focal_class.declarator: COMMAND_SHUTDOWN = "shutdown"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_SHUTDOWN = "shutdown";
focal_class.type: String
focal_class.var_name: COMMAND_SHUTDOWN
focal_class.declarator: COMMAND_CALCULATE_ACTIVITY_HASHES = "calculate-activity-hashes"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_CALCULATE_ACTIVITY_HASHES = "calculate-activity-hashes";
focal_class.type: String
focal_class.var_name: COMMAND_CALCULATE_ACTIVITY_HASHES
focal_class.declarator: COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL = "space-controllers-shutdown-all"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL = "space-controllers-shutdown-all";
focal_class.type: String
focal_class.var_name: COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL
focal_class.declarator: COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL_ACTIVITIES =
        "space-controllers-shutdown-all-activities"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL_ACTIVITIES =
        "space-controllers-shutdown-all-activities";
focal_class.type: String
focal_class.var_name: COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL_ACTIVITIES
focal_class.declarator: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_STARTUP = "live-activity-group-startup-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_STARTUP = "live-activity-group-startup-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_STARTUP
focal_class.declarator: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_ACTIVATE = "live-activity-group-activate-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_ACTIVATE = "live-activity-group-activate-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_ACTIVATE
focal_class.declarator: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_SHUTDOWN = "live-activity-group-shutdown-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_SHUTDOWN = "live-activity-group-shutdown-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_SHUTDOWN
focal_class.declarator: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_DEACTIVATE = "live-activity-group-deactivate-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_DEACTIVATE = "live-activity-group-deactivate-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_DEACTIVATE
focal_class.declarator: COMMAND_PREFIX_SPACE_STARTUP = "space-startup-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_SPACE_STARTUP = "space-startup-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_SPACE_STARTUP
focal_class.declarator: COMMAND_PREFIX_SPACE_SHUTDOWN = "space-shutdown-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_SPACE_SHUTDOWN = "space-shutdown-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_SPACE_SHUTDOWN
focal_class.declarator: COMMAND_PREFIX_SPACE_ACTIVATE = "space-activate-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_SPACE_ACTIVATE = "space-activate-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_SPACE_ACTIVATE
focal_class.declarator: COMMAND_PREFIX_SPACE_DEACTIVATE = "space-deactivate-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_SPACE_DEACTIVATE = "space-deactivate-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_SPACE_DEACTIVATE
focal_class.declarator: COMMAND_PREFIX_SCRIPT_RUN = "script-run-"
focal_class.modifier: public static final
focal_class.original_string: public static final String COMMAND_PREFIX_SCRIPT_RUN = "script-run-";
focal_class.type: String
focal_class.var_name: COMMAND_PREFIX_SCRIPT_RUN
focal_class.declarator: spaceEnvironment
focal_class.modifier: private
focal_class.original_string: private InteractiveSpacesEnvironment spaceEnvironment;
focal_class.type: InteractiveSpacesEnvironment
focal_class.var_name: spaceEnvironment
focal_class.declarator: spaceSystemControl
focal_class.modifier: private
focal_class.original_string: private InteractiveSpacesSystemControl spaceSystemControl;
focal_class.type: InteractiveSpacesSystemControl
focal_class.var_name: spaceSystemControl
focal_class.declarator: masterApiSpaceControllerManager
focal_class.modifier: private
focal_class.original_string: private MasterApiSpaceControllerManager masterApiSpaceControllerManager;
focal_class.type: MasterApiSpaceControllerManager
focal_class.var_name: masterApiSpaceControllerManager
focal_class.declarator: masterApiAutomationManager
focal_class.modifier: private
focal_class.original_string: private MasterApiAutomationManager masterApiAutomationManager;
focal_class.type: MasterApiAutomationManager
focal_class.var_name: masterApiAutomationManager
focal_class.declarator: activityRepository
focal_class.modifier: private
focal_class.original_string: private ActivityRepository activityRepository;
focal_class.type: ActivityRepository
focal_class.var_name: activityRepository
focal_class.declarator: activityRepositoryManager
focal_class.modifier: private
focal_class.original_string: private ActivityRepositoryManager activityRepositoryManager;
focal_class.type: ActivityRepositoryManager
focal_class.var_name: activityRepositoryManager
focal_class.declarator: watcher
focal_class.modifier: private
focal_class.original_string: private DirectoryWatcher watcher;
focal_class.type: DirectoryWatcher
focal_class.var_name: watcher
focal_class.file: runtime/master/interactivespaces-master/src/main/java/interactivespaces/master/server/control/MasterFileControl.java
focal_class.identifier: MasterFileControl
focal_class.interfaces: implements DirectoryWatcherListener
focal_class.class_method_signature: MasterFileControl.startup()
focal_class.full_signature: public void startup()
focal_class.identifier: startup
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void startup()
focal_class.class_method_signature: MasterFileControl.shutdown()
focal_class.full_signature: public void shutdown()
focal_class.identifier: shutdown
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void shutdown()
focal_class.class_method_signature: MasterFileControl.onFileAdded(File file)
focal_class.full_signature: @Override public void onFileAdded(File file)
focal_class.identifier: onFileAdded
focal_class.modifiers: @Override public
focal_class.parameters: (File file)
focal_class.return: void
focal_class.signature: void onFileAdded(File file)
focal_class.class_method_signature: MasterFileControl.onFileRemoved(File file)
focal_class.full_signature: @Override public void onFileRemoved(File file)
focal_class.identifier: onFileRemoved
focal_class.modifiers: @Override public
focal_class.parameters: (File file)
focal_class.return: void
focal_class.signature: void onFileRemoved(File file)
focal_class.class_method_signature: MasterFileControl.handleCommand(String command)
focal_class.full_signature:  void handleCommand(String command)
focal_class.identifier: handleCommand
focal_class.parameters: (String command)
focal_class.return: void
focal_class.signature: void handleCommand(String command)
focal_class.class_method_signature: MasterFileControl.calculateActivityHashes()
focal_class.full_signature: private void calculateActivityHashes()
focal_class.identifier: calculateActivityHashes
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void calculateActivityHashes()
focal_class.class_method_signature: MasterFileControl.setSpaceEnvironment(InteractiveSpacesEnvironment spaceEnvironment)
focal_class.full_signature: public void setSpaceEnvironment(InteractiveSpacesEnvironment spaceEnvironment)
focal_class.identifier: setSpaceEnvironment
focal_class.modifiers: public
focal_class.parameters: (InteractiveSpacesEnvironment spaceEnvironment)
focal_class.return: void
focal_class.signature: void setSpaceEnvironment(InteractiveSpacesEnvironment spaceEnvironment)
focal_class.class_method_signature: MasterFileControl.setSpaceSystemControl(InteractiveSpacesSystemControl spaceSystemControl)
focal_class.full_signature: public void setSpaceSystemControl(InteractiveSpacesSystemControl spaceSystemControl)
focal_class.identifier: setSpaceSystemControl
focal_class.modifiers: public
focal_class.parameters: (InteractiveSpacesSystemControl spaceSystemControl)
focal_class.return: void
focal_class.signature: void setSpaceSystemControl(InteractiveSpacesSystemControl spaceSystemControl)
focal_class.class_method_signature: MasterFileControl.setMasterApiSpaceControllerManager(MasterApiSpaceControllerManager masterApiControllerManager)
focal_class.full_signature: public void setMasterApiSpaceControllerManager(MasterApiSpaceControllerManager masterApiControllerManager)
focal_class.identifier: setMasterApiSpaceControllerManager
focal_class.modifiers: public
focal_class.parameters: (MasterApiSpaceControllerManager masterApiControllerManager)
focal_class.return: void
focal_class.signature: void setMasterApiSpaceControllerManager(MasterApiSpaceControllerManager masterApiControllerManager)
focal_class.class_method_signature: MasterFileControl.setMasterApiAutomationManager(MasterApiAutomationManager masterApiAutomationManager)
focal_class.full_signature: public void setMasterApiAutomationManager(MasterApiAutomationManager masterApiAutomationManager)
focal_class.identifier: setMasterApiAutomationManager
focal_class.modifiers: public
focal_class.parameters: (MasterApiAutomationManager masterApiAutomationManager)
focal_class.return: void
focal_class.signature: void setMasterApiAutomationManager(MasterApiAutomationManager masterApiAutomationManager)
focal_class.class_method_signature: MasterFileControl.setActivityRepository(ActivityRepository activityRepository)
focal_class.full_signature: public void setActivityRepository(ActivityRepository activityRepository)
focal_class.identifier: setActivityRepository
focal_class.modifiers: public
focal_class.parameters: (ActivityRepository activityRepository)
focal_class.return: void
focal_class.signature: void setActivityRepository(ActivityRepository activityRepository)
focal_class.class_method_signature: MasterFileControl.setActivityRepositoryManager(ActivityRepositoryManager activityRepositoryManager)
focal_class.full_signature: public void setActivityRepositoryManager(ActivityRepositoryManager activityRepositoryManager)
focal_class.identifier: setActivityRepositoryManager
focal_class.modifiers: public
focal_class.parameters: (ActivityRepositoryManager activityRepositoryManager)
focal_class.return: void
focal_class.signature: void setActivityRepositoryManager(ActivityRepositoryManager activityRepositoryManager)
focal_method.body: void handleCommand(String command) {
      spaceEnvironment.getLog().info(String.format("Master file control received command %s", command));
  
      try {
        if (COMMAND_SHUTDOWN.equalsIgnoreCase(command)) {
          spaceSystemControl.shutdown();
        } else if (COMMAND_CALCULATE_ACTIVITY_HASHES.equalsIgnoreCase(command)) {
          calculateActivityHashes();
        } else if (COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL.equalsIgnoreCase(command)) {
          masterApiSpaceControllerManager.shutdownAllSpaceControllers();
        } else if (COMMAND_SPACE_CONTROLLERS_SHUTDOWN_ALL_ACTIVITIES.equalsIgnoreCase(command)) {
          masterApiSpaceControllerManager.shutdownAllActivitiesAllSpaceControllers();
        } else if (command.startsWith(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_STARTUP)) {
          String id = command.substring(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_STARTUP.length());
  
          masterApiSpaceControllerManager.startupLiveActivityGroup(id);
        } else if (command.startsWith(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_SHUTDOWN)) {
          String id = command.substring(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_SHUTDOWN.length());
  
          masterApiSpaceControllerManager.shutdownLiveActivityGroup(id);
        } else if (command.startsWith(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_ACTIVATE)) {
          String id = command.substring(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_ACTIVATE.length());
  
          masterApiSpaceControllerManager.activateLiveActivityGroup(id);
        } else if (command.startsWith(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_DEACTIVATE)) {
          String id = command.substring(COMMAND_PREFIX_LIVE_ACTIVITY_GROUP_DEACTIVATE.length());
  
          masterApiSpaceControllerManager.deactivateLiveActivityGroup(id);
        } else if (command.startsWith(COMMAND_PREFIX_SPACE_STARTUP)) {
          String id = command.substring(COMMAND_PREFIX_SPACE_STARTUP.length());
  
          masterApiSpaceControllerManager.startupSpace(id);
        } else if (command.startsWith(COMMAND_PREFIX_SPACE_SHUTDOWN)) {
          String id = command.substring(COMMAND_PREFIX_SPACE_SHUTDOWN.length());
  
          masterApiSpaceControllerManager.shutdownSpace(id);
        } else if (command.startsWith(COMMAND_PREFIX_SPACE_ACTIVATE)) {
          String id = command.substring(COMMAND_PREFIX_SPACE_ACTIVATE.length());
  
          masterApiSpaceControllerManager.activateSpace(id);
        } else if (command.startsWith(COMMAND_PREFIX_SPACE_DEACTIVATE)) {
          String id = command.substring(COMMAND_PREFIX_SPACE_DEACTIVATE.length());
  
          masterApiSpaceControllerManager.deactivateSpace(id);
        } else if (command.startsWith(COMMAND_PREFIX_SCRIPT_RUN)) {
          String id = command.substring(COMMAND_PREFIX_SCRIPT_RUN.length());
  
          masterApiAutomationManager.runNamedScript(id);
        } else {
          spaceEnvironment.getLog().warn(String.format("Unknown command to master file control %s", command));
        }
      } catch (Exception e) {
        spaceEnvironment.getLog().error(String.format("Exception while executing master file control %s", command), e);
      }
    }
focal_method.class_method_signature: MasterFileControl.handleCommand(String command)
focal_method.full_signature:  void handleCommand(String command)
focal_method.identifier: handleCommand
focal_method.invocations: info getLog format equalsIgnoreCase shutdown equalsIgnoreCase calculateActivityHashes equalsIgnoreCase shutdownAllSpaceControllers equalsIgnoreCase shutdownAllActivitiesAllSpaceControllers startsWith substring length startupLiveActivityGroup startsWith substring length shutdownLiveActivityGroup startsWith substring length activateLiveActivityGroup startsWith substring length deactivateLiveActivityGroup startsWith substring length startupSpace startsWith substring length shutdownSpace startsWith substring length activateSpace startsWith substring length deactivateSpace startsWith substring length runNamedScript warn getLog format error getLog format
focal_method.parameters: (String command)
focal_method.return: void
focal_method.signature: void handleCommand(String command)