Interface ConstraintEntity
-
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
ConstraintEntityJob
public interface ConstraintEntity extends Serializable
A representation of the entity to use for constraint evaluation. This representation can be one of the following:- a real
Job
- a
JobChainCall
if the constraint is being evaluated in the job chain editor - a row in a
Table
if the constraint is being evaluated in the context of a table
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T extends com.redwood.scheduler.api.model.EntityDefinitionConstraint>
RWIterable<T>getConstraints()
Gets the constraints from the entity definition.TimeZone
getContextTimeZone()
Get a time zone in which constraints can be evaluated.String
getDefinitionName()
Gets the name of the entity definition.ConstraintEntityDefinitionParameter
getDefinitionParameterByName(String name)
Gets the parameter by name from the entity definition.List<ConstraintEntityDefinitionParameter>
getDefinitionParameters()
Gets the parameters from the entity definition.com.redwood.scheduler.api.model.ProcessServer
getForcedProcessServer()
Get the process serverConstraintEntityParameter
getParameterByName(String name)
Gets the parameter by name from the entity itself.String
getPartitionName()
Gets the name of the partition of the entity definition.com.redwood.scheduler.api.model.Queue
getQueue()
Get the queue that is set for the entity.boolean
isQueueRoutingAllowed()
Should we do routing for Queues on this entity?void
setForcedProcessServer(com.redwood.scheduler.api.model.ProcessServer processServer)
Set the process servervoid
setQueue(com.redwood.scheduler.api.model.Queue queue)
Set the queue that is set for the entity.boolean
supportedByProcessServer(com.redwood.scheduler.api.model.ProcessServer ps)
Is the constraint entity supported by the passed in process server?com.redwood.scheduler.api.model.SchedulerEntity
unwrap()
Unwraps the constraint entity by returning the underlying scheduler entity.
-
-
-
Method Detail
-
getParameterByName
ConstraintEntityParameter getParameterByName(String name)
Gets the parameter by name from the entity itself.- Parameters:
name
- of the parameter- Returns:
- null if the parameter does not exist, the parameter otherwise.
-
getDefinitionParameterByName
ConstraintEntityDefinitionParameter getDefinitionParameterByName(String name)
Gets the parameter by name from the entity definition.- Parameters:
name
- of the parameter- Returns:
- null if the parameter does not exist, the parameter otherwise.
-
getDefinitionParameters
List<ConstraintEntityDefinitionParameter> getDefinitionParameters()
Gets the parameters from the entity definition.- Returns:
- the parameters
-
getConstraints
<T extends com.redwood.scheduler.api.model.EntityDefinitionConstraint> RWIterable<T> getConstraints()
Gets the constraints from the entity definition.- Returns:
- the constraints
-
getDefinitionName
String getDefinitionName()
Gets the name of the entity definition.- Returns:
- the name of the definition
-
getPartitionName
String getPartitionName()
Gets the name of the partition of the entity definition.- Returns:
- the name of the partition.
-
supportedByProcessServer
boolean supportedByProcessServer(com.redwood.scheduler.api.model.ProcessServer ps)
Is the constraint entity supported by the passed in process server?- Parameters:
ps
-- Returns:
- true is the entity is supported
-
getContextTimeZone
TimeZone getContextTimeZone()
Get a time zone in which constraints can be evaluated.- Returns:
- a time zone.
-
getQueue
com.redwood.scheduler.api.model.Queue getQueue()
Get the queue that is set for the entity.- Returns:
- a queue.
-
setQueue
void setQueue(com.redwood.scheduler.api.model.Queue queue)
Set the queue that is set for the entity.- Parameters:
queue
- queue to set
-
setForcedProcessServer
void setForcedProcessServer(com.redwood.scheduler.api.model.ProcessServer processServer)
Set the process server- Parameters:
processServer
- process server to set
-
getForcedProcessServer
com.redwood.scheduler.api.model.ProcessServer getForcedProcessServer()
Get the process server- Returns:
- the forced processServer
-
isQueueRoutingAllowed
boolean isQueueRoutingAllowed()
Should we do routing for Queues on this entity?- Returns:
- true if we should do Queue Routing
-
unwrap
com.redwood.scheduler.api.model.SchedulerEntity unwrap()
Unwraps the constraint entity by returning the underlying scheduler entity.- Returns:
- the scheduler entity that is wrapped inside this constraint entity.
-
-