diff options
Diffstat (limited to 'src/main')
25 files changed, 275 insertions, 100 deletions
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsAlarmCondition.java b/src/main/java/org/onap/clamp/clds/model/CldsAlarmCondition.java index 0f2c4f123..114d7858a 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsAlarmCondition.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsAlarmCondition.java @@ -57,12 +57,12 @@ public class CldsAlarmCondition implements Serializable { 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; + } } diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDbServiceCache.java b/src/main/java/org/onap/clamp/clds/model/CldsDbServiceCache.java index cfac654e8..140d6e8cc 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsDbServiceCache.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsDbServiceCache.java @@ -35,6 +35,11 @@ public class CldsDbServiceCache { 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()); diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java b/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java index 73f959008..40e547a9c 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java @@ -42,11 +42,11 @@ public class CldsDictionary { 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); @@ -69,6 +69,7 @@ public class CldsDictionary { } /** + * Get the dictionary ID. * @return the dictionaryId */ public String getDictionaryId() { @@ -76,6 +77,7 @@ public class CldsDictionary { } /** + * Set the dictionary Id. * @param dictionaryId * the dictionaryId to set */ @@ -84,6 +86,7 @@ public class CldsDictionary { } /** + * Get the dictionary name. * @return the dictionaryName */ public String getDictionaryName() { @@ -91,6 +94,7 @@ public class CldsDictionary { } /** + * Set the dictionary name. * @param dictionaryName * the dictionaryName to set */ @@ -99,6 +103,7 @@ public class CldsDictionary { } /** + * Get the createdBy info. * @return the createdBy */ public String getCreatedBy() { @@ -106,6 +111,7 @@ public class CldsDictionary { } /** + * Set the createdBy info. * @param createdBy * the createdBy to set */ @@ -114,6 +120,7 @@ public class CldsDictionary { } /** + * Get the updatedBy info. * @return the updatedBy */ public String getUpdatedBy() { @@ -121,6 +128,7 @@ public class CldsDictionary { } /** + * Set the updatedBy info. * @param updatedby * the updatedBy to set */ @@ -129,6 +137,7 @@ public class CldsDictionary { } /** + * Get the last updated date. * @return the lastUpdatedDate */ public String getLastUpdatedDate() { @@ -136,6 +145,7 @@ public class CldsDictionary { } /** + * Set the last updated date. * @param lastUpdatedDate * the lastUpdatedDate to set */ @@ -144,6 +154,7 @@ public class CldsDictionary { } /** + * Get all the dictionary items. * @return the cldsDictionaryItems */ public List<CldsDictionaryItem> getCldsDictionaryItems() { @@ -151,6 +162,7 @@ public class CldsDictionary { } /** + * Set the whole dictionary items. * @param cldsDictionaryItems * the cldsDictionaryItems to set */ diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java b/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java index cb051b810..871fe9037 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java @@ -42,6 +42,12 @@ public class CldsDictionaryItem { 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); @@ -64,6 +70,7 @@ public class CldsDictionaryItem { } /** + * Get the dictionary element id. * @return the dictElementId */ public String getDictElementId() { @@ -71,6 +78,7 @@ public class CldsDictionaryItem { } /** + * Set the dictionary element id. * @param dictElementId * the dictElementId to set */ @@ -79,6 +87,7 @@ public class CldsDictionaryItem { } /** + * Get the dictionary id. * @return the dictionaryId */ public String getDictionaryId() { @@ -86,6 +95,7 @@ public class CldsDictionaryItem { } /** + * Set the dictionary id. * @param dictionaryId * the dictionaryId to set */ @@ -94,6 +104,7 @@ public class CldsDictionaryItem { } /** + * Get the dictionary name. * @return the dictElementName */ public String getDictElementName() { @@ -101,6 +112,7 @@ public class CldsDictionaryItem { } /** + * Set the dictionary name. * @param dictElementName * the dictElementName to set */ @@ -109,6 +121,7 @@ public class CldsDictionaryItem { } /** + * Get the dictionary element short name. * @return the dictElementShortName */ public String getDictElementShortName() { @@ -116,6 +129,7 @@ public class CldsDictionaryItem { } /** + * Set the dictionary element short name. * @param dictElementShortName * the dictElementShortName to set */ @@ -124,6 +138,7 @@ public class CldsDictionaryItem { } /** + * Get the dictionary element description. * @return the dictElementDesc */ public String getDictElementDesc() { @@ -131,6 +146,7 @@ public class CldsDictionaryItem { } /** + * Set the dictionary element description. * @param dictElementDesc * the dictElementDesc to set */ @@ -139,6 +155,7 @@ public class CldsDictionaryItem { } /** + * Get the dictionary element type. * @return the dictElementType */ public String getDictElementType() { @@ -146,6 +163,7 @@ public class CldsDictionaryItem { } /** + * Set the dictionary element type. * @param dictElementType * the dictElementType to set */ @@ -154,6 +172,7 @@ public class CldsDictionaryItem { } /** + * Get the createdBy info. * @return the createdBy */ public String getCreatedBy() { @@ -161,6 +180,7 @@ public class CldsDictionaryItem { } /** + * Set the createdBy info. * @param createdBy * the createdBy to set */ @@ -169,6 +189,7 @@ public class CldsDictionaryItem { } /** + * Get the updatedBy info. * @return the updatedBy */ public String getUpdatedBy() { @@ -176,6 +197,7 @@ public class CldsDictionaryItem { } /** + * Set the updatedBy info. * @param updatedby * the updatedBy to set */ @@ -184,6 +206,7 @@ public class CldsDictionaryItem { } /** + * Get the last updated date. * @return the lastUpdatedDate */ public String getLastUpdatedDate() { @@ -191,6 +214,7 @@ public class CldsDictionaryItem { } /** + * Set the last updated date. * @param lastUpdatedDate * the lastUpdatedDate to set */ diff --git a/src/main/java/org/onap/clamp/clds/model/CldsServiceData.java b/src/main/java/org/onap/clamp/clds/model/CldsServiceData.java index 3b5dd1193..45194deca 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsServiceData.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsServiceData.java @@ -39,17 +39,17 @@ public class CldsServiceData implements Serializable { 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() { @@ -61,11 +61,11 @@ public class CldsServiceData implements Serializable { } 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() { @@ -80,7 +80,7 @@ public class CldsServiceData implements Serializable { * 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<>(); diff --git a/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java b/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java index 5aa9b1f72..8f66204bb 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsTemplate.java @@ -36,9 +36,8 @@ public class CldsTemplate { 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; @@ -60,8 +59,8 @@ public class CldsTemplate { /** * 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); @@ -70,8 +69,10 @@ public class CldsTemplate { /** * 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) { diff --git a/src/main/java/org/onap/clamp/clds/model/CldsToscaModel.java b/src/main/java/org/onap/clamp/clds/model/CldsToscaModel.java index 6184b3946..961e1e328 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsToscaModel.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsToscaModel.java @@ -38,16 +38,16 @@ public class CldsToscaModel extends CldsToscaModelRevision { 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; @@ -84,6 +84,7 @@ public class CldsToscaModel extends CldsToscaModelRevision { } /** + * Get the Id. * @return the id */ public String getId() { @@ -91,6 +92,7 @@ public class CldsToscaModel extends CldsToscaModelRevision { } /** + * Set the id. * @param id * the id to set */ @@ -99,6 +101,7 @@ public class CldsToscaModel extends CldsToscaModelRevision { } /** + * Get the policy type. * @return the policyType */ public String getPolicyType() { @@ -106,6 +109,7 @@ public class CldsToscaModel extends CldsToscaModelRevision { } /** + * Set the policy type. * @param policyType * the policyType to set */ @@ -114,6 +118,7 @@ public class CldsToscaModel extends CldsToscaModelRevision { } /** + * Get the tosca model name. * @return the toscaModelName */ public String getToscaModelName() { @@ -121,6 +126,7 @@ public class CldsToscaModel extends CldsToscaModelRevision { } /** + * Set the tosca model name. * @param toscaModelName * the toscaModelName to set */ diff --git a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java index 5c6f4aa5d..a4ee734c7 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelDetails.java @@ -40,6 +40,7 @@ public class CldsToscaModelDetails { private String lastUpdatedDate; /** + * Get the id. * @return the id */ public String getId() { @@ -47,6 +48,7 @@ public class CldsToscaModelDetails { } /** + * Set the id. * @param id * the id to set */ @@ -55,6 +57,7 @@ public class CldsToscaModelDetails { } /** + * Get the tosca model name. * @return the toscaModelName */ public String getToscaModelName() { @@ -62,6 +65,7 @@ public class CldsToscaModelDetails { } /** + * Set the tosca model name. * @param toscaModelName * the toscaModelName to set */ @@ -70,6 +74,7 @@ public class CldsToscaModelDetails { } /** + * Get the policy type. * @return the policyType */ public String getPolicyType() { @@ -77,6 +82,7 @@ public class CldsToscaModelDetails { } /** + * Set the policy type. * @param policyType * the policyType to set */ @@ -85,6 +91,7 @@ public class CldsToscaModelDetails { } /** + * Get the list of tosca model revisions. * @return the toscaModelRevisions */ public List<CldsToscaModelRevision> getToscaModelRevisions() { @@ -92,6 +99,7 @@ public class CldsToscaModelDetails { } /** + * Set the list of tosca model revisions. * @param toscaModelRevisions * the toscaModelRevisions to set */ @@ -100,6 +108,7 @@ public class CldsToscaModelDetails { } /** + * Get the user id. * @return the userId */ public String getUserId() { @@ -107,6 +116,7 @@ public class CldsToscaModelDetails { } /** + * Set the user id. * @param userId * the userId to set */ @@ -115,6 +125,7 @@ public class CldsToscaModelDetails { } /** + * Get the last updated date. * @return the lastUpdatedDate */ public String getLastUpdatedDate() { @@ -122,6 +133,7 @@ public class CldsToscaModelDetails { } /** + * Set the last updated date. * @param lastUpdatedDate * the lastUpdatedDate to set */ diff --git a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java index bfb0536ec..68cd49652 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsToscaModelRevision.java @@ -25,6 +25,7 @@ * Represents a CLDS Tosca model revision * */ + package org.onap.clamp.clds.model; public class CldsToscaModelRevision { @@ -38,6 +39,7 @@ public class CldsToscaModelRevision { private String lastUpdatedDate; /** + * Get the revision id. * @return the revisionId */ public String getRevisionId() { @@ -45,6 +47,7 @@ public class CldsToscaModelRevision { } /** + * Set the revision id. * @param revisionId * the revisionId to set */ @@ -53,6 +56,7 @@ public class CldsToscaModelRevision { } /** + * Get the tosca model yaml. * @return the toscaModelYaml */ public String getToscaModelYaml() { @@ -60,6 +64,7 @@ public class CldsToscaModelRevision { } /** + * Set the tosca model yaml. * @param toscaModelYaml * the toscaModelYaml to set */ @@ -68,6 +73,7 @@ public class CldsToscaModelRevision { } /** + * Get the version. * @return the version */ public double getVersion() { @@ -75,6 +81,7 @@ public class CldsToscaModelRevision { } /** + * Set the version. * @param version * the version to set */ @@ -83,6 +90,7 @@ public class CldsToscaModelRevision { } /** + * Get the tosca model json. * @return the toscaModelJson */ public String getToscaModelJson() { @@ -90,6 +98,7 @@ public class CldsToscaModelRevision { } /** + * Set the tosca model json. * @param toscaModelJson * the toscaModelJson to set */ @@ -98,6 +107,7 @@ public class CldsToscaModelRevision { } /** + * Get the user id. * @return the userId */ public String getUserId() { @@ -105,6 +115,7 @@ public class CldsToscaModelRevision { } /** + * Set the user id. * @param userId * the userId to set */ @@ -113,6 +124,7 @@ public class CldsToscaModelRevision { } /** + * Get the created date. * @return the createdDate */ public String getCreatedDate() { @@ -120,6 +132,7 @@ public class CldsToscaModelRevision { } /** + * Set the created date. * @param createdDate * the createdDate to set */ @@ -128,6 +141,7 @@ public class CldsToscaModelRevision { } /** + * Get the last updated date. * @return the lastUpdatedDate */ public String getLastUpdatedDate() { @@ -135,6 +149,7 @@ public class CldsToscaModelRevision { } /** + * Set the last updated date. * @param lastUpdatedDate * the lastUpdatedDate to set */ diff --git a/src/main/java/org/onap/clamp/clds/model/CldsVfData.java b/src/main/java/org/onap/clamp/clds/model/CldsVfData.java index 3b448e0a7..a31388e18 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsVfData.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsVfData.java @@ -30,17 +30,17 @@ public class CldsVfData implements Serializable { 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() { @@ -60,11 +60,11 @@ public class CldsVfData implements Serializable { } public String getVfInvariantResourceUUID() { - return vfInvariantResourceUUID; + return vfInvariantResourceUuid; } - public void setVfInvariantResourceUUID(String vfInvariantResourceUUID) { - this.vfInvariantResourceUUID = vfInvariantResourceUUID; + public void setVfInvariantResourceUUID(String vfInvariantResourceUuid) { + this.vfInvariantResourceUuid = vfInvariantResourceUuid; } } diff --git a/src/main/java/org/onap/clamp/clds/model/CldsVfcData.java b/src/main/java/org/onap/clamp/clds/model/CldsVfcData.java index cf158017c..9448cefcd 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsVfcData.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsVfcData.java @@ -30,7 +30,7 @@ public class CldsVfcData implements Serializable { private static final long serialVersionUID = 406993878174183557L; private String vfcName; - private String vfcInvariantResourceUUID; + private String vfcInvariantResourceUuid; private List<CldsAlarmCondition> cldsAlarmConditions; public String getVfcName() { @@ -50,11 +50,11 @@ public class CldsVfcData implements Serializable { } public String getVfcInvariantResourceUUID() { - return vfcInvariantResourceUUID; + return vfcInvariantResourceUuid; } - public void setVfcInvariantResourceUUID(String vfcInvariantResourceUUID) { - this.vfcInvariantResourceUUID = vfcInvariantResourceUUID; + public void setVfcInvariantResourceUUID(String vfcInvariantResourceUuid) { + this.vfcInvariantResourceUuid = vfcInvariantResourceUuid; } } diff --git a/src/main/java/org/onap/clamp/clds/model/DcaeEvent.java b/src/main/java/org/onap/clamp/clds/model/DcaeEvent.java index 7c76af2e1..a6ad10b72 100644 --- a/src/main/java/org/onap/clamp/clds/model/DcaeEvent.java +++ b/src/main/java/org/onap/clamp/clds/model/DcaeEvent.java @@ -39,15 +39,15 @@ public class DcaeEvent { 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) { @@ -88,6 +88,7 @@ public class DcaeEvent { } /** + * Get the event. * @return the event */ public String getEvent() { @@ -95,6 +96,7 @@ public class DcaeEvent { } /** + * Set the event. * @param event * the event to set */ @@ -103,36 +105,41 @@ public class DcaeEvent { } /** + * 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() { @@ -140,6 +147,7 @@ public class DcaeEvent { } /** + * Set the artifact name. * @param artifactName * the artifactName to set */ @@ -147,10 +155,18 @@ public class DcaeEvent { 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; } diff --git a/src/main/java/org/onap/clamp/clds/model/ValueItem.java b/src/main/java/org/onap/clamp/clds/model/ValueItem.java index 6ac680f8d..74b369f79 100644 --- a/src/main/java/org/onap/clamp/clds/model/ValueItem.java +++ b/src/main/java/org/onap/clamp/clds/model/ValueItem.java @@ -32,7 +32,7 @@ public class ValueItem { /** * Instantiate using value. * - * @param value + * @param value The value */ public ValueItem(String value) { this.value = value; @@ -42,6 +42,7 @@ public class ValueItem { } /** + * Get the value. * @return the value */ public String getValue() { @@ -49,6 +50,7 @@ public class ValueItem { } /** + * Set the value. * @param value * the value to set */ diff --git a/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java b/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java index 8e8debe83..73f708c29 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/AbstractModelElement.java @@ -45,7 +45,7 @@ public abstract class AbstractModelElement { 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; @@ -57,6 +57,7 @@ public abstract class AbstractModelElement { } /** + * Get the topic publishes. * @return the topicPublishes */ public String getTopicPublishes() { @@ -65,6 +66,7 @@ public abstract class AbstractModelElement { /** + * Get the id. * @return the id */ public String getId() { @@ -72,6 +74,7 @@ public abstract class AbstractModelElement { } /** + * Get the isFound flag. * @return the isFound */ public boolean isFound() { diff --git a/src/main/java/org/onap/clamp/clds/model/properties/Global.java b/src/main/java/org/onap/clamp/clds/model/properties/Global.java index 66491489a..0eed6ab9c 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/Global.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/Global.java @@ -33,7 +33,6 @@ import org.onap.clamp.clds.util.JsonUtils; /** * 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" @@ -54,7 +53,7 @@ public class Global { /** * Parse global given json node. * - * @param modelJson + * @param modelJson The model in json format. */ public Global(JsonObject modelJson) { JsonElement globalNode = modelJson.get("global"); @@ -68,6 +67,7 @@ public class Global { } /** + * Get the service. * @return the service */ public String getService() { @@ -75,6 +75,7 @@ public class Global { } /** + * Set the service. * @param service * the service to set */ @@ -83,17 +84,24 @@ public class Global { } /** + * 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() { @@ -101,6 +109,7 @@ public class Global { } /** + * Set the resourceVf. * @param resourceVf * the resourceVf to set */ @@ -109,6 +118,7 @@ public class Global { } /** + * Get the resource Vfc. * @return the resourceVfc */ public List<String> getResourceVfc() { @@ -116,6 +126,7 @@ public class Global { } /** + * Set tje respirce Vfc. * @param resourceVfc * the resourceVfc to set */ @@ -124,6 +135,7 @@ public class Global { } /** + * Get the list of locations. * @return the location */ public List<String> getLocation() { @@ -131,6 +143,7 @@ public class Global { } /** + * Set the list of locations. * @param location * the location to set */ @@ -138,14 +151,27 @@ public class Global { 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; } diff --git a/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java b/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java index b0607e914..63c677d9a 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/Holmes.java @@ -28,7 +28,6 @@ import org.onap.clamp.clds.util.JsonUtils; /** * Parse Holmes bpmn parameters json properties. - * <p> * Example json: * [{"name":"correlationalLogic","value":"vcwx"},{"name":"configPolicyName","value":"cccc"}] * @@ -42,13 +41,13 @@ public class Holmes extends AbstractModelElement { 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); diff --git a/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmn.java b/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmn.java index 248a52fcb..d35eea88c 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmn.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmn.java @@ -43,7 +43,6 @@ import org.onap.clamp.clds.util.JsonUtils; /** * Parse Model BPMN properties. - * <p> * Example json: {"policy" :[{"id":"Policy_0oxeocn", "from":"StartEvent_1"}]} */ public class ModelBpmn { @@ -58,10 +57,10 @@ 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 { @@ -97,7 +96,7 @@ public class ModelBpmn { /** * Add entry to both maps. * - * @param entry + * @param entry The model bpmn entry. */ private void addEntry(ModelBpmnEntry entry) { addEntry(entriesByType, entry, entry.getType()); @@ -107,9 +106,9 @@ public class ModelBpmn { /** * 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<>()); @@ -129,6 +128,7 @@ public class ModelBpmn { } /** + * Get the id. * @return the id field given the ModelElement type */ public String getId(String type) { @@ -140,6 +140,7 @@ public class ModelBpmn { } /** + * Get the form id. * @return the fromId field given the ModelElement type */ public String getFromId(String type) { @@ -151,6 +152,7 @@ public class ModelBpmn { } /** + * Get the type. * @return the ModelElement type given the ModelElement id */ public String getType(String id) { @@ -158,6 +160,7 @@ public class ModelBpmn { } /** + * Get the bpmn element ids. * @return list of elementIds from bpmn */ public List<String> getBpmnElementIds() { diff --git a/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmnEntry.java b/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmnEntry.java index 74fb7acf2..741b9decd 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmnEntry.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/ModelBpmnEntry.java @@ -27,8 +27,7 @@ import com.att.eelf.configuration.EELFLogger; import com.att.eelf.configuration.EELFManager; /** - * Model BPMN property entry - * <p> + * Model BPMN property entry. * Example json: {"policy": * [{"id":"Policy_0oxeocn", "from":"StartEvent_1"}]} */ @@ -44,9 +43,9 @@ public class ModelBpmnEntry { * 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; @@ -55,6 +54,7 @@ public class ModelBpmnEntry { } /** + * Get the type. * @return the type */ public String getType() { @@ -62,6 +62,7 @@ public class ModelBpmnEntry { } /** + * Set the type. * @param type * the type to set */ @@ -70,6 +71,7 @@ public class ModelBpmnEntry { } /** + * Get the id. * @return the id */ public String getId() { @@ -77,6 +79,7 @@ public class ModelBpmnEntry { } /** + * Set the id. * @param id * the id to set */ @@ -85,6 +88,7 @@ public class ModelBpmnEntry { } /** + * Get the form id. * @return the fromId */ public String getFromId() { @@ -92,6 +96,7 @@ public class ModelBpmnEntry { } /** + * Set the form id. * @param fromId * the fromId to set */ diff --git a/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java b/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java index 61eeac101..5160e10a3 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/ModelProperties.java @@ -127,7 +127,8 @@ public class ModelProperties { .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); } }); } @@ -136,8 +137,8 @@ public class ModelProperties { /** * 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; @@ -174,6 +175,7 @@ public class ModelProperties { } /** + * Get the model name. * @return the modelName */ public String getModelName() { @@ -181,6 +183,7 @@ public class ModelProperties { } /** + * Get the control name. * @return the controlName */ public String getControlName() { @@ -188,6 +191,7 @@ public class ModelProperties { } /** + * Get the control name qnd policy uniqueId. * @return the controlNameAndPolicyUniqueId */ public String getControlNameAndPolicyUniqueId() { @@ -195,6 +199,7 @@ public class ModelProperties { } /** + * Get the current policy name. * @return the currentPolicyName */ private String getCurrentPolicyName() { @@ -206,6 +211,7 @@ public class ModelProperties { } /** + * Get the current policy scope and policy name. * @return the currentPolicyScopeAndPolicyName */ public String getCurrentPolicyScopeAndPolicyName() { @@ -213,6 +219,7 @@ public class ModelProperties { } /** + * Get policy name for dcae deploy. * @return The policyName that wil be used in input parameters of DCAE deploy */ public String getPolicyNameForDcaeDeploy(ClampProperties refProp) { @@ -221,6 +228,7 @@ public class ModelProperties { } /** + * Get policy scope and name with uniqueid. * @return the policyScopeAndNameWithUniqueId */ public String getPolicyScopeAndNameWithUniqueId() { @@ -229,6 +237,7 @@ public class ModelProperties { } /** + * Get policy scope and name with unique guardid. * @return the policyScopeAndNameWithUniqueId */ public String getPolicyScopeAndNameWithUniqueGuardId() { @@ -237,6 +246,7 @@ public class ModelProperties { } /** + * Get current policy scope and full policy name. * @return the currentPolicyScopeAndFullPolicyName */ public String getCurrentPolicyScopeAndFullPolicyName(String policyNamePrefix) { @@ -245,6 +255,7 @@ public class ModelProperties { } /** + * Get policy name with scope context. * @return the PolicyNameWithScopeContext */ public String getPolicyNameWithScopeContext(String policyScope, String policyType, String vnfScope, String context, @@ -254,6 +265,7 @@ public class ModelProperties { } /** + * Get policy name with prefix scope context. * @return the PolicyNameWithPrefixScopeContext */ public String getPolicyNameWithPrefixScopeContext(String policyScope, String policyType, String vnfScope, @@ -273,6 +285,7 @@ public class ModelProperties { } /** + * Get current model element id. * @return the currentModelElementId */ public String getCurrentModelElementId() { @@ -291,6 +304,7 @@ public class ModelProperties { } /** + * Get policy uniqueId. * @return the policyUniqueId */ public String getPolicyUniqueId() { @@ -317,6 +331,7 @@ public class ModelProperties { } /** + * Get actioncd. * @return the actionCd */ public String getActionCd() { @@ -324,6 +339,7 @@ public class ModelProperties { } /** + * Get the testOnly flag value. * @return the testOnly */ public boolean isTestOnly() { @@ -331,6 +347,7 @@ public class ModelProperties { } /** + * Get the global value. * @return the global */ public Global getGlobal() { diff --git a/src/main/java/org/onap/clamp/clds/model/properties/Policy.java b/src/main/java/org/onap/clamp/clds/model/properties/Policy.java index 059d73293..9cb3635f0 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/Policy.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/Policy.java @@ -36,7 +36,6 @@ import java.util.Map.Entry; /** * Parse Policy json properties. - * <p> * Example json: * "Policy_005sny1":[[{"name":"timeout","value":"5"}],{"policyConfigurations":[[ * {"name":"recipe","value":["restart"]},{"name":"maxRetries","value":["3"]},{ @@ -62,10 +61,10 @@ public class Policy extends AbstractModelElement { /** * 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); @@ -81,6 +80,7 @@ public class Policy extends AbstractModelElement { } /** + * Get the policy chains. * @return the policyChains */ public List<PolicyChain> getPolicyChains() { diff --git a/src/main/java/org/onap/clamp/clds/model/properties/PolicyChain.java b/src/main/java/org/onap/clamp/clds/model/properties/PolicyChain.java index f29ba160b..ba6abd865 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/PolicyChain.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/PolicyChain.java @@ -35,7 +35,6 @@ import org.onap.clamp.clds.util.JsonUtils; /** * Parse Policy json properties. - * * Example json: * {"Policy_1e33tn8":{"PolicyTest1":[{"name":"pname","value":"PolicyTest1"},{ * "name":"pid","value":"1"},{"name":"timeout","value":"345"},{ @@ -67,12 +66,17 @@ public class PolicyChain { 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() @@ -87,6 +91,7 @@ public class PolicyChain { } } /** + * Get the policy Id. * @return the policyId */ public String getPolicyId() { @@ -94,6 +99,7 @@ public class PolicyChain { } /** + * Get the time out. * @return the timeout */ public Integer getTimeout() { @@ -101,6 +107,7 @@ public class PolicyChain { } /** + * Get the policy items. * @return the policyItems */ public List<PolicyItem> getPolicyItems() { @@ -108,6 +115,7 @@ public class PolicyChain { } /** + * Get the policy type. * @return the policyType */ public String getPolicyType() { diff --git a/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java b/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java index bb57d5dc0..6d766bec7 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/PolicyItem.java @@ -37,7 +37,6 @@ import org.yaml.snakeyaml.Yaml; /** * Parse policyConfigurations from Policy json properties. - * <p> * Example json: * "Policy_005sny1":[[{"name":"timeout","value":"5"}],{"policyConfigurations":[[ * {"name":"recipe","value":["restart"]},{"name":"maxRetries","value":["3"]},{ @@ -131,6 +130,7 @@ public class PolicyItem implements Cloneable { } /** + * Get the id. * @return the id */ public String getId() { @@ -138,6 +138,7 @@ public class PolicyItem implements Cloneable { } /** + * Get the recipe. * @return the recipe */ public String getRecipe() { @@ -145,48 +146,55 @@ public class PolicyItem implements Cloneable { } /** - * @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() { @@ -194,6 +202,7 @@ public class PolicyItem implements Cloneable { } /** + * Get the retry time limit. * @return the retryTimeLimit */ public int getRetryTimeLimit() { @@ -201,6 +210,7 @@ public class PolicyItem implements Cloneable { } /** + * Get the parent policy. * @return the parentPolicy */ public String getParentPolicy() { @@ -208,6 +218,7 @@ public class PolicyItem implements Cloneable { } /** + * Get the list of parent policy conditions. * @return the parentPolicyConditions */ public List<String> getParentPolicyConditions() { @@ -215,6 +226,7 @@ public class PolicyItem implements Cloneable { } /** + * Get the actor. * @return the actor */ public String getActor() { @@ -222,7 +234,8 @@ public class PolicyItem implements Cloneable { } /** - * @set the actor + * Set the actor. + * @param the actor */ public void setActor(String actor) { this.actor = actor; @@ -252,6 +265,10 @@ public class PolicyItem implements Cloneable { return recipePayload; } + /** + * Get oap rop. + * @return The oap rop? + */ public String getOapRop() { if (oapRop == null) { oapRop = "0m"; @@ -259,6 +276,10 @@ public class PolicyItem implements Cloneable { return oapRop; } + /** + * Get oap limit. + * @return the oap limit + */ public String getOapLimit() { if (oapLimit == null) { oapLimit = "0"; diff --git a/src/main/java/org/onap/clamp/clds/model/properties/Tca.java b/src/main/java/org/onap/clamp/clds/model/properties/Tca.java index 50808229f..0d17b9542 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/Tca.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/Tca.java @@ -44,11 +44,11 @@ public class Tca extends AbstractModelElement { 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); diff --git a/src/main/java/org/onap/clamp/clds/model/properties/TcaItem.java b/src/main/java/org/onap/clamp/clds/model/properties/TcaItem.java index 987b77658..94361c704 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/TcaItem.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/TcaItem.java @@ -50,9 +50,9 @@ public class TcaItem { 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) { diff --git a/src/main/java/org/onap/clamp/clds/model/properties/TcaThreshold.java b/src/main/java/org/onap/clamp/clds/model/properties/TcaThreshold.java index 0903d72f7..8c69f48b4 100644 --- a/src/main/java/org/onap/clamp/clds/model/properties/TcaThreshold.java +++ b/src/main/java/org/onap/clamp/clds/model/properties/TcaThreshold.java @@ -42,9 +42,9 @@ public class TcaThreshold { 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) { |