Пример #1
0
 /**
  * Provides basic un-deployment behavior, whereby state of deployed definitions is not dealt with.
  */
 protected void basicUndeploy(String name) {
   D definition = getDefinitionRepository().findOne(name);
   if (definition == null) {
     throwNoSuchDefinitionException(name);
   }
   List<ModuleDeploymentRequest> requests = parse(name, definition.getDefinition());
   for (ModuleDeploymentRequest request : requests) {
     request.setRemove(true);
   }
   Collections.reverse(requests);
   sendDeploymentRequests(name, requests);
 }
Пример #2
0
  /**
   * Provides basic deployment behavior, whereby running state of deployed definitions is not
   * persisted.
   *
   * @return the definition object for the given name
   * @throws NoSuchDefinitionException if there is no definition by the given name
   */
  protected D basicDeploy(String name) {
    Assert.hasText(name, "name cannot be blank or null");
    final D definition = getDefinitionRepository().findOne(name);

    if (definition == null) {
      throwNoSuchDefinitionException(name);
    }

    final List<ModuleDeploymentRequest> requests = parse(name, definition.getDefinition());
    sendDeploymentRequests(name, requests);
    return definition;
  }