Skip to content

Commit

Permalink
Remove deprecated code
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Grzenia <martin.grzenia@iml.fraunhofer.de>
Merged-by: Martin Grzenia <martin.grzenia@iml.fraunhofer.de>
  • Loading branch information
swltr and martingr committed Jun 10, 2024
1 parent 7857c52 commit cedc5ad
Show file tree
Hide file tree
Showing 133 changed files with 4,635 additions and 4,630 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.opentcs.components.kernel.services.PlantModelService;
import org.opentcs.components.kernel.services.QueryService;
import org.opentcs.components.kernel.services.RouterService;
import org.opentcs.components.kernel.services.SchedulerService;
import org.opentcs.components.kernel.services.TransportOrderService;
import org.opentcs.components.kernel.services.VehicleService;

Expand Down Expand Up @@ -123,15 +122,6 @@ void publishEvent(Object event)
@Nonnull
RouterService getRouterService();

/**
* Returns the service a client can use to access methods regarding the scheduler.
*
* @return The service a client can use to access methods regarding the scheduler.
*/
@Nonnull
@Deprecated
SchedulerService getSchedulerService();

/**
* Returns the service a client can use to access methods for generic queries.
*
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ public interface RegistrationName {
* The name the {@link RemoteDispatcherService} registers itself with a RMI registry.
*/
String REMOTE_DISPATCHER_SERVICE = RemoteDispatcherService.class.getCanonicalName();
/**
* The name the {@link RemoteSchedulerService} registers itself with a RMI registry.
*/
@Deprecated
String REMOTE_SCHEDULER_SERVICE = RemoteSchedulerService.class.getCanonicalName();
/**
* The name the {@link RemoteQueryService} registers itself with a RMI registry.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import org.opentcs.data.model.Vehicle;
import org.opentcs.data.order.ReroutingType;
import org.opentcs.data.order.TransportOrder;
import org.opentcs.util.annotations.ScheduledApiChange;

/**
* Declares the methods provided by the {@link DispatcherService} via RMI.
Expand Down Expand Up @@ -48,22 +47,13 @@ void withdrawByTransportOrder(ClientID clientId,
boolean immediateAbort)
throws RemoteException;

@ScheduledApiChange(when = "6.0", details = "Default implementation will be removed.")
default void reroute(ClientID clientId,
TCSObjectReference<Vehicle> ref,
ReroutingType reroutingType)
throws RemoteException {
}
void reroute(ClientID clientId, TCSObjectReference<Vehicle> ref, ReroutingType reroutingType)
throws RemoteException;

@ScheduledApiChange(when = "6.0", details = "Default implementation will be removed.")
default void rerouteAll(ClientID clientId,
ReroutingType reroutingType)
throws RemoteException {
}
void rerouteAll(ClientID clientId, ReroutingType reroutingType)
throws RemoteException;

@ScheduledApiChange(when = "6.0", details = "Default implementation will be removed.")
default void assignNow(ClientID clientId, TCSObjectReference<TransportOrder> ref)
throws RemoteException {
}
void assignNow(ClientID clientId, TCSObjectReference<TransportOrder> ref)
throws RemoteException;
// CHECKSTYLE:ON
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_PLANT_MODEL_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_QUERY_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_ROUTER_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_SCHEDULER_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_TRANSPORT_ORDER_SERVICE;
import static org.opentcs.access.rmi.services.RegistrationName.REMOTE_VEHICLE_SERVICE;
import org.opentcs.components.kernel.services.DispatcherService;
Expand All @@ -40,7 +39,6 @@
import org.opentcs.components.kernel.services.PlantModelService;
import org.opentcs.components.kernel.services.QueryService;
import org.opentcs.components.kernel.services.RouterService;
import org.opentcs.components.kernel.services.SchedulerService;
import org.opentcs.components.kernel.services.ServiceUnavailableException;
import org.opentcs.components.kernel.services.TransportOrderService;
import org.opentcs.components.kernel.services.VehicleService;
Expand Down Expand Up @@ -103,11 +101,6 @@ public class RemoteKernelServicePortalProxy
* The router service.
*/
private final RemoteRouterServiceProxy routerService = new RemoteRouterServiceProxy();
/**
* The scheduler service.
*/
@SuppressWarnings("deprecation")
private final RemoteSchedulerServiceProxy schedulerService = new RemoteSchedulerServiceProxy();
/**
* The query service.
*/
Expand Down Expand Up @@ -287,13 +280,6 @@ public QueryService getQueryService() {
return queryService;
}

@Override
@Nonnull
@Deprecated
public SchedulerService getSchedulerService() {
return schedulerService;
}

@Override
@Nonnull
public PeripheralService getPeripheralService() {
Expand All @@ -312,7 +298,6 @@ public PeripheralDispatcherService getPeripheralDispatcherService() {
return peripheralDispatcherService;
}

@SuppressWarnings("deprecation")
private void updateServiceLogins(Registry registry)
throws RemoteException, NotBoundException {
plantModelService
Expand Down Expand Up @@ -347,11 +332,6 @@ private void updateServiceLogins(Registry registry)
.setRemoteService((RemoteRouterService) registry.lookup(REMOTE_ROUTER_SERVICE))
.setServiceListener(this);

schedulerService
.setClientId(getClientId())
.setRemoteService((RemoteSchedulerService) registry.lookup(REMOTE_SCHEDULER_SERVICE))
.setServiceListener(this);

queryService
.setClientId(getClientId())
.setRemoteService((RemoteQueryService) registry.lookup(REMOTE_QUERY_SERVICE))
Expand Down Expand Up @@ -387,7 +367,6 @@ private void resetServiceLogins() {
notificationService.setClientId(null).setRemoteService(null).setServiceListener(null);
dispatcherService.setClientId(null).setRemoteService(null).setServiceListener(null);
routerService.setClientId(null).setRemoteService(null).setServiceListener(null);
schedulerService.setClientId(null).setRemoteService(null).setServiceListener(null);
queryService.setClientId(null).setRemoteService(null).setServiceListener(null);
peripheralService.setClientId(null).setRemoteService(null).setServiceListener(null);
peripheralJobService.setClientId(null).setRemoteService(null).setServiceListener(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.opentcs.data.model.Location;
import org.opentcs.data.model.Path;
import org.opentcs.data.model.PlantModel;
import org.opentcs.util.annotations.ScheduledApiChange;

/**
* Declares the methods provided by the {@link PlantModelService} via RMI.
Expand Down Expand Up @@ -53,9 +52,7 @@ Map<String, String> getModelProperties(ClientID clientId)
void updateLocationLock(ClientID clientId, TCSObjectReference<Location> ref, boolean locked)
throws RemoteException;

@ScheduledApiChange(when = "6.0", details = "Default implementation will be removed.")
default void updatePathLock(ClientID clientId, TCSObjectReference<Path> ref, boolean locked)
throws RemoteException {
}
void updatePathLock(ClientID clientId, TCSObjectReference<Path> ref, boolean locked)
throws RemoteException;
// CHECKSTYLE:ON
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.opentcs.data.model.TCSResourceReference;
import org.opentcs.data.model.Vehicle;
import org.opentcs.data.order.Route;
import org.opentcs.util.annotations.ScheduledApiChange;

/**
* Declares the methods provided by the {@link RouterService} via RMI.
Expand All @@ -39,28 +38,7 @@ public interface RemoteRouterService
extends Remote {

// CHECKSTYLE:OFF
@Deprecated
@ScheduledApiChange(when = "6.0", details = "Will be removed.")
public void updatePathLock(ClientID clientId, TCSObjectReference<Path> ref, boolean locked)
throws RemoteException;

@Deprecated
@ScheduledApiChange(when = "6.0", details = "Will be removed.")
public void updateRoutingTopology(ClientID clientId)
throws RemoteException;

@ScheduledApiChange(when = "6.0", details = "Default implementation will be removed.")
default public void updateRoutingTopology(ClientID clientId, Set<TCSObjectReference<Path>> refs)
throws RemoteException {
updateRoutingTopology(clientId);
}

@Deprecated
public Map<TCSObjectReference<Point>, Route> computeRoutes(
ClientID clientId,
TCSObjectReference<Vehicle> vehicleRef,
TCSObjectReference<Point> sourcePointRef,
Set<TCSObjectReference<Point>> destinationPointRefs)
public void updateRoutingTopology(ClientID clientId, Set<TCSObjectReference<Path>> refs)
throws RemoteException;

public Map<TCSObjectReference<Point>, Route> computeRoutes(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import java.util.Set;
import org.opentcs.access.KernelRuntimeException;
import org.opentcs.components.kernel.services.RouterService;
import org.opentcs.data.ObjectUnknownException;
import org.opentcs.data.TCSObjectReference;
import org.opentcs.data.model.Path;
import org.opentcs.data.model.Point;
Expand All @@ -34,38 +33,10 @@ class RemoteRouterServiceProxy
RemoteRouterServiceProxy() {
}

@Override
@Deprecated
public void updatePathLock(TCSObjectReference<Path> ref, boolean locked)
throws ObjectUnknownException, KernelRuntimeException {
checkServiceAvailability();

try {
getRemoteService().updatePathLock(getClientId(), ref, locked);
}
catch (RemoteException ex) {
throw findSuitableExceptionFor(ex);
}
}

@Override
@Deprecated
public void updateRoutingTopology()
throws KernelRuntimeException {
checkServiceAvailability();

try {
getRemoteService().updateRoutingTopology(getClientId());
}
catch (RemoteException ex) {
throw findSuitableExceptionFor(ex);
}
}

@Override
public void updateRoutingTopology(Set<TCSObjectReference<Path>> refs)
throws KernelRuntimeException {
checkServiceAvailability();
checkServiceAvailability();

try {
getRemoteService().updateRoutingTopology(getClientId(), refs);
Expand All @@ -75,26 +46,6 @@ public void updateRoutingTopology(Set<TCSObjectReference<Path>> refs)
}
}

@Deprecated
@Override
public Map<TCSObjectReference<Point>, Route> computeRoutes(
TCSObjectReference<Vehicle> vehicleRef,
TCSObjectReference<Point> sourcePointRef,
Set<TCSObjectReference<Point>> destinationPointRefs)
throws KernelRuntimeException {
checkServiceAvailability();

try {
return getRemoteService().computeRoutes(getClientId(),
vehicleRef,
sourcePointRef,
destinationPointRefs);
}
catch (RemoteException ex) {
throw findSuitableExceptionFor(ex);
}
}

@Override
public Map<TCSObjectReference<Point>, Route> computeRoutes(
TCSObjectReference<Vehicle> vehicleRef,
Expand Down

This file was deleted.

Loading

0 comments on commit cedc5ad

Please sign in to comment.