The project instance, this entity belongs to.
The calendar of this entity.
Please use effectiveCalendar to get the calendar that is actually used by the entity. The calendar reflects only the value provided to this entity while effectiveCalendar returns the calendar that is really used (falls back to the project calendar in case the own calendar is not provided).
The scheduling direction of the event. The Forward
direction corresponds to the as-soon-as-possible scheduling (ASAP),
Backward
- to as-late-as-possible (ALAP).
If not specified (which is the default), direction is inherited from the parent task (and from project for the top-level tasks). By default, the project model has forward scheduling mode.
The dispatcher instance for this event. Dispatcher accumulates the information about user input and decide which formula
to use for calculation of every related field (startDate
, endDate
and duration
at this level).
Every field can be calculated with 2 type of formulas. The 1st one is called "proposed" and it is used when there is a user input for this field ("proposed" input), or, when user intention is to keep the previous value of the field. The 2nd type is called "pure" and it is used, when a value of the field should be calculated "purely" based on the values of other fields.
See CycleResolverGuide for more information.
The duration of the event. See also durationUnit.
The duration unit of the event's duration. See also duration.
The effective calendar used by this entity (either its own calendar if provided or the project calendar) for data calculation purposes.
The effective calendar used by this entity (either its own calendar if provided or the project calendar) for data visualizing purposes.
The end date of the event. Can also be provided as a string, parsable with DateHelper.parse()
Gets the calendar.
Getter for direction field.
Gets the event end date.
Gets the event start date
A reference to the graph, this entity belongs to. Initially empty, and is populated when the entity instance is added to the replica (Replica.addEntity)
A set of incoming dependencies for this task (dependencies which ends at this task)
A set of outgoing dependencies from this task (dependencies which starts at this task)
The project instance, this entity belongs to.
Sets the calendar. The method triggers schedule change propagation and returns a Promise
:
// set calendar
model.setCalendar(calendar1).then(() => {
// some code to run after schedule got updated
...
})
It also adds the calendar to the project calendar manager.
Setter for direction field.
The start date of the event. Can also be provided as a string, parsable with DateHelper.parse()
An object, which properties corresponds to the ChronoGraph Identifiers, created for every field.
For example:
class Author extends Entity.mix(Base) {
@field()
firstName : string
@field()
lastName : string
}
const author = Author.new()
// identifier for the field `firstName`
author.$.firstName
const firstName = replica.read(author.$.firstName)
A graph identifier, that represents the whole entity.
An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.
An EntityMeta instance, representing the "meta" information about the entity class. It is shared among all instances of the class.
The main calculation method for the duration field. Delegates to either calculateDurationProposed or calculateDurationPure, depending on the information from dispatcher
The "proposed" calculation function of the duration field. It should calculate the duration as if there's a user input for it or a previous value. It can also use the values of other fields to "validate" the "proposed" value.
See also calculateDurationPure
The "pure" calculation function of the duration field. It should calculate the duration as if there's no user input for it and no previous value - "purely" based on the values of other fields.
If start date of event is less or equal then end date (normal case) it delegates to calculateProjectedDuration. Otherwise, duration is set to 0.
See also calculateDurationProposed.
Calculation method of the effectiveCalendar. Takes the calendar from the project, if not provided to the entity explicitly.
Calculation method of the effectiveCalendar. Takes the calendar from the project, if not provided to the entity explicitly.
The main calculation method for the endDate field. Delegates to either calculateEndDateProposed or calculateEndDatePure, depending on the information from dispatcher
The "proposed" calculation function of the endDate field. It should calculate the endDate as if there's a user input for it or a previous value. It can also use the values of other fields to "validate" the "proposed" value.
See also calculateEndDatePure
The "pure" calculation function of the endDate field. It should calculate the endDate as if there's no user input for it and no previous value - "purely" based on the values of other fields.
At this level it delegates to calculateProjectedXDateWithDuration
See also calculateEndDateProposed.
This method calculates the duration of the given time span, in the provided durationUnit
or in the durationUnit.
This method calculates the opposite date of the event.
The base date of the event (start or end date)
Boolean flag, indicating whether the given baseDate
is start date (true
) or end date (false
)
Duration of the event, in its durationUnits
The main calculation method for the startDate field. Delegates to either calculateStartDateProposed or calculateStartDatePure, depending on the information from dispatcher
The "proposed" calculation function of the startDate field. It should calculate the startDate as if there's a user input for it or a previous value. It can also use the values of other fields to "validate" the "proposed" value.
See also calculateStartDatePure
The "pure" calculation function of the startDate field. It should calculate the startDate as if there's no user input for it and no previous value - "purely" based on the values of other fields.
At this level it delegates to calculateProjectedXDateWithDuration
See also calculateStartDateProposed.
This is a convenience method, that just delegates to the ChronoGraph.commit method of this entity's graph.
If there's no graph (entity has not been added to any replica) a CommitZero constant will be returned.
This is a convenience method, that just delegates to the ChronoGraph.commitAsync method of this entity's graph.
If there's no graph (entity has not been added to any replica) a resolved promise with CommitZero constant will be returned.
This method is called when entity is added to some replica.
Convenience method to get the instance of assignment by its id.
Convenience method to get the instance of the assignment store in the project instance, this entity belongs to.
Convenience method to get the instance of calendar by its id.
Convenience method to get the instance of the calendar manager store in the project instance, this entity belongs to.
Convenience method to get the instance of dependency by its id.
Convenience method to get the instance of the dependency store in the project instance, this entity belongs to.
Duration getter. Returns the duration of the event, in the given unit. If unit is not given, returns duration in durationUnit.
Convenience method to get the instance of event by its id.
Convenience method to get the instance of the event store in the project instance, this entity belongs to.
The method to get the ChronoGraph
instance, this entity belongs to.
Returns a project instance
Convenience method to get the instance of resource by its id.
Convenience method to get the instance of the resource store in the project instance, this entity belongs to.
Template method, which is called when model is joining the project (through joining some store that has already joined the project)
This method is called when entity is removed from the replica it's been added to.
Template method, which is called when model is leaving the project (through leaving some store usually)
Duration setter.
The new duration to set.
The unit for new duration. Optional, if missing the durationUnit value will be used.
A boolean flag, indicating, whether the intention is to keep the start date (true
) or end date (false
)
Sets the event end date.
The new end date to set
Whether the intention is to keep the duration
field (keepDuration = true
) or startDate
(keepDuration = false
)
The method to set the project instance, this entity belongs to.
Sets the event start date
The new start date to set
Whether the intention is to keep the duration
field (keepDuration = true
) or endDate
(keepDuration = false
)
The method skips the event non working time starting from the provided date
and
going either forward or backward in time.
It uses the event effective calendar to detect which time is not working.
Date to start skipping from
Skip direction (true
to go forward in time, false
- backwards)
The method skips the provided amount of the event working time
starting from the date
and going either forward or backward in time.
It uses the event effective calendar to detect which time is not working.
Date to start skipping from
Skip direction (true
to go forward in time, false
- backwards)
Amount of working time to skip
Units the duration
value in (if not provided then duration is considered provided in durationUnit)
Calculation function that simply returns current (proposed or previous) value of an identifier.
Generated using TypeDoc
This is a mixin, providing dependencies "awareness" for the event.
Doesn't affect scheduling.