public interface TimeConstraint extends Externalizable
ExecOptions#timeConstraint(TimeConstraint) method of the execution options of Tasks and Rules.
The system provides a standard implementations of the TimeConstraint interface, namely -
the CronConstraint class, which allows defining of Tasks working time via Cron expressions. Besides using the
standard system-provided implementation, the system also allows custom implementations of TimeConstraint
to be provided by the users in order to define
more specific time scheduling limitation, which is beyond the scope of the standard system-provided implementations.
Custom implementations should take into account that
they must implement Externalizable, i.e., must make their objects transferable to the backend
they must provide the implementation classes on the backend, i.e., java packages should exported on
backend osgi framework (Export-Package bundle manifest header)
it is recommended to provide text-representation of the time constraint definitions, so that custom definitions can participate
in the textual representation/definition of Rules and Tasks. Handling of text representations can be done by a service
- com.prosyst.mprm.backend.rules.spi.time.constraint.TimeConstraintProvider registered on the backend. The service should
declare the same type as the type provided in getType() of the custom TimeConstraint
object.| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getTextRepresentation()
Returns a text representation of this
TimeConstraint object. |
java.lang.String |
getType()
Returns a distinct type name of the
TimeConstraint implementation. |
readObject, writeObjectjava.lang.String getType()
TimeConstraint implementation. Custom implementations should return the same name
for all instances of the same class.TimeConstraint implementation.java.lang.String getTextRepresentation()
TimeConstraint object. The text representation should be
self-sufficient and consistent so that it could be passed to the
{@link com.prosyst.mprm.backend.rules.spi.time.constraint.TimeConstraintProvider#parse(String,
com.prosyst.mprm.backend.rules.spi.time.SystemContext) method to fully restore the object with all time constraint data.TimeConstraint object.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.