Following is the usecase:
Based on request data, X, Y, Z do following: X, Y, Z can be simple String or some complex structure.
Following is what is needed:
If(X || Y && !Z) do action 1
if(X && !Y) do action 2
if requestData is X - do something specific for X if request Data is Y - do something specific for Y
if(X || Y) do action 3
action 1, action 2 and action 3 are code blocks for execution. Each of them take some input, may modify that input.
What is the best design pattern, that will keep code extensible and modular. I need this in java
Aucun commentaire:
Enregistrer un commentaire