* Copyright (C) 2017-2018 AT&T Intellectual Property. All rights
* reserved.
* ================================================================================
+ * Modifications Copyright (c) 2019 Samsung
+ * ================================================================================
* Licensed 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
// Parse the list of base Model Elements and build up the
// ModelElements
modelElementClasses.entrySet().stream().parallel()
- .filter(entry -> (AbstractModelElement.class.isAssignableFrom(entry.getKey())
- && missingTypes.contains(entry.getValue())))
- .forEach(entry -> {
- try {
- modelElements.put(entry.getValue(),
- (entry.getKey().getConstructor(ModelProperties.class, ModelBpmn.class, JsonObject.class)
- .newInstance(this, modelBpmn, modelJson)));
- } catch (InstantiationException | NoSuchMethodException | IllegalAccessException
- | InvocationTargetException e) {
- logger.warn("Unable to instantiate a ModelElement "+ entry.getValue()+", exception follows: ", e);
- }
- });
+ .filter(entry -> (AbstractModelElement.class.isAssignableFrom(entry.getKey())
+ && missingTypes.contains(entry.getValue())))
+ .forEach(entry -> {
+ try {
+ modelElements.put(entry.getValue(),
+ (entry.getKey().getConstructor(ModelBpmn.class, JsonObject.class)
+ .newInstance(modelBpmn, modelJson)));
+ } catch (InstantiationException | NoSuchMethodException | IllegalAccessException
+ | InvocationTargetException e) {
+ logger.warn("Unable to instantiate a ModelElement " + entry.getValue()
+ + ", exception follows: ", e);
+ }
+ });
}
}
/**
* Get the VF for a model. If return null if there is no VF.
*
- * @param model
- * @return
+ * @param model The clds model
+ * @return The vf of the model
*/
public static String getVf(CldsModel model) {
List<String> vfs = null;
}
/**
+ * Get the model name.
* @return the modelName
*/
public String getModelName() {
}
/**
+ * Get the control name.
* @return the controlName
*/
public String getControlName() {
}
/**
+ * Get the control name qnd policy uniqueId.
* @return the controlNameAndPolicyUniqueId
*/
public String getControlNameAndPolicyUniqueId() {
}
/**
+ * Get the current policy name.
* @return the currentPolicyName
*/
private String getCurrentPolicyName() {
}
/**
+ * Get the current policy scope and policy name.
* @return the currentPolicyScopeAndPolicyName
*/
public String getCurrentPolicyScopeAndPolicyName() {
}
/**
+ * Get policy name for dcae deploy.
* @return The policyName that wil be used in input parameters of DCAE deploy
*/
public String getPolicyNameForDcaeDeploy(ClampProperties refProp) {
}
/**
+ * Get policy scope and name with uniqueid.
* @return the policyScopeAndNameWithUniqueId
*/
public String getPolicyScopeAndNameWithUniqueId() {
}
/**
+ * Get policy scope and name with unique guardid.
* @return the policyScopeAndNameWithUniqueId
*/
public String getPolicyScopeAndNameWithUniqueGuardId() {
}
/**
+ * Get current policy scope and full policy name.
* @return the currentPolicyScopeAndFullPolicyName
*/
public String getCurrentPolicyScopeAndFullPolicyName(String policyNamePrefix) {
}
/**
+ * Get policy name with scope context.
* @return the PolicyNameWithScopeContext
*/
public String getPolicyNameWithScopeContext(String policyScope, String policyType, String vnfScope, String context,
}
/**
+ * Get policy name with prefix scope context.
* @return the PolicyNameWithPrefixScopeContext
*/
public String getPolicyNameWithPrefixScopeContext(String policyScope, String policyType, String vnfScope,
/**
* Replace all '-' with '_' within policy scope and name.
*
- * @param inName
- * @return
+ * @param inName policy scope and name
+ * @return policy scope and name with "-" replaced with "_"
*/
private String normalizePolicyScopeName(String inName) {
return inName.replaceAll("-", "_");
}
/**
+ * Get current model element id.
* @return the currentModelElementId
*/
public String getCurrentModelElementId() {
}
/**
+ * Get policy uniqueId.
* @return the policyUniqueId
*/
public String getPolicyUniqueId() {
}
/**
+ * Get actioncd.
* @return the actionCd
*/
public String getActionCd() {
}
/**
+ * Get the testOnly flag value.
* @return the testOnly
*/
public boolean isTestOnly() {
}
/**
+ * Get the global value.
* @return the global
*/
public Global getGlobal() {
return global;
}
+ /**
+ * Registers model element.
+ *
+ * @param modelElementClass model element class
+ * @param type model element type
+ */
public static final synchronized void registerModelElement(Class<? extends AbstractModelElement> modelElementClass,
String type) {
if (!modelElementClasses.containsKey(modelElementClass.getClass())) {