E
- parent data object of the workflowF
- choice definition of the choice field used to map to the authoritypublic class ChoiceFieldObjectToAuthorityMapper<E extends DataObject<E>,F extends FieldChoiceDefinition<F>> extends ObjectToAuthorityMapper<E>
Constructor and Description |
---|
ChoiceFieldObjectToAuthorityMapper(DataObjectId<Authority> defaultauthority,
ChoiceFieldExtractor<E,F> choicefieldextractor)
creates an authority mapper specifying the default authority
|
Modifier and Type | Method and Description |
---|---|
void |
addSpecificMapping(ChoiceValue<F> choicevalue,
DataObjectId<Authority> authority)
adds a specific mapping from a choice value to an authority.
|
DataObjectId<Authority> |
getAuthority(E object)
gets the authority for a data object, according to data object content
|
public ChoiceFieldObjectToAuthorityMapper(DataObjectId<Authority> defaultauthority, ChoiceFieldExtractor<E,F> choicefieldextractor)
defaultauthority
- default authority if not mapping is createdchoicefieldextractor
- the extractor to get the paylaod in the choice
field of the objectpublic void addSpecificMapping(ChoiceValue<F> choicevalue, DataObjectId<Authority> authority)
choicevalue
- choice valueauthority
- authority to put on objects having the given choice value.public DataObjectId<Authority> getAuthority(E object)
ObjectToAuthorityMapper
getAuthority
in class ObjectToAuthorityMapper<E extends DataObject<E>>
object
- the data object