forked from LupusNobilis/java-org.hwo.ui
50 lines
1.0 KiB
Java
50 lines
1.0 KiB
Java
package org.hwo.ui.netplan;
|
|
|
|
import org.hwo.datetime.DateTime;
|
|
|
|
public class BaseNetPlanResource implements INetPlanResource {
|
|
|
|
private String shortLabel;
|
|
private String detailedLabel;
|
|
private int maxParallelUsage;
|
|
|
|
private ResourceAvailability resourceAvailability;
|
|
|
|
public BaseNetPlanResource(String shortLabel,String detailedLabel) {
|
|
this.shortLabel = shortLabel;
|
|
this.detailedLabel = detailedLabel;
|
|
this.maxParallelUsage = 1;
|
|
}
|
|
|
|
|
|
@Override
|
|
public String getLabel() {
|
|
return this.shortLabel;
|
|
}
|
|
|
|
@Override
|
|
public String getDetailedLabel() {
|
|
return this.detailedLabel;
|
|
}
|
|
|
|
@Override
|
|
public ResourceAvailability getAvailability() {
|
|
return resourceAvailability;
|
|
}
|
|
|
|
@Override
|
|
public ResourceAvailability getAvailability(DateTime fromDateTime) {
|
|
return resourceAvailability.findAvailableAfter(fromDateTime);
|
|
}
|
|
|
|
@Override
|
|
public int getMaxParallelUsage() {
|
|
return this.maxParallelUsage;
|
|
}
|
|
|
|
public void setMaxParallelUsage(int maxParallelUsage) {
|
|
this.maxParallelUsage = maxParallelUsage;
|
|
}
|
|
|
|
}
|