*/
package org.opendaylight.transportpce.common;
-public class ResponseCodes {
+public final class ResponseCodes {
public static final String RESPONSE_FAILED = "500";
public static final String RESPONSE_OK = "200";
public static final String SUCCESS_RESULT = "Success";
public static final String FAILED_RESULT = "Failed";
+ private ResponseCodes() {
+ }
+
}
public static final TimeUnit DEVICE_WRITE_TIMEOUT_UNIT = TimeUnit.SECONDS;
//TODO add timeouts for device setup (olm power setup etc.)
+
+ private Timeouts() {
+ }
}
* Source logical connection point.
* @param destTp
* Destination logical connection point.
- * @throws OpenRoadmInterfaceException
- * OpenRoadm Interface Exception.
*
* @return list of Ports object type.
+ *
+ * @throws OpenRoadmInterfaceException
+ * OpenRoadm Interface Exception.
*/
List<Ports> getConnectionPortTrail(String nodeId, Long waveNumber, String srcTp, String destTp)
throws OpenRoadmInterfaceException;
* @param interfaceName
* Name of the interface
*
- * @throws OpenRoadmInterfaceException OpenRoadm Interface Exception
- *
* @return Optional of Interface from datastore
+ *
+ * @throws OpenRoadmInterfaceException OpenRoadm Interface Exception
*/
Optional<Interface> getInterface(String nodeId, String interfaceName) throws OpenRoadmInterfaceException;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
-public class Queries {
+public final class Queries {
private static final String DEVICE_INFO_INSERT =
"INSERT INTO %sinv_dev_info "
return new Query();
}
- public static class Query {
+ public final static class Query {
private String sql;
private String schema;
}
@Override
+ @SuppressWarnings("checkstyle:FallThrough")
public void onDataTreeChanged(@Nonnull Collection<DataTreeModification<Node>> changes) {
LOG.info("onDataTreeChanged");
for (DataTreeModification<Node> change : changes) {
netconfNode.getConnectionStatus();
try {
long count = netconfNode.getAvailableCapabilities().getAvailableCapability().stream()
- .filter(cp -> cp.getCapability().contains(StringConstants.OPENROADM_DEVICE_MODEL_NAME))
- .count();
+ .filter(cp -> cp.getCapability().contains(StringConstants.OPENROADM_DEVICE_MODEL_NAME))
+ .count();
if (count > 0) {
LOG.info("OpenROADM node detected: {} {}", nodeId, connectionStatus.name());
switch (connectionStatus) {
nwBuilder.addAugmentation(Network1.class, nwBldr1.build());
return nwBuilder;
}
+
+ private Rdm2XpdrLink() {
+ }
+
}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class OlmUtils {
+public final class OlmUtils {
private static final Logger LOG = LoggerFactory.getLogger(OlmUtils.class);
private static long DATABROKER_READ_TIMEOUT_SECONDS = 120;
return Optional.empty();
}
+ private OlmUtils() {
+ }
+
}
import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.node.interfaces.NodeInterface;
import org.opendaylight.yang.gen.v1.http.org.transportpce.common.types.rev170907.olm.renderer.input.Nodes;
-public class DeviceRenderingResult extends OperationResult {
+public final class DeviceRenderingResult extends OperationResult {
private final List<Nodes> olmList;
private final List<NodeInterface> renderedNodeInterfaces;
import org.opendaylight.transportpce.common.OperationResult;
-public class OLMRenderingResult extends OperationResult {
+public final class OLMRenderingResult extends OperationResult {
private OLMRenderingResult(boolean success, String message) {
super(success, message);
import org.opendaylight.yangtools.yang.common.RpcResult;
import org.opendaylight.yangtools.yang.common.RpcResultBuilder;
-public class MountPointUtils {
+public final class MountPointUtils {
public static MountPointStub getMountPoint(List<Ports> ports, DataBroker dataBroker) {
RpcConsumerRegistry rpcConsumerRegistry = Mockito.spy(RpcConsumerRegistry.class);
}
return true;
}
+
+ private MountPointUtils() {
+ }
+
}
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.renderer.rev170228.ServicePathInputBuilder;
-public class ServiceDataUtils {
+public final class ServiceDataUtils {
public static Nodes createNode(String nodeId, String srcTp, String dstTp) {
return new NodesBuilder().setNodeId(nodeId).setKey(new NodesKey(nodeId)).setSrcTp(srcTp)
.build());
}
+ private ServiceDataUtils() {
+ }
+
}
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class ServiceCreateValidation {
+public final class ServiceCreateValidation {
private static final Logger LOG = LoggerFactory.getLogger(ServiceCreateValidation.class);
public static OperationResult validateServiceCreateRequest(ServiceCreateInput input) {
}
return OperationResult.ok("Validation successful.");
}
+
+ public ServiceCreateValidation() {
+ }
+
}
* Class to check coherency between hard and soft constraints.
*
*/
-public class CheckCoherencyHardSoft {
+public final class CheckCoherencyHardSoft {
private static final Logger LOG = LoggerFactory.getLogger(CheckCoherencyHardSoft.class);
return result;
}
+ public CheckCoherencyHardSoft() {
+ }
+
}
* Class for checking service sdnc-request-header compliancy.
*
*/
-public class ServicehandlerCompliancyCheck {
+public final class ServicehandlerCompliancyCheck {
private static final Logger LOG = LoggerFactory.getLogger(ServicehandlerCompliancyCheck.class);
return new ComplianceCheckResult(result, message);
}
+ public ServicehandlerCompliancyCheck() {
+ }
+
}
* Class for checking missing info on Tx/Rx for A/Z end.
*
*/
-public class ServicehandlerTxRxCheck {
+public final class ServicehandlerTxRxCheck {
private static final Logger LOG = LoggerFactory.getLogger(ServicehandlerTxRxCheck.class);
return new ComplianceCheckResult(result, message);
}
+ public ServicehandlerTxRxCheck() {
+ }
+
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.implementation.request.input.PathDescription;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.implementation.request.input.PathDescriptionBuilder;
-public class PathDescriptionConverter {
+public final class PathDescriptionConverter {
public static PathDescription getStub(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
.servicepath.rev170426.service.implementation.request.input.PathDescription concrete) {
concreteBuilder.setZToADirection(stub.getZToADirection());
return concreteBuilder.build();
}
+
+ private PathDescriptionConverter() {
+ }
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.implementation.request.input.ServiceAEnd;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.implementation.request.input.ServiceAEndBuilder;
-public class ServiceAEndConverter {
+public final class ServiceAEndConverter {
public static ServiceAEnd getStub(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath
.rev170426.service.implementation.request.input.ServiceAEnd concrete) {
concreteBuilder.setTxDirection(stub.getTxDirection());
return concreteBuilder.build();
}
+
+ private ServiceAEndConverter() {
+ }
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceDeleteInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceDeleteInputBuilder;
-public class ServiceDeleteInputConverter {
+public final class ServiceDeleteInputConverter {
public static ServiceDeleteInput getStub(org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface
.servicepath.rev170426.ServiceDeleteInput concrete) {
return concreteBuilder.build();
}
+ private ServiceDeleteInputConverter() {
+ }
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceDeleteOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceDeleteOutputBuilder;
-public class ServiceDeleteOutputConverter {
+public final class ServiceDeleteOutputConverter {
public static ServiceDeleteOutput
getStub(
return concreteBuilder.build();
}
+ private ServiceDeleteOutputConverter() {
+ }
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceImplementationRequestInput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceImplementationRequestInputBuilder;
-public class ServiceImplementationRequestInputConverter {
+public final class ServiceImplementationRequestInputConverter {
public static ServiceImplementationRequestInput getStub(org.opendaylight.yang.gen.v1.http.org.transportpce
.b.c._interface.servicepath.rev170426.ServiceImplementationRequestInput concrete) {
return concreteBuilder.build();
}
+ private ServiceImplementationRequestInputConverter() {
+ }
+
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceImplementationRequestOutput;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.ServiceImplementationRequestOutputBuilder;
-public class ServiceImplementationRequestOutputConverter {
+public final class ServiceImplementationRequestOutputConverter {
public static ServiceImplementationRequestOutput getStub(org.opendaylight.yang.gen.v1.http.org.transportpce
.b.c._interface.servicepath.rev170426.ServiceImplementationRequestOutput concrete) {
return concreteBuilder.build();
}
+ private ServiceImplementationRequestOutputConverter() {
+ }
+
}
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.implementation.request.input.ServiceZEnd;
import org.opendaylight.yang.gen.v1.http.org.opendaylight.transportpce.stubrenderer.rev170426.service.implementation.request.input.ServiceZEndBuilder;
-public class ServiceZEndConverter {
+public final class ServiceZEndConverter {
public static ServiceZEnd getStub(
org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.servicepath.rev170426.service.implementation
.request.input.ServiceZEnd concrete) {
concreteBuilder.setTxDirection(stub.getTxDirection());
return concreteBuilder.build();
}
+
+ private ServiceZEndConverter(){
+ }
}
import org.opendaylight.yang.gen.v1.http.org.transportpce.b.c._interface.service.types.rev170426.ServicePathNotificationTypes;
import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.DateAndTime;
-public class ServiceDataUtils {
+public final class ServiceDataUtils {
public static ServiceCreateInput buildServiceCreateInput() {
.build());
}
+ private ServiceDataUtils() {
+ }
+
}