-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
/* | ||
* Copyright (c) 2023, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License 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 org.wso2.carbon.apimgt.impl.dto; | ||
|
||
import com.google.gson.JsonObject; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
/** | ||
* Workflow configurations DTO | ||
*/ | ||
public class WorkflowConfigDTO { | ||
|
||
private final Map<String, WorkflowConfig> workflowConfigMap; | ||
|
||
public WorkflowConfigDTO() { | ||
workflowConfigMap = new HashMap<>(); | ||
} | ||
|
||
public void addWorkflowConfig(String workflowName, boolean enabled, String className, JsonObject properties) { | ||
WorkflowConfig workflowConfig = new WorkflowConfig(enabled, className, properties); | ||
workflowConfigMap.put(workflowName, workflowConfig); | ||
} | ||
|
||
public Map<String, WorkflowConfig> getWorkflowConfigMap() { | ||
return workflowConfigMap; | ||
} | ||
|
||
|
||
public static class WorkflowConfig { | ||
private boolean enabled; | ||
private String className; | ||
private JsonObject properties; | ||
|
||
private WorkflowConfig(boolean enabled, String className, JsonObject properties) { | ||
|
||
this.enabled = enabled; | ||
this.className = className; | ||
this.properties = properties; | ||
} | ||
|
||
public boolean isEnabled() { | ||
|
||
return enabled; | ||
} | ||
|
||
public void setEnabled(boolean enabled) { | ||
|
||
this.enabled = enabled; | ||
} | ||
Check warning on line 67 in components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dto/WorkflowConfigDTO.java Codecov / codecov/patchcomponents/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dto/WorkflowConfigDTO.java#L66-L67
|
||
|
||
public String getClassName() { | ||
|
||
return className; | ||
} | ||
|
||
public void setClassName(String className) { | ||
|
||
this.className = className; | ||
} | ||
Check warning on line 77 in components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dto/WorkflowConfigDTO.java Codecov / codecov/patchcomponents/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dto/WorkflowConfigDTO.java#L76-L77
|
||
|
||
public JsonObject getProperties() { | ||
|
||
return properties; | ||
} | ||
|
||
public void setProperties(JsonObject properties) { | ||
|
||
this.properties = properties; | ||
} | ||
Check warning on line 87 in components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dto/WorkflowConfigDTO.java Codecov / codecov/patchcomponents/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dto/WorkflowConfigDTO.java#L86-L87
|
||
} | ||
|
||
|
||
} |