Hemant Bothra 310ae50248 Issue 989 final-batch (#1119)
* Adding support for maven assembly plugin to generate executable jar with all dependencies in built

* Merge branch 'master' into issue-989

# Conflicts:
#	abstract-document/pom.xml
#	pom.xml

* Adding maven assemly plugin for projects with name A

* Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2

* batch set - 2 having all project with B and C

* issue-989 d-e-f

* fixing eip pom and adding g-h-i-l-m-n Skipping naked object as it seems it doesn't have main method, will consider this at end

* Adding for O and P projects Skipping Object-Mother as we don't have main method for same.

* Final batch
2019-12-29 14:41:21 +02:00
..
2019-12-29 14:41:21 +02:00

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Role Object role-object /patterns/role-object/ Structural
Extensibility

Also known as

Post pattern, Extension Object pattern

Intent

Adapt an object to different clients needs through transparently attached role objects, each one representing a role the object has to play in that clients context. The object manages its role set dynamically. By representing roles as individual objects, different contexts are kept separate and system configuration is simplified.

Class diagram

alt text

Applicability

Use the Role Object pattern, if:

  • You want to handle a key abstraction in different contexts and you do not want to put the resulting context specific interfaces into the same class interface.
  • You want to handle the available roles dynamically so that they can be attached and removed on demand, that is at runtime, rather than fixing them statically at compile-time.
  • You want to treat the extensions transparently and need to preserve the logical object identity of the resultingobject conglomerate.
  • You want to keep role/client pairs independent from each other so that changes to a role do not affect clients that are not interested in that role.

Credits