[Minor] Added constants to StrolchConstants
This commit is contained in:
parent
9b452b1ba3
commit
4fedec75b7
|
@ -118,9 +118,12 @@ public class StrolchConstants {
|
||||||
public static class PolicyConstants {
|
public static class PolicyConstants {
|
||||||
public static final String TYPE_PRODUCE = "Produce";
|
public static final String TYPE_PRODUCE = "Produce";
|
||||||
public static final String TYPE_CONSUME = "Consume";
|
public static final String TYPE_CONSUME = "Consume";
|
||||||
|
public static final String TYPE_RESERVE = "Reserve";
|
||||||
|
public static final String TYPE_RELEASE = "Release";
|
||||||
|
|
||||||
public static final String BAG_OBJECTIVES = "Objectives";
|
public static final String BAG_OBJECTIVES = "Objectives";
|
||||||
|
|
||||||
|
public static final String PARAM_RESERVED = "reserved";
|
||||||
public static final String PARAM_QUANTITY = "quantity";
|
public static final String PARAM_QUANTITY = "quantity";
|
||||||
public static final String PARAM_DURATION = "duration";
|
public static final String PARAM_DURATION = "duration";
|
||||||
public static final String PARAM_ORDER = "order";
|
public static final String PARAM_ORDER = "order";
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package li.strolch.execution.policy;
|
package li.strolch.execution.policy;
|
||||||
|
|
||||||
import static li.strolch.model.StrolchModelConstants.BAG_PARAMETERS;
|
import static li.strolch.model.StrolchModelConstants.BAG_PARAMETERS;
|
||||||
|
import static li.strolch.runtime.StrolchConstants.PolicyConstants.*;
|
||||||
|
|
||||||
import li.strolch.exception.StrolchModelException;
|
import li.strolch.exception.StrolchModelException;
|
||||||
import li.strolch.model.Locator;
|
import li.strolch.model.Locator;
|
||||||
|
@ -11,6 +12,7 @@ import li.strolch.model.parameter.BooleanParameter;
|
||||||
import li.strolch.model.timevalue.impl.FloatValue;
|
import li.strolch.model.timevalue.impl.FloatValue;
|
||||||
import li.strolch.model.timevalue.impl.ValueChange;
|
import li.strolch.model.timevalue.impl.ValueChange;
|
||||||
import li.strolch.persistence.api.StrolchTransaction;
|
import li.strolch.persistence.api.StrolchTransaction;
|
||||||
|
import li.strolch.runtime.StrolchConstants;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
@ -21,18 +23,15 @@ import li.strolch.persistence.api.StrolchTransaction;
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* <p>
|
* <p>
|
||||||
* <b>Note:</b> the reservation is done for {@link Action} of type {@link #TYPE_RESERVE} and releasing is done for
|
* <b>Note:</b> the reservation is done for {@link Action} of type {@link StrolchConstants.PolicyConstants#TYPE_RESERVE}
|
||||||
* {@link Action} of type {@link #TYPE_RELEASE}
|
* and releasing is done for
|
||||||
|
* {@link Action} of type {@link StrolchConstants.PolicyConstants#TYPE_RELEASE}
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||||
*/
|
*/
|
||||||
public class ReservationExecution extends DurationExecution {
|
public class ReservationExecution extends DurationExecution {
|
||||||
|
|
||||||
public static final String PARAM_RESERVED = "reserved";
|
|
||||||
public static final String TYPE_RESERVE = "Reserve";
|
|
||||||
public static final String TYPE_RELEASE = "Release";
|
|
||||||
|
|
||||||
public ReservationExecution(StrolchTransaction tx) {
|
public ReservationExecution(StrolchTransaction tx) {
|
||||||
super(tx);
|
super(tx);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
package li.strolch.execution.policy;
|
package li.strolch.execution.policy;
|
||||||
|
|
||||||
|
import static li.strolch.runtime.StrolchConstants.PolicyConstants.TYPE_RESERVE;
|
||||||
|
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
import li.strolch.handler.operationslog.LogMessage;
|
import li.strolch.handler.operationslog.LogMessage;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package li.strolch.execution;
|
package li.strolch.execution;
|
||||||
|
|
||||||
import static li.strolch.execution.policy.ReservationExecution.PARAM_RESERVED;
|
|
||||||
import static li.strolch.model.StrolchModelConstants.BAG_PARAMETERS;
|
import static li.strolch.model.StrolchModelConstants.BAG_PARAMETERS;
|
||||||
|
import static li.strolch.runtime.StrolchConstants.PolicyConstants.PARAM_RESERVED;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
Loading…
Reference in New Issue