Created
September 27, 2011 14:16
-
-
Save chanwit/1245147 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class DesktopScope implements Scope { | |
| def get(String name, ObjectFactory of) { | |
| def desktop = Executions?.current?.desktop | |
| def obj = desktop?.getAttribute(name) | |
| if(!obj) { | |
| obj = of.getObject() | |
| desktop?.setAttribute(name, obj) | |
| } | |
| return obj | |
| } | |
| String getConversationId() { | |
| return Executions?.current?.desktop?.getId() | |
| } | |
| def remove(String name) { | |
| def desktop = Executions.current.desktop | |
| return desktop.removeAttribute(name) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment