From 7ded1bac934d21e04ca7bc82cf2c27d9ae61d44b Mon Sep 17 00:00:00 2001 From: Jerry Flood Date: Mon, 25 Mar 2019 12:23:56 -0400 Subject: Commit 6 for Create Optimized Sched API Multiple commits required due to commit size limitation. Change-Id: Id665ec3066d1c6e4f18c7383c43806dcacc000d1 Issue-ID: OPTFRA-458 Signed-off-by: Jerry Flood --- .../optf/cmso/model/ChangeManagementGroup.java | 244 +++++++++++--- .../optf/cmso/model/ChangeManagementSchedule.java | 359 +++++++++++++++++---- 2 files changed, 495 insertions(+), 108 deletions(-) (limited to 'cmso-service/src/main/java') diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementGroup.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementGroup.java index 39efb3f..2d4790d 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementGroup.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementGroup.java @@ -1,58 +1,49 @@ /* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * 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 - * - * 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 + * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM. + * + * 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 + * + * 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. + * + * + * Unless otherwise specified, all documentation contained herein is licensed under the Creative + * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except + * in compliance with the License. You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation 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. - * - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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.onap.optf.cmso.model; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.List; import java.util.UUID; - import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Transient; - import org.joda.time.format.ISODateTimeFormat; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - /** * The persistent class for the change_management_groups database table. - * + * */ @Entity @Table(name = "CHANGE_MANAGEMENT_GROUPS") @@ -113,7 +104,8 @@ public class ChangeManagementGroup implements Serializable { private Integer normalDurationInSecs; @ApiModelProperty( - value = "The name of the schedule optimization policy used by the change management schedule optimizer.") + value = "The name of the schedule optimization policy " + + "used by the change management schedule optimizer.") @Column(name = "policy_id") private String policyId; @@ -122,124 +114,270 @@ public class ChangeManagementGroup implements Serializable { @Transient private List changeManagementSchedules; + /** + * Instantiates a new change management group. + */ public ChangeManagementGroup() {} + /** + * Gets the finish time. + * + * @return the finish time + */ public String getFinishTime() { - if (finishTimeMillis != null) + if (finishTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(this.finishTimeMillis); + } return null; } + /** + * Sets the finish time. + * + * @param finishTime the new finish time + */ public void setFinishTime(String finishTime) {} + /** + * Gets the group id. + * + * @return the group id + */ public String getGroupId() { return this.groupId; } + /** + * Sets the group id. + * + * @param groupId the new group id + */ public void setGroupId(String groupId) { this.groupId = groupId; } + /** + * Gets the last instance start time. + * + * @return the last instance start time + */ public String getLastInstanceStartTime() { - if (lastInstanceStartTimeMillis != null) + if (lastInstanceStartTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(this.lastInstanceStartTimeMillis); + } return null; } + /** + * Sets the last instance start time. + * + * @param lastInstanceStartTime the new last instance start time + */ public void setLastInstanceStartTime(String lastInstanceStartTime) {} + /** + * Gets the start time. + * + * @return the start time + */ public String getStartTime() { - if (startTimeMillis != null) + if (startTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(this.startTimeMillis); + } return null; } + /** + * Sets the start time. + * + * @param startTime the new start time + */ public void setStartTime(String startTime) {} + /** + * Gets the additional duration in secs. + * + * @return the additional duration in secs + */ public Integer getAdditionalDurationInSecs() { return additionalDurationInSecs; } + /** + * Sets the additional duration in secs. + * + * @param additionalDurationInSecs the new additional duration in secs + */ public void setAdditionalDurationInSecs(Integer additionalDurationInSecs) { this.additionalDurationInSecs = additionalDurationInSecs; } + /** + * Gets the concurrency limit. + * + * @return the concurrency limit + */ public Integer getConcurrencyLimit() { return concurrencyLimit; } + /** + * Sets the concurrency limit. + * + * @param concurrencyLimit the new concurrency limit + */ public void setConcurrencyLimit(Integer concurrencyLimit) { this.concurrencyLimit = concurrencyLimit; } + /** + * Gets the normal duration in secs. + * + * @return the normal duration in secs + */ public Integer getNormalDurationInSecs() { return normalDurationInSecs; } + /** + * Sets the normal duration in secs. + * + * @param normalDurationInSecs the new normal duration in secs + */ public void setNormalDurationInSecs(Integer normalDurationInSecs) { this.normalDurationInSecs = normalDurationInSecs; } + /** + * Gets the policy id. + * + * @return the policy id + */ public String getPolicyId() { return policyId; } + /** + * Sets the policy id. + * + * @param policyId the new policy id + */ public void setPolicyId(String policyId) { this.policyId = policyId; } + /** + * Gets the finish time millis. + * + * @return the finish time millis + */ public Long getFinishTimeMillis() { return finishTimeMillis; } + /** + * Sets the finish time millis. + * + * @param finishTimeMillis the new finish time millis + */ public void setFinishTimeMillis(Long finishTimeMillis) { this.finishTimeMillis = finishTimeMillis; } + /** + * Gets the last instance start time millis. + * + * @return the last instance start time millis + */ public Long getLastInstanceStartTimeMillis() { return lastInstanceStartTimeMillis; } + /** + * Sets the last instance start time millis. + * + * @param lastInstanceStartTimeMillis the new last instance start time millis + */ public void setLastInstanceStartTimeMillis(Long lastInstanceStartTimeMillis) { this.lastInstanceStartTimeMillis = lastInstanceStartTimeMillis; } + /** + * Gets the start time millis. + * + * @return the start time millis + */ public Long getStartTimeMillis() { return startTimeMillis; } + /** + * Sets the start time millis. + * + * @param startTimeMillis the new start time millis + */ public void setStartTimeMillis(Long startTimeMillis) { this.startTimeMillis = startTimeMillis; } + /** + * Gets the change management schedules. + * + * @return the change management schedules + */ public List getChangeManagementSchedules() { return changeManagementSchedules; } + /** + * Sets the change management schedules. + * + * @param changeManagementSchedules the new change management schedules + */ public void setChangeManagementSchedules(List changeManagementSchedules) { this.changeManagementSchedules = changeManagementSchedules; } - public UUID getUuid() { - return uuid; - } + /** + * Gets the uuid. + * + * @return the uuid + */ + public UUID getUuid() { + return uuid; + } - public void setUuid(UUID uuid) { - this.uuid = uuid; - } + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(UUID uuid) { + this.uuid = uuid; + } - public UUID getSchedulesUuid() { - return schedulesUuid; - } + /** + * Gets the schedules uuid. + * + * @return the schedules uuid + */ + public UUID getSchedulesUuid() { + return schedulesUuid; + } - public void setSchedulesUuid(UUID schedulesUuid) { - this.schedulesUuid = schedulesUuid; - } + /** + * Sets the schedules uuid. + * + * @param schedulesUuid the new schedules uuid + */ + public void setSchedulesUuid(UUID schedulesUuid) { + this.schedulesUuid = schedulesUuid; + } } diff --git a/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementSchedule.java b/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementSchedule.java index 680fc99..f9dd418 100644 --- a/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementSchedule.java +++ b/cmso-service/src/main/java/org/onap/optf/cmso/model/ChangeManagementSchedule.java @@ -1,39 +1,37 @@ /* - * Copyright © 2017-2018 AT&T Intellectual Property. - * Modifications Copyright © 2018 IBM. - * - * 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 - * - * 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 + * Copyright © 2017-2018 AT&T Intellectual Property. Modifications Copyright © 2018 IBM. + * + * 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 + * + * 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. + * + * + * Unless otherwise specified, all documentation contained herein is licensed under the Creative + * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except + * in compliance with the License. You may obtain a copy of the License at + * + * https://creativecommons.org/licenses/by/4.0/ + * + * Unless required by applicable law or agreed to in writing, documentation 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. - * - * - * Unless otherwise specified, all documentation contained herein is licensed - * under the Creative Commons License, Attribution 4.0 Intl. (the "License"); - * you may not use this documentation except in compliance with the License. - * You may obtain a copy of the License at - * - * https://creativecommons.org/licenses/by/4.0/ - * - * Unless required by applicable law or agreed to in writing, documentation - * 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.onap.optf.cmso.model; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; import java.io.Serializable; import java.util.UUID; - import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; @@ -41,18 +39,11 @@ import javax.persistence.Lob; import javax.persistence.NamedQuery; import javax.persistence.Table; import javax.persistence.Transient; - import org.joda.time.format.ISODateTimeFormat; -import com.fasterxml.jackson.annotation.JsonIgnore; -import com.fasterxml.jackson.annotation.JsonProperty; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; - /** * The persistent class for the change_management_schedules database table. - * + * */ @Entity @Table(name = "CHANGE_MANAGEMENT_SCHEDULES") @@ -92,7 +83,9 @@ public class ChangeManagementSchedule implements Serializable { private Long startTimeMillis; @ApiModelProperty( - value = "Start time of this VNF workflow assigned by Scheduler based upon the group start time returned by the optimizer and concurrency.") + value = "Start time of this VNF workflow assigned by " + + "Scheduler based upon the group start" + + " time returned by the optimizer and concurrency.") @JsonProperty @Transient private String startTime; @@ -162,192 +155,448 @@ public class ChangeManagementSchedule implements Serializable { @Transient private String msoTime; + @ApiModelProperty(value = "Change equest.") + @Lob + @Column(name = "request") + private String request; + + /** + * Instantiates a new change management schedule. + */ public ChangeManagementSchedule() {} + /** + * Gets the finish time. + * + * @return the finish time + */ public String getFinishTime() { - if (finishTimeMillis != null) + if (finishTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(finishTimeMillis); + } return null; } + /** + * Sets the finish time. + * + * @param finishTime the new finish time + */ public void setFinishTime(String finishTime) {} + /** + * Gets the start time. + * + * @return the start time + */ public String getStartTime() { - if (startTimeMillis != null) + if (startTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(startTimeMillis); + } return null; } + /** + * Sets the start time. + * + * @param startTime the new start time + */ public void setStartTime(String startTime) {} + /** + * Gets the status. + * + * @return the status + */ public String getStatus() { return this.status; } + /** + * Sets the status. + * + * @param status the new status + */ public void setStatus(String status) { this.status = status; } + /** + * Gets the vnf id. + * + * @return the vnf id + */ public String getVnfId() { return this.vnfId; } + /** + * Sets the vnf id. + * + * @param vnfId the new vnf id + */ public void setVnfId(String vnfId) { this.vnfId = vnfId; } + /** + * Gets the vnf name. + * + * @return the vnf name + */ public String getVnfName() { return this.vnfName; } + /** + * Sets the vnf name. + * + * @param vnfName the new vnf name + */ public void setVnfName(String vnfName) { this.vnfName = vnfName; } + /** + * Gets the tm change id. + * + * @return the tm change id + */ public String getTmChangeId() { return tmChangeId; } + /** + * Sets the tm change id. + * + * @param tmChangeId the new tm change id + */ public void setTmChangeId(String tmChangeId) { this.tmChangeId = tmChangeId; } + /** + * Gets the uuid. + * + * @return the uuid + */ public UUID getUuid() { - return uuid; - } + return uuid; + } - public void setUuid(UUID uuid) { - this.uuid = uuid; - } + /** + * Sets the uuid. + * + * @param uuid the new uuid + */ + public void setUuid(UUID uuid) { + this.uuid = uuid; + } - public UUID getChangeManagementGroupUuid() { - return changeManagementGroupUuid; - } + /** + * Gets the change management group uuid. + * + * @return the change management group uuid + */ + public UUID getChangeManagementGroupUuid() { + return changeManagementGroupUuid; + } - public void setChangeManagementGroupUuid(UUID changeManagementGroupUuid) { - this.changeManagementGroupUuid = changeManagementGroupUuid; - } + /** + * Sets the change management group uuid. + * + * @param changeManagementGroupUuid the new change management group uuid + */ + public void setChangeManagementGroupUuid(UUID changeManagementGroupUuid) { + this.changeManagementGroupUuid = changeManagementGroupUuid; + } - public String getDispatchTime() { - if (dispatchTimeMillis != null) + /** + * Gets the dispatch time. + * + * @return the dispatch time + */ + public String getDispatchTime() { + if (dispatchTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(dispatchTimeMillis); + } return null; } + /** + * Sets the dispatch time. + * + * @param dispatchTime the new dispatch time + */ public void setDispatchTime(String dispatchTime) {} + /** + * Gets the dispatcher instance. + * + * @return the dispatcher instance + */ public String getDispatcherInstance() { return dispatcherInstance; } + /** + * Sets the dispatcher instance. + * + * @param dispatcherInstance the new dispatcher instance + */ public void setDispatcherInstance(String dispatcherInstance) { this.dispatcherInstance = dispatcherInstance; } + /** + * Gets the execution completed time. + * + * @return the execution completed time + */ public String getExecutionCompletedTime() { - if (executionCompletedTimeMillis != null) + if (executionCompletedTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(executionCompletedTimeMillis); + } return null; } + /** + * Sets the execution completed time. + * + * @param executionCompletedTime the new execution completed time + */ public void setExecutionCompletedTime(String executionCompletedTime) {} + /** + * Gets the mso request id. + * + * @return the mso request id + */ public String getMsoRequestId() { return msoRequestId; } + /** + * Sets the mso request id. + * + * @param msoRequestId the new mso request id + */ public void setMsoRequestId(String msoRequestId) { this.msoRequestId = msoRequestId; } + /** + * Gets the status message. + * + * @return the status message + */ public String getStatusMessage() { return statusMessage; } + /** + * Sets the status message. + * + * @param statusMessage the new status message + */ public void setStatusMessage(String statusMessage) { this.statusMessage = statusMessage; } + /** + * Gets the finish time millis. + * + * @return the finish time millis + */ public Long getFinishTimeMillis() { return finishTimeMillis; } + /** + * Sets the finish time millis. + * + * @param finishTimeMillis the new finish time millis + */ public void setFinishTimeMillis(Long finishTimeMillis) { this.finishTimeMillis = finishTimeMillis; } + /** + * Gets the start time millis. + * + * @return the start time millis + */ public Long getStartTimeMillis() { return startTimeMillis; } + /** + * Sets the start time millis. + * + * @param startTimeMillis the new start time millis + */ public void setStartTimeMillis(Long startTimeMillis) { this.startTimeMillis = startTimeMillis; } + /** + * Gets the dispatch time millis. + * + * @return the dispatch time millis + */ public Long getDispatchTimeMillis() { return dispatchTimeMillis; } + /** + * Sets the dispatch time millis. + * + * @param dispatchTimeMillis the new dispatch time millis + */ public void setDispatchTimeMillis(Long dispatchTimeMillis) { this.dispatchTimeMillis = dispatchTimeMillis; } + /** + * Gets the execution completed time millis. + * + * @return the execution completed time millis + */ public Long getExecutionCompletedTimeMillis() { return executionCompletedTimeMillis; } + /** + * Sets the execution completed time millis. + * + * @param executionCompletedTimeMillis the new execution completed time millis + */ public void setExecutionCompletedTimeMillis(Long executionCompletedTimeMillis) { this.executionCompletedTimeMillis = executionCompletedTimeMillis; } + /** + * Gets the mso status. + * + * @return the mso status + */ public String getMsoStatus() { return msoStatus; } + /** + * Sets the mso status. + * + * @param msoStatus the new mso status + */ public void setMsoStatus(String msoStatus) { this.msoStatus = msoStatus; } + /** + * Gets the mso message. + * + * @return the mso message + */ public String getMsoMessage() { return msoMessage; } + /** + * Sets the mso message. + * + * @param msoMessage the new mso message + */ public void setMsoMessage(String msoMessage) { this.msoMessage = msoMessage; } + /** + * Gets the mso time millis. + * + * @return the mso time millis + */ public Long getMsoTimeMillis() { return msoTimeMillis; } + /** + * Sets the mso time millis. + * + * @param msoTimeMillis the new mso time millis + */ public void setMsoTimeMillis(Long msoTimeMillis) { this.msoTimeMillis = msoTimeMillis; } + /** + * Gets the mso time. + * + * @return the mso time + */ public String getMsoTime() { - if (msoTimeMillis != null) + if (msoTimeMillis != null) { return ISODateTimeFormat.dateTimeNoMillis().print(msoTimeMillis); + } return null; } protected void setMsoTime(String msoTime) {} + /** + * Gets the tm status. + * + * @return the tm status + */ public String getTmStatus() { return tmStatus; } + /** + * Sets the tm status. + * + * @param tmStatus the new tm status + */ public void setTmStatus(String tmStatus) { this.tmStatus = tmStatus; } + /** + * Gets the tm approval status. + * + * @return the tm approval status + */ public String getTmApprovalStatus() { return tmApprovalStatus; } + /** + * Sets the tm approval status. + * + * @param tmApprovalStatus the new tm approval status + */ public void setTmApprovalStatus(String tmApprovalStatus) { this.tmApprovalStatus = tmApprovalStatus; } + /** + * Gets the request. + * + * @return the request + */ + public String getRequest() { + return request; + } + + /** + * Sets the request. + * + * @param request the new request + */ + public void setRequest(String request) { + this.request = request; + } + } -- cgit 1.2.3-korg