diff options
Diffstat (limited to 'catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java')
-rw-r--r-- | catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java index 7395ed16..ed20c14c 100644 --- a/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java +++ b/catalog-core/catalog-mgr/src/main/java/org/openo/commontosca/catalog/wrapper/PackageWrapperUtil.java @@ -42,6 +42,7 @@ import org.openo.commontosca.catalog.model.externalservice.lifecycle.LifeCycleSe import org.openo.commontosca.catalog.common.ToolUtil;
import org.openo.commontosca.catalog.db.entity.PackageData;
import org.openo.commontosca.catalog.entity.CSARPackage;
+import org.openo.commontosca.catalog.entity.EnumOnboardState;
import org.openo.commontosca.catalog.entity.EnumOperationalState;
import org.openo.commontosca.catalog.entity.EnumUsageState;
import org.openo.commontosca.catalog.entity.response.PackageMeta;
@@ -146,7 +147,7 @@ public class PackageWrapperUtil { packageMeta.setModifyTime(currentTime);
packageMeta.setOperationalState(EnumOperationalState.Disabled);
packageMeta.setUsageState(EnumUsageState.NotInUse);
- packageMeta.setOnBoardState("false");
+ packageMeta.setOnBoardState(EnumOnboardState.nonOnBoarded.getValue());
packageMeta.setProcessState(EnumProcessState.normal);
return packageMeta;
}
@@ -292,6 +293,14 @@ public class PackageWrapperUtil { }
return metas;
}
+
+ public static EnumOnboardState getEnumByValue(String value) {
+ if(value == "non-onBoarded") {
+ return EnumOnboardState.nonOnBoarded;
+ } else {
+ return EnumOnboardState.onBoarded;
+ }
+ }
private static PackageMeta packageData2PackageMeta(PackageData packageData) {
PackageMeta meta = new PackageMeta();
|