import java.util.ArrayList;
import java.util.List;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
/**
* Utility class for managing {@link ErrorResponse objects}.
*
* @author Liam Fallon (liam.fallon@est.tech)
*/
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class ErrorResponseUtils {
- /**
- * Private constructor used to prevent sub class instantiation.
- */
- private ErrorResponseUtils() {
- // Default constructor
- }
/**
* Store the cascaded messages from an exception and all its nested exceptions in an ErrorResponse object.
* ============LICENSE_START=======================================================
* ONAP Policy Models
* ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2019, 2021 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
package org.onap.policy.models.pap.concepts;
+import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@Setter
@ToString(callSuper = true)
@NoArgsConstructor
+@AllArgsConstructor
public class PdpGroupDeployResponse extends SimpleResponse {
/**
* URI to fetch the deployment status.
*/
private String uri;
-
- /**
- * Constructs the object.
- *
- * @param message the message
- * @param uri the uri to get actual deployment status
- */
- public PdpGroupDeployResponse(String message, String uri) {
- this.message = message;
- this.uri = uri;
- }
}
import java.util.ArrayList;
import java.util.List;
import lombok.Data;
+import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.onap.policy.common.parameters.BeanValidationResult;
import org.onap.policy.common.parameters.ValidationResult;
* particular domain.
*/
@Data
+@NoArgsConstructor
public class DeploymentSubGroup {
public enum Action {
private Action action;
private List<ToscaConceptIdentifier> policies;
- /**
- * Constructs the object.
- */
- public DeploymentSubGroup() {
- super();
- }
-
/**
* Constructs the object, making a deep copy from the source.
*
import java.util.List;
import java.util.Map;
import lombok.Data;
+import lombok.NoArgsConstructor;
import lombok.NonNull;
import org.onap.policy.common.parameters.BeanValidationResult;
import org.onap.policy.common.parameters.ValidationResult;
* @author Ram Krishna Verma (ram.krishna.verma@est.tech)
*/
@Data
+@NoArgsConstructor
public class PdpSubGroup {
private String pdpType;
private List<ToscaConceptIdentifier> supportedPolicyTypes;
private Map<String, String> properties;
private List<Pdp> pdpInstances;
- /**
- * Constructs the object.
- */
- public PdpSubGroup() {
- super();
- }
-
/**
* Constructs the object, making a deep copy from the source.
*
package org.onap.policy.models.sim.dmaap.startstop;
import java.util.Arrays;
+import lombok.Getter;
import org.onap.policy.common.utils.cmd.CommandLineException;
import org.onap.policy.models.sim.dmaap.DmaapSimException;
import org.onap.policy.models.sim.dmaap.DmaapSimRuntimeException;
private static final Logger LOGGER = LoggerFactory.getLogger(Main.class);
private DmaapSimActivator activator;
- private DmaapSimParameterGroup parameterGroup;
+ @Getter
+ private DmaapSimParameterGroup parameters;
/**
* Instantiates the DMaap Simulator service.
// Read the parameters
try {
- parameterGroup = new DmaapSimParameterHandler().getParameters(arguments);
+ parameters = new DmaapSimParameterHandler().getParameters(arguments);
} catch (final Exception e) {
LOGGER.error("start of DMaaP simulator service failed", e);
return;
}
// Now, create the activator for the DMaaP Simulator service
- activator = new DmaapSimActivator(parameterGroup);
+ activator = new DmaapSimActivator(parameters);
// Start the activator
try {
LOGGER.info("Started DMaaP simulator service");
}
- /**
- * Get the parameters specified in JSON.
- *
- * @return the parameters
- */
- public DmaapSimParameterGroup getParameters() {
- return parameterGroup;
- }
-
/**
* Shut down Execution.
*
*/
public void shutdown() throws DmaapSimException {
// clear the parameterGroup variable
- parameterGroup = null;
+ parameters = null;
// clear the DMaaP simulator activator
if (activator != null && activator.isAlive()) {
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2019 Nordix Foundation.
+ * Modifications Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
package org.onap.policy.models.sim.pdp;
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
/**
* Names of various items contained in the Registry.
*/
-public class PdpSimulatorConstants {
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class PdpSimulatorConstants {
// Registry keys
public static final String REG_PDP_SIMULATOR_ACTIVATOR = "object:activator/pdp_simulator";
public static final String REG_PDP_STATUS_OBJECT = "object:pdp/status";
public static final String REG_PDP_TOSCA_POLICY_LIST = "object:pdp/tosca/policy/list";
public static final String REG_PDP_STATUS_PUBLISHER = "object:pdp/status/publisher";
public static final String REG_PDP_TOPIC_SINKS = "object:pdp/topic/sinks";
-
- private PdpSimulatorConstants() {
- super();
- }
}
package org.onap.policy.models.sim.pdp;
import java.util.Arrays;
+import lombok.Getter;
import org.onap.policy.common.utils.cmd.CommandLineException;
import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.sim.pdp.exception.PdpSimulatorException;
private static final Logger LOGGER = LoggerFactory.getLogger(PdpSimulatorMain.class);
private PdpSimulatorActivator activator;
- private PdpSimulatorParameterGroup parameterGroup;
+ @Getter
+ private PdpSimulatorParameterGroup parameters;
/**
* Instantiates the PdpSimulator.
// Read the parameters
try {
- parameterGroup = new PdpSimulatorParameterHandler().getParameters(arguments);
+ parameters = new PdpSimulatorParameterHandler().getParameters(arguments);
} catch (final Exception e) {
LOGGER.error(PDP_SIMULATOR_FAIL_MSG, e);
return;
}
// create the activator
- activator = new PdpSimulatorActivator(parameterGroup);
+ activator = new PdpSimulatorActivator(parameters);
Registry.register(PdpSimulatorConstants.REG_PDP_SIMULATOR_ACTIVATOR, activator);
// Start the activator
try {
LOGGER.info("Started PdpSimulator service");
}
- /**
- * Get the parameters specified in JSON.
- *
- * @return parameterGroup the parameters
- */
- public PdpSimulatorParameterGroup getParameters() {
- return parameterGroup;
- }
-
/**
* Shut down Execution.
*/
public void shutdown() throws PdpSimulatorException {
// clear the parameterGroup variable
- parameterGroup = null;
+ parameters = null;
// clear the pdp simulator activator
if (activator != null && activator.isAlive()) {
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
+import lombok.Getter;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.event.comm.client.TopicSinkClient;
import org.onap.policy.models.pdp.concepts.PdpStatus;
private TopicSinkClient topicSinkClient;
private Timer timer;
+ @Getter
private long interval;
/**
timer.purge();
}
- /**
- * Get the current time interval used by the timer task.
- *
- * @return interval the current time interval
- */
- public long getInterval() {
- return interval;
- }
-
/**
* Method to send pdp status message to pap on demand.
*