Fix the issues found by check style.
Issue-ID: CLAMP-328
Change-Id: I709bbad46fd35d04174af5f85f314e05dce6929f
Signed-off-by: xg353y <xg353y@intl.att.com>
this.alarmConditionKey = alarmConditionKey;
}
- public String getEventName() {
- return eventName;
- }
+ public String getEventName() {
+ return eventName;
+ }
- public void setEventName(String eventName) {
- this.eventName = eventName;
- }
+ public void setEventName(String eventName) {
+ this.eventName = eventName;
+ }
}
private String serviceId;
private InputStream cldsDataInstream;
+ /**
+ * Constructor.
+ * @param cldsServiceData The cles service data
+ * @throws IOException IO Exception
+ */
public CldsDbServiceCache(CldsServiceData cldsServiceData) throws IOException {
setCldsDataInstream(cldsServiceData);
setInvariantId(cldsServiceData.getServiceInvariantUUID());
private List<CldsDictionaryItem> cldsDictionaryItems = new ArrayList<>();
/**
- * Creates or updates dictionary item for a dictionary in DB
+ * Creates or updates dictionary item for a dictionary in DB.
*
- * @param dictionaryName
- * @param cldsDao
- * @param userId
+ * @param dictionaryName The dictionary name
+ * @param cldsDao The CldsDao
+ * @param userId The user ID
*/
public void save(String dictionaryName, CldsDao cldsDao, String userId) {
List<CldsDictionary> list = cldsDao.getDictionary(this.getDictionaryId(), dictionaryName);
}
/**
+ * Get the dictionary ID.
* @return the dictionaryId
*/
public String getDictionaryId() {
}
/**
+ * Set the dictionary Id.
* @param dictionaryId
* the dictionaryId to set
*/
}
/**
+ * Get the dictionary name.
* @return the dictionaryName
*/
public String getDictionaryName() {
}
/**
+ * Set the dictionary name.
* @param dictionaryName
* the dictionaryName to set
*/
}
/**
+ * Get the createdBy info.
* @return the createdBy
*/
public String getCreatedBy() {
}
/**
+ * Set the createdBy info.
* @param createdBy
* the createdBy to set
*/
}
/**
+ * Get the updatedBy info.
* @return the updatedBy
*/
public String getUpdatedBy() {
}
/**
+ * Set the updatedBy info.
* @param updatedby
* the updatedBy to set
*/
}
/**
+ * Get the last updated date.
* @return the lastUpdatedDate
*/
public String getLastUpdatedDate() {
}
/**
+ * Set the last updated date.
* @param lastUpdatedDate
* the lastUpdatedDate to set
*/
}
/**
+ * Get all the dictionary items.
* @return the cldsDictionaryItems
*/
public List<CldsDictionaryItem> getCldsDictionaryItems() {
}
/**
+ * Set the whole dictionary items.
* @param cldsDictionaryItems
* the cldsDictionaryItems to set
*/
private String updatedBy;
private String lastUpdatedDate;
+ /**
+ * Save the dictionary item.
+ * @param dictionaryName The name of the dictionary
+ * @param cldsDao The cldsDao
+ * @param userId The user id
+ */
public void save(String dictionaryName, CldsDao cldsDao, String userId) {
// Check if dictionary exists.
List<CldsDictionary> list = cldsDao.getDictionary(this.getDictionaryId(), dictionaryName);
}
/**
+ * Get the dictionary element id.
* @return the dictElementId
*/
public String getDictElementId() {
}
/**
+ * Set the dictionary element id.
* @param dictElementId
* the dictElementId to set
*/
}
/**
+ * Get the dictionary id.
* @return the dictionaryId
*/
public String getDictionaryId() {
}
/**
+ * Set the dictionary id.
* @param dictionaryId
* the dictionaryId to set
*/
}
/**
+ * Get the dictionary name.
* @return the dictElementName
*/
public String getDictElementName() {
}
/**
+ * Set the dictionary name.
* @param dictElementName
* the dictElementName to set
*/
}
/**
+ * Get the dictionary element short name.
* @return the dictElementShortName
*/
public String getDictElementShortName() {
}
/**
+ * Set the dictionary element short name.
* @param dictElementShortName
* the dictElementShortName to set
*/
}
/**
+ * Get the dictionary element description.
* @return the dictElementDesc
*/
public String getDictElementDesc() {
}
/**
+ * Set the dictionary element description.
* @param dictElementDesc
* the dictElementDesc to set
*/
}
/**
+ * Get the dictionary element type.
* @return the dictElementType
*/
public String getDictElementType() {
}
/**
+ * Set the dictionary element type.
* @param dictElementType
* the dictElementType to set
*/
}
/**
+ * Get the createdBy info.
* @return the createdBy
*/
public String getCreatedBy() {
}
/**
+ * Set the createdBy info.
* @param createdBy
* the createdBy to set
*/
}
/**
+ * Get the updatedBy info.
* @return the updatedBy
*/
public String getUpdatedBy() {
}
/**
+ * Set the updatedBy info.
* @param updatedby
* the updatedBy to set
*/
}
/**
+ * Get the last updated date.
* @return the lastUpdatedDate
*/
public String getLastUpdatedDate() {
}
/**
+ * Set the last updated date.
* @param lastUpdatedDate
* the lastUpdatedDate to set
*/
private static final long serialVersionUID = -9153372664377279423L;
protected static final EELFLogger logger = EELFManager.getInstance().getLogger(CldsServiceData.class);
protected static final EELFLogger auditLogger = EELFManager.getInstance().getAuditLogger();
- private String serviceInvariantUUID;
- private String serviceUUID;
+ private String serviceInvariantUuid;
+ private String serviceUiod;
private Long ageOfRecord;
private List<CldsVfData> cldsVfs;
public String getServiceInvariantUUID() {
- return serviceInvariantUUID;
+ return serviceInvariantUuid;
}
- public void setServiceInvariantUUID(String serviceInvariantUUID) {
- this.serviceInvariantUUID = serviceInvariantUUID;
+ public void setServiceInvariantUUID(String serviceInvariantUuid) {
+ this.serviceInvariantUuid = serviceInvariantUuid;
}
public List<CldsVfData> getCldsVfs() {
}
public String getServiceUUID() {
- return serviceUUID;
+ return serviceUiod;
}
- public void setServiceUUID(String serviceUUID) {
- this.serviceUUID = serviceUUID;
+ public void setServiceUUID(String serviceUuid) {
+ this.serviceUiod = serviceUuid;
}
public Long getAgeOfRecord() {
* Filter out any VFs that the user is not authorized for. Use the
* CldsService to determine if the user is authorized for a VF.
*
- * @param svc
+ * @param svc The clds service
*/
public void filterVfs(CldsService svc) {
List<CldsVfData> filteredCldsVfs = new ArrayList<>();
public static final String STATUS_ACTIVE = "ACTIVE";
public static final String STATUS_STOPPED = "STOPPED";
public static final String STATUS_DELETING = "DELETING";
- public static final String STATUS_ERROR = "ERROR"; // manual
- // intervention
- // required
+ // manual intervention required
+ public static final String STATUS_ERROR = "ERROR";
public static final String STATUS_UNKNOWN = "UNKNOWN";
private String id;
/**
* Save template to DB.
*
- * @param cldsDao
- * @param userid
+ * @param cldsDao The cldsDao
+ * @param userid The user Id
*/
public void save(CldsDao cldsDao, String userid) {
cldsDao.setTemplate(this, userid);
/**
* Retrieve from DB.
*
- * @param cldsDao
- * @param name
+ * @param cldsDao The cldsDao
+ * @param name The template name to retrieve
+ * @param okIfNotFound
+ * The flag indicating whether exception will be returned in case nothing is found
* @return
*/
public static CldsTemplate retrieve(CldsDao cldsDao, String name, boolean okIfNotFound) {
private String toscaModelName;
/**
- * Construct
+ * Construct.
*/
- public CldsToscaModel () {
+ public CldsToscaModel() {
}
/**
- * Creates or updates Tosca Model to DB
+ * Creates or updates Tosca Model to DB.
*
- * @param cldsDao
- * @param userId
+ * @param cldsDao The cldsDao
+ * @param userId The user Id
*/
public CldsToscaModel save(CldsDao cldsDao, ClampProperties refProp, PolicyClient policyClient, String userId) {
CldsToscaModel cldsToscaModel = null;
}
/**
+ * Get the Id.
* @return the id
*/
public String getId() {
}
/**
+ * Set the id.
* @param id
* the id to set
*/
}
/**
+ * Get the policy type.
* @return the policyType
*/
public String getPolicyType() {
}
/**
+ * Set the policy type.
* @param policyType
* the policyType to set
*/
}
/**
+ * Get the tosca model name.
* @return the toscaModelName
*/
public String getToscaModelName() {
}
/**
+ * Set the tosca model name.
* @param toscaModelName
* the toscaModelName to set
*/
private String lastUpdatedDate;
/**
+ * Get the id.
* @return the id
*/
public String getId() {
}
/**
+ * Set the id.
* @param id
* the id to set
*/
}
/**
+ * Get the tosca model name.
* @return the toscaModelName
*/
public String getToscaModelName() {
}
/**
+ * Set the tosca model name.
* @param toscaModelName
* the toscaModelName to set
*/
}
/**
+ * Get the policy type.
* @return the policyType
*/
public String getPolicyType() {
}
/**
+ * Set the policy type.
* @param policyType
* the policyType to set
*/
}
/**
+ * Get the list of tosca model revisions.
* @return the toscaModelRevisions
*/
public List<CldsToscaModelRevision> getToscaModelRevisions() {
}
/**
+ * Set the list of tosca model revisions.
* @param toscaModelRevisions
* the toscaModelRevisions to set
*/
}
/**
+ * Get the user id.
* @return the userId
*/
public String getUserId() {
}
/**
+ * Set the user id.
* @param userId
* the userId to set
*/
}
/**
+ * Get the last updated date.
* @return the lastUpdatedDate
*/
public String getLastUpdatedDate() {
}
/**
+ * Set the last updated date.
* @param lastUpdatedDate
* the lastUpdatedDate to set
*/
* Represents a CLDS Tosca model revision
*
*/
+
package org.onap.clamp.clds.model;
public class CldsToscaModelRevision {
private String lastUpdatedDate;
/**
+ * Get the revision id.
* @return the revisionId
*/
public String getRevisionId() {
}
/**
+ * Set the revision id.
* @param revisionId
* the revisionId to set
*/
}
/**
+ * Get the tosca model yaml.
* @return the toscaModelYaml
*/
public String getToscaModelYaml() {
}
/**
+ * Set the tosca model yaml.
* @param toscaModelYaml
* the toscaModelYaml to set
*/
}
/**
+ * Get the version.
* @return the version
*/
public double getVersion() {
}
/**
+ * Set the version.
* @param version
* the version to set
*/
}
/**
+ * Get the tosca model json.
* @return the toscaModelJson
*/
public String getToscaModelJson() {
}
/**
+ * Set the tosca model json.
* @param toscaModelJson
* the toscaModelJson to set
*/
}
/**
+ * Get the user id.
* @return the userId
*/
public String getUserId() {
}
/**
+ * Set the user id.
* @param userId
* the userId to set
*/
}
/**
+ * Get the created date.
* @return the createdDate
*/
public String getCreatedDate() {
}
/**
+ * Set the created date.
* @param createdDate
* the createdDate to set
*/
}
/**
+ * Get the last updated date.
* @return the lastUpdatedDate
*/
public String getLastUpdatedDate() {
}
/**
+ * Set the last updated date.
* @param lastUpdatedDate
* the lastUpdatedDate to set
*/
private static final long serialVersionUID = -5069670140274203606L;
private String vfName;
- private String vfInvariantResourceUUID;
+ private String vfInvariantResourceUuid;
private List<CldsVfcData> cldsVfcs;
- private List<CldsVfKPIData> cldsKPIList;
+ private List<CldsVfKPIData> cldsKpiList;
public List<CldsVfKPIData> getCldsKPIList() {
- return cldsKPIList;
+ return cldsKpiList;
}
- public void setCldsKPIList(List<CldsVfKPIData> cldsKPIList) {
- this.cldsKPIList = cldsKPIList;
+ public void setCldsKPIList(List<CldsVfKPIData> cldsKpiList) {
+ this.cldsKpiList = cldsKpiList;
}
public String getVfName() {
}
public String getVfInvariantResourceUUID() {
- return vfInvariantResourceUUID;
+ return vfInvariantResourceUuid;
}
- public void setVfInvariantResourceUUID(String vfInvariantResourceUUID) {
- this.vfInvariantResourceUUID = vfInvariantResourceUUID;
+ public void setVfInvariantResourceUUID(String vfInvariantResourceUuid) {
+ this.vfInvariantResourceUuid = vfInvariantResourceUuid;
}
}
private static final long serialVersionUID = 406993878174183557L;
private String vfcName;
- private String vfcInvariantResourceUUID;
+ private String vfcInvariantResourceUuid;
private List<CldsAlarmCondition> cldsAlarmConditions;
public String getVfcName() {
}
public String getVfcInvariantResourceUUID() {
- return vfcInvariantResourceUUID;
+ return vfcInvariantResourceUuid;
}
- public void setVfcInvariantResourceUUID(String vfcInvariantResourceUUID) {
- this.vfcInvariantResourceUUID = vfcInvariantResourceUUID;
+ public void setVfcInvariantResourceUUID(String vfcInvariantResourceUuid) {
+ this.vfcInvariantResourceUuid = vfcInvariantResourceUuid;
}
}
public static final String ARTIFACT_NAME_SUFFIX = ".yml";
private String event;
- private String serviceUUID;
- private String resourceUUID;
+ private String serviceUuid;
+ private String resourceUuid;
private String artifactName; // controlName.yml
private List<CldsModelInstance> instances;
/**
- * Transform a DCAE Event Action to a CldsEvent.actionCd
+ * Transform a DCAE Event Action to a CldsEvent.actionCd.
*
- * @return
+ * @return The clds action.
*/
public String getCldsActionCd() {
if (event == null || event.length() == 0) {
}
/**
+ * Get the event.
* @return the event
*/
public String getEvent() {
}
/**
+ * Set the event.
* @param event
* the event to set
*/
}
/**
+ * Get the serviceUUID.
* @return the serviceUUID
*/
public String getServiceUUID() {
- return serviceUUID;
+ return serviceUuid;
}
/**
+ * Set the serviceUUID.
* @param serviceUUID
* the serviceUUID to set
*/
- public void setServiceUUID(String serviceUUID) {
- this.serviceUUID = serviceUUID;
+ public void setServiceUUID(String serviceUuid) {
+ this.serviceUuid = serviceUuid;
}
/**
+ * Get the resourceUUID.
* @return the resourceUUID
*/
public String getResourceUUID() {
- return resourceUUID;
+ return resourceUuid;
}
/**
+ * Set the resourceUUID.
* @param resourceUUID
* the resourceUUID to set
*/
- public void setResourceUUID(String resourceUUID) {
- this.resourceUUID = resourceUUID;
+ public void setResourceUUID(String resourceUuid) {
+ this.resourceUuid = resourceUuid;
}
/**
+ * Get the artifact name.
* @return the artifactName
*/
public String getArtifactName() {
}
/**
+ * Set the artifact name.
* @param artifactName
* the artifactName to set
*/
this.artifactName = artifactName;
}
+ /**
+ * Get the list of instances.
+ * @return The list of model instances
+ */
public List<CldsModelInstance> getInstances() {
return instances;
}
+ /**
+ * Set the list of model instances.
+ * @param instances The list of model instances to set
+ */
public void setInstances(List<CldsModelInstance> instances) {
this.instances = instances;
}
/**
* Instantiate using value.
*
- * @param value
+ * @param value The value
*/
public ValueItem(String value) {
this.value = value;
}
/**
+ * Get the value.
* @return the value
*/
public String getValue() {
}
/**
+ * Set the value.
* @param value
* the value to set
*/
private final ModelProperties modelProp;
/**
- * Perform base parsing of properties for a ModelElement (such as, VesCollector, Policy and Tca)
+ * Perform base parsing of properties for a ModelElement (such as, VesCollector, Policy and Tca).
*/
protected AbstractModelElement(String type, ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) {
this.type = type;
}
/**
+ * Get the topic publishes.
* @return the topicPublishes
*/
public String getTopicPublishes() {
/**
+ * Get the id.
* @return the id
*/
public String getId() {
}
/**
+ * Get the isFound flag.
* @return the isFound
*/
public boolean isFound() {
/**
* Parse global json properties.
- * <p>
* Example json:
* "global":[{"name":"service","value":["vUSP"]},{"name":"vnf","value":["vCTS",
* "v3CDB"]},{"name":"location","value":["san_diego","san_antonio","kansas_city"
/**
* Parse global given json node.
*
- * @param modelJson
+ * @param modelJson The model in json format.
*/
public Global(JsonObject modelJson) {
JsonElement globalNode = modelJson.get("global");
}
/**
+ * Get the service.
* @return the service
*/
public String getService() {
}
/**
+ * Set the service.
* @param service
* the service to set
*/
}
/**
+ * Get the action set.
* @return the actionSet
*/
public String getActionSet() {
return actionSet;
}
+ /**
+ * Set tje actionSet.
+ * @param actionSet
+ * The actionSet to set
+ */
public void setActionSet(String actionSet) {
this.actionSet = actionSet;
}
/**
+ * Get the resource vf.
* @return the resourceVf
*/
public List<String> getResourceVf() {
}
/**
+ * Set the resourceVf.
* @param resourceVf
* the resourceVf to set
*/
}
/**
+ * Get the resource Vfc.
* @return the resourceVfc
*/
public List<String> getResourceVfc() {
}
/**
+ * Set tje respirce Vfc.
* @param resourceVfc
* the resourceVfc to set
*/
}
/**
+ * Get the list of locations.
* @return the location
*/
public List<String> getLocation() {
}
/**
+ * Set the list of locations.
* @param location
* the location to set
*/
this.location = location;
}
+ /**
+ * Get the deploy parameters.
+ * @return The deploy parameters
+ */
public JsonObject getDeployParameters() {
return deployParameters;
}
+ /**
+ * Set the deploy parameters.
+ * @param deployParameters
+ * the deploy parameters to set
+ */
public void setDeployParameters(JsonObject deployParameters) {
this.deployParameters = deployParameters;
}
+ /**
+ * Get the vnf scope.
+ * @return The vnf scope
+ */
public String getVnfScope() {
return vnfScope;
}
/**
* Parse Holmes bpmn parameters json properties.
- * <p>
* Example json:
* [{"name":"correlationalLogic","value":"vcwx"},{"name":"configPolicyName","value":"cccc"}]
*
private String configPolicyName;
/**
- * Default constructor for Holmes Element
+ * Default constructor for Holmes Element.
*
* @param modelProp
* The ModelProperties containing the all the info, like bpmn,
* bpmn params, etc ...
- * @param modelBpmn
- * @param modelJson
+ * @param modelBpmn The model bpmn
+ * @param modelJson The model json
*/
public Holmes(ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) {
super(TYPE_HOLMES, modelProp, modelBpmn, modelJson);
/**
* Parse Model BPMN properties.
- * <p>
* Example json: {"policy" :[{"id":"Policy_0oxeocn", "from":"StartEvent_1"}]}
*/
public class ModelBpmn {
private List<String> bpmnElementIds;
/**
- * Create ModelBpmn and populate maps from json
+ * Create ModelBpmn and populate maps from json.
*
- * @param modelBpmnPropText
- * @return
+ * @param modelBpmnPropText The model bpmn properties text
+ * @return The model bpmn
*/
public static ModelBpmn create(String modelBpmnPropText) {
try {
/**
* Add entry to both maps.
*
- * @param entry
+ * @param entry The model bpmn entry.
*/
private void addEntry(ModelBpmnEntry entry) {
addEntry(entriesByType, entry, entry.getType());
/**
* Add an entry to provided map with provided key.
*
- * @param map
- * @param entry
- * @param key
+ * @param map The map to add the model bpmn entry
+ * @param entry The model bmpn entry
+ * @param key The key
*/
private static void addEntry(Map<String, List<ModelBpmnEntry>> map, ModelBpmnEntry entry, String key) {
List<ModelBpmnEntry> list = map.computeIfAbsent(key, k -> new ArrayList<>());
}
/**
+ * Get the id.
* @return the id field given the ModelElement type
*/
public String getId(String type) {
}
/**
+ * Get the form id.
* @return the fromId field given the ModelElement type
*/
public String getFromId(String type) {
}
/**
+ * Get the type.
* @return the ModelElement type given the ModelElement id
*/
public String getType(String id) {
}
/**
+ * Get the bpmn element ids.
* @return list of elementIds from bpmn
*/
public List<String> getBpmnElementIds() {
import com.att.eelf.configuration.EELFManager;
/**
- * Model BPMN property entry
- * <p>
+ * Model BPMN property entry.
* Example json: {"policy":
* [{"id":"Policy_0oxeocn", "from":"StartEvent_1"}]}
*/
* Parse the json so that the "id" and "from" fields can be retrieved on
* demand.
*
- * @param type
- * @param id
- * @param fromId
+ * @param type The type
+ * @param id The id
+ * @param fromId The form id
*/
public ModelBpmnEntry(String type, String id, String fromId) {
this.type = type;
}
/**
+ * Get the type.
* @return the type
*/
public String getType() {
}
/**
+ * Set the type.
* @param type
* the type to set
*/
}
/**
+ * Get the id.
* @return the id
*/
public String getId() {
}
/**
+ * Set the id.
* @param id
* the id to set
*/
}
/**
+ * Get the form id.
* @return the fromId
*/
public String getFromId() {
}
/**
+ * Set the form id.
* @param fromId
* the fromId to set
*/
.newInstance(this, modelBpmn, modelJson)));
} catch (InstantiationException | NoSuchMethodException | IllegalAccessException
| InvocationTargetException e) {
- logger.warn("Unable to instantiate a ModelElement "+ entry.getValue()+", exception follows: ", 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,
}
/**
+ * 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() {
/**
* Parse Policy json properties.
- * <p>
* Example json:
* "Policy_005sny1":[[{"name":"timeout","value":"5"}],{"policyConfigurations":[[
* {"name":"recipe","value":["restart"]},{"name":"maxRetries","value":["3"]},{
/**
* Parse Policy given json node.
*
- * @param modelProp
- * @param modelBpmn
- * @param modelJson
- * @throws IOException
+ * @param modelProp The model properties.
+ * @param modelBpmn The model bpmn
+ * @param modelJson The model json
+ * @throws IOException The IO Exception
*/
public Policy(ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) throws IOException {
super(TYPE_POLICY, modelProp, modelBpmn, modelJson);
}
/**
+ * Get the policy chains.
* @return the policyChains
*/
public List<PolicyChain> getPolicyChains() {
/**
* Parse Policy json properties.
- *
* Example json:
* {"Policy_1e33tn8":{"PolicyTest1":[{"name":"pname","value":"PolicyTest1"},{
* "name":"pid","value":"1"},{"name":"timeout","value":"345"},{
private List<PolicyItem> policyItems;
private String policyType;
+ /**
+ * Constructor.
+ * @param node The policy element in JsonElement format
+ * @throws IOException The IO Exception
+ */
public PolicyChain(JsonElement node) throws IOException {
if (node != null && node.isJsonArray() && node.getAsJsonArray().size() > 0) {
- JsonArray operationalPolicyParameters = node.getAsJsonArray();
policyId = JsonUtils.getStringValueByName(node, "pid");
timeout = JsonUtils.getIntValueByName(node, "timeout");
policyType = JsonUtils.getStringValueByName(node, "policyType");
+ JsonArray operationalPolicyParameters = node.getAsJsonArray();
JsonArray policyConfigurations = operationalPolicyParameters.get(operationalPolicyParameters.size() - 1)
.getAsJsonObject()
}
}
/**
+ * Get the policy Id.
* @return the policyId
*/
public String getPolicyId() {
}
/**
+ * Get the time out.
* @return the timeout
*/
public Integer getTimeout() {
}
/**
+ * Get the policy items.
* @return the policyItems
*/
public List<PolicyItem> getPolicyItems() {
}
/**
+ * Get the policy type.
* @return the policyType
*/
public String getPolicyType() {
/**
* Parse policyConfigurations from Policy json properties.
- * <p>
* Example json:
* "Policy_005sny1":[[{"name":"timeout","value":"5"}],{"policyConfigurations":[[
* {"name":"recipe","value":["restart"]},{"name":"maxRetries","value":["3"]},{
}
/**
+ * Get the id.
* @return the id
*/
public String getId() {
}
/**
+ * Get the recipe.
* @return the recipe
*/
public String getRecipe() {
}
/**
- * @set the id
+ * Set the id.
+ * @param the id
*/
public void setId(String id) {
this.id = id;
}
/**
- * @set the recipe
+ * Set the recipe.
+ * @param the recipe
*/
public void setRecipe(String recipe) {
this.recipe = recipe;
}
/**
- * @set the parentPolicy
+ * Set the parent policy.
+ * @param the parentPolicy
*/
public void setParentPolicy(String parentPolicy) {
this.parentPolicy = parentPolicy;
}
/**
- * @set the maxRetries
+ * Set the max retries.
+ * @param the maxRetries
*/
public void setMaxRetries(int maxRetries) {
this.maxRetries = maxRetries;
}
/**
- * @set the retryTimeLimit
+ * Set the retry time limit.
+ * @param the retryTimeLimit
*/
public void setRetryTimeLimit(int retryTimeLimit) {
this.retryTimeLimit = retryTimeLimit;
}
/**
- * @set the parentPolicyConditions
+ * Set the parent policy conditions.
+ * @param the parentPolicyConditions
*/
public void setParentPolicyConditions(List<String> parentPolicyConditions) {
this.parentPolicyConditions = parentPolicyConditions;
}
/**
+ * Get the max retires.
* @return the maxRetries
*/
public int getMaxRetries() {
}
/**
+ * Get the retry time limit.
* @return the retryTimeLimit
*/
public int getRetryTimeLimit() {
}
/**
+ * Get the parent policy.
* @return the parentPolicy
*/
public String getParentPolicy() {
}
/**
+ * Get the list of parent policy conditions.
* @return the parentPolicyConditions
*/
public List<String> getParentPolicyConditions() {
}
/**
+ * Get the actor.
* @return the actor
*/
public String getActor() {
}
/**
- * @set the actor
+ * Set the actor.
+ * @param the actor
*/
public void setActor(String actor) {
this.actor = actor;
return recipePayload;
}
+ /**
+ * Get oap rop.
+ * @return The oap rop?
+ */
public String getOapRop() {
if (oapRop == null) {
oapRop = "0m";
return oapRop;
}
+ /**
+ * Get oap limit.
+ * @return the oap limit
+ */
public String getOapLimit() {
if (oapLimit == null) {
oapLimit = "0";
private static final String TYPE_TCA = "tca";
/**
- * Parse Tca given json node
+ * Parse Tca given json node.
*
- * @param modelProp
- * @param modelBpmn
- * @param modelJson
+ * @param modelProp The model properties
+ * @param modelBpmn The model bpmn
+ * @param modelJson The model json
*/
public Tca(ModelProperties modelProp, ModelBpmn modelBpmn, JsonObject modelJson) {
super(TYPE_TCA, modelProp, modelBpmn, modelJson);
private List<TcaThreshold> tcaThresholds;
/**
- * Parse Tca Item given json node
+ * Parse Tca Item given json node.
*
- * @param tcaJson
+ * @param tcaJson The tac json
*/
public TcaItem(JsonElement tcaJson) {
private String closedLoopEventStatus;
/**
- * Parse Tca Threshhold given json node
+ * Parse Tca Threshhold given json node.
*
- * @param tcaTresholdConfiguration
+ * @param tcaTresholdConfiguration The tca threshold in JsonArray format
*/
public TcaThreshold(JsonArray tcaTresholdConfiguration) {