org.eclipse.stardust.engine.api.runtime
Class DeputyOptions

java.lang.Object
  extended by org.eclipse.stardust.engine.api.runtime.DeputyOptions
All Implemented Interfaces:
Serializable

public class DeputyOptions
extends Object
implements Serializable

Container class for the deputy description options.

Version:
$Revision: $
Author:
stephan.born
See Also:
Serialized Form

Field Summary
static DeputyOptions DEFAULT
          Deputy options with default values: no restriction on participants, no restrictions on dates
 
Constructor Summary
DeputyOptions()
          Creates new options valid from now, unlimited and with an empty participant set.
DeputyOptions(Date fromDate, Date toDate)
          Creates new options valid in the given interval and with an empty participant set.
DeputyOptions(Date fromDate, Date toDate, Set<ModelParticipantInfo> participants)
          Creates new options valid in the given interval and with the specified participant set.
 
Method Summary
 Date getFromDate()
          Gets the validity start date.
 Set<ModelParticipantInfo> getParticipants()
          Gets the set of participant grants.
 Date getToDate()
          Gets the validity end date.
 void setFromDate(Date fromDate)
          Sets the validity start date.
 void setParticipants(Set<ModelParticipantInfo> participants)
          Sets the participant grants.
 void setToDate(Date toDate)
          Sets the validity end date.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

public static final DeputyOptions DEFAULT
Deputy options with default values: no restriction on participants, no restrictions on dates

Constructor Detail

DeputyOptions

public DeputyOptions()
Creates new options valid from now, unlimited and with an empty participant set.


DeputyOptions

public DeputyOptions(Date fromDate,
                     Date toDate)
Creates new options valid in the given interval and with an empty participant set.

Parameters:
fromDate - the validity start date. Must not be null.
toDate - the validity end date. If null, then it is unlimited.
Throws:
IllegalArgumentException - if fromDate is null.

DeputyOptions

public DeputyOptions(Date fromDate,
                     Date toDate,
                     Set<ModelParticipantInfo> participants)
Creates new options valid in the given interval and with the specified participant set.

Parameters:
fromDate - the validity start date. Must not be null.
toDate - the validity end date. If null, then it is unlimited.
participants - the set of participants the deputy will have grants to. Can be empty, but not null.
Throws:
IllegalArgumentException - if fromDate or the participants set are null.
Method Detail

getFromDate

public Date getFromDate()
Gets the validity start date.

Returns:
the validity start date.

setFromDate

public void setFromDate(Date fromDate)
Sets the validity start date.

Parameters:
fromDate - the new validity start date. Must not be null.
Throws:
IllegalArgumentException - if fromDate is null.

getToDate

public Date getToDate()
Gets the validity end date.

Returns:
the validity end date or null if unlimited.

setToDate

public void setToDate(Date toDate)
Sets the validity end date.

Parameters:
toDate - the new validity end date or null if unlimited.

getParticipants

public Set<ModelParticipantInfo> getParticipants()
Gets the set of participant grants.

Returns:
the set of participant grants.

setParticipants

public void setParticipants(Set<ModelParticipantInfo> participants)
Sets the participant grants.

Parameters:
participants - the new set of participant grants. Should be empty if the deputy user only inherit grants over work items in the personal worklist.
Throws:
IllegalArgumentException - if the participants set is null.


Copyright © 2017 Eclipse Stardust. All Rights Reserved.