This class defines a workshift for any Request Processor. A workshift indicates the operating (active) times for any Request Processor. Workshift is used for 2 main features with respect to a Request Processor: 1) Work assignments can be attached to a Request Processor on a per Workshift basis. 2) Resources of a Request Processor can be controlled on a per Workshift basis. The combination of the above two features gives the ability to exactly define what kind of requests a processor should process (work assignment) and how much resources should be given for processing. Finally multiple work assignments (each having a work shift) can be associated to a Request Processor to control and vary the kind of work that can be processed and the resources for it. For example a Request Processor can have 2 workshifts, dayshift and nighshift. Here the daytime workshift can have more resources for peak time while the nightshift can have very few. Workshifts are always associated with a work assignment first and the work assignment is then bound to a Request Processor.

Workshift

Constructs a new instance. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.

Parameters:

name - workshift name. The name is also used as the default display name unless otherwise specifially set.

description - optional description.

schedule - name of a Schedule definition.

duration - duration in minutes for each date in the schedule.

allocation - allocation weighting factor for resources.

objectId - unique metadata object id. Set only when this workshift was retrieved via MetadataService.

Workshift

Constructs a new instance. This constructor is for internal use ONLY and should not be used to construct a new instance. This constructor is used internally by the MetadataService to populate the unique identifier of this object(definition) within the metadata repository.

Parameters:

name - workshift name. The name is also used as the default display name unless otherwise specifially set.

setSchedule

Sets the Schedule for this Workshift. When this Workshift is added to the system via the call to addWorkshift() in the schedule metadata services, the metadata service will verify that a Schedule definition referred by the name given in this method exists in the metadata repository.

Parameters:

schedule - identifier of the Schedule definition.

getDuration

public int getDuration()

Returns the duration in minutes of this Workshift.

Returns:

duration in minutes.

setDuration

public void setDuration(int duration)

Sets the duration.

Parameters:

duration - duration in minutes.

validateCustom

The method performs checks that are possible on this object. It does not ensure the existence of objects referenced by this definition. Such references and related validations are done by the MetadataService at the time of object persistence. MetadataService also calls this method to ensure only valid objects are persisted.