Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   * 
   * Licensed under the Apache License, Version 2.0 (the "License"). You may not
   * use this file except in compliance with the License. A copy of the License is
   * located at
   * 
   * http://aws.amazon.com/apache2.0
   * 
  * or in the "license" file accompanying this file. This file is distributed on
  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.simpleworkflow.flow.junit.spring;
 
 import java.util.Map;
 
 
 
     private final TestGenericWorkflowClient genericClient;
     
          = new TestGenericWorkflowClient();
 
             @Override
             protected POJOWorkflowImplementationFactory getImplementationFactory(Class<?> workflowImplementationType,
                     Class<?> workflowIntefaceWorkflowType workflowType) {
                 final Object instanceProxy = .get(workflowImplementationType);
                 if (instanceProxy == null) {
                     throw new IllegalArgumentException("unknown workflowImplementationType: " + workflowImplementationType);
                 }
                 return new POJOWorkflowImplementationFactory() {
 
                     @Override
                     public Object newInstance(DecisionContext decisionContextthrows Exception {
                         WorkflowScope.setDecisionContext(decisionContext);
                         return instanceProxy;
                     }
 
                     @Override
                     public void deleteInstance(Object instance) {
                         WorkflowScope.removeDecisionContext();
                     }
                 };
             }
         });
     }
 
     private final Map<Class<?>, ObjectworkflowImplementations = new HashMap<Class<?>, Object>();
 
     public void setWorkflowImplementations(Iterable<ObjectworkflowImplementations)
             throws InstantiationExceptionIllegalAccessException {
         for (Object workflowImplementation : workflowImplementations) {
             addWorkflowImplementation(workflowImplementation);
         }
     }
 
         return .values();
     }
 
     public void addWorkflowImplementation(Object workflowImplementationthrows InstantiationExceptionIllegalAccessException {
         Class<? extends ObjectimplementationClass = workflowImplementation.getClass();
         .put(implementationClassworkflowImplementation);
         getFactoryFactory().addWorkflowImplementationType(implementationClass);
     }
 
     }
 
         return .getDecisionContextProvider();
     }
 
     public void setDecisionContextProvider(DecisionContextProvider decisionContextProvider) {
         .setDecisionContextProvider(decisionContextProvider);
     }
 
        return .startChildWorkflow(parameters);
    }
    public Promise<StringstartChildWorkflow(String workflowString versionString input) {
        return .startChildWorkflow(workflowversioninput);
    }
    public Promise<StringstartChildWorkflow(String workflowString versionPromise<Stringinput) {
        return .startChildWorkflow(workflowversioninput);
    }
        return .signalWorkflowExecution(signalParameters);
    }
    public void requestCancelWorkflowExecution(WorkflowExecution execution) {
    }
    public String getWorkflowState(WorkflowExecution executionthrows WorkflowException {
        return .getWorkflowState(execution);
    }
        .continueAsNewOnCompletion(parameters);
    }
    public String generateUniqueId() {
        return .generateUniqueId();
    }
    public DataConverter getDataConverter() {
        return getFactoryFactory().getDataConverter();
    }
    public void setDataConverter(DataConverter converter) {
        getFactoryFactory().setDataConverter(converter);
    }
    }
    
New to GrepCode? Check out our FAQ X