/*-
* ============LICENSE_START=======================================================
- * openECOMP : APP-C
+ * APPC
* ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights
- * reserved.
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Amdocs
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============LICENSE_END=========================================================
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
*/
package org.openecomp.appc.executor.impl;
+import org.openecomp.appc.domainmodel.lcm.RuntimeContext;
import org.openecomp.appc.domainmodel.lcm.VNFOperation;
import org.openecomp.appc.lifecyclemanager.LifecycleManager;
import org.openecomp.appc.requesthandler.RequestHandler;
public class CommandTaskFactory {
-
-// private LCMCommandTask lcmCommandTask;
-// private LCMReadonlyCommandTask LCMReadonlyCommandTask;
-
private RequestHandler requestHandler;
private WorkFlowManager workflowManager;
private LifecycleManager lifecyclemanager;
}
- public synchronized CommandTask getExecutionTask(String action){
- if (VNFOperation.Sync.toString().equals(action) || VNFOperation.Audit.toString().equals(action)){
- return new LCMReadonlyCommandTask(requestHandler,workflowManager);
+ public synchronized CommandTask getExecutionTask(String action, RuntimeContext commandRequest){
+ if (VNFOperation.Sync.toString().equals(action) || VNFOperation.Audit.toString().equals(action) || VNFOperation.ConfigBackup.toString().equals(action) ||
+ VNFOperation.ConfigBackupDelete.toString().equals(action) || VNFOperation.ConfigExport.toString().equals(action)){
+ return new LCMReadonlyCommandTask(commandRequest, requestHandler,workflowManager);
}else {
- return new LCMCommandTask(requestHandler,workflowManager,
+ return new LCMCommandTask(commandRequest, requestHandler,workflowManager,
lifecyclemanager);
}
}